@coorpacademy/components 11.32.50 → 11.32.52-alpha.56

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 (63) hide show
  1. package/es/molecule/banner/index.d.ts +1 -0
  2. package/es/molecule/banner/index.d.ts.map +1 -1
  3. package/es/molecule/banner/index.js +12 -3
  4. package/es/molecule/banner/index.js.map +1 -1
  5. package/es/template/back-office/brand-update/index.d.ts +1 -0
  6. package/es/template/playlist-detail/index.d.ts +4 -1
  7. package/es/template/playlist-detail/index.d.ts.map +1 -1
  8. package/es/template/playlist-detail/index.js +14 -3
  9. package/es/template/playlist-detail/index.js.map +1 -1
  10. package/es/template/skill-detail/all-courses.d.ts +5 -1
  11. package/es/template/skill-detail/all-courses.d.ts.map +1 -1
  12. package/es/template/skill-detail/all-courses.js +18 -7
  13. package/es/template/skill-detail/all-courses.js.map +1 -1
  14. package/es/template/skill-detail/index.d.ts +4 -1
  15. package/es/template/skill-detail/index.d.ts.map +1 -1
  16. package/es/template/skill-detail/index.js +14 -3
  17. package/es/template/skill-detail/index.js.map +1 -1
  18. package/lib/molecule/banner/index.d.ts +1 -0
  19. package/lib/molecule/banner/index.d.ts.map +1 -1
  20. package/lib/molecule/banner/index.js +13 -3
  21. package/lib/molecule/banner/index.js.map +1 -1
  22. package/lib/template/back-office/brand-update/index.d.ts +1 -0
  23. package/lib/template/playlist-detail/index.d.ts +4 -1
  24. package/lib/template/playlist-detail/index.d.ts.map +1 -1
  25. package/lib/template/playlist-detail/index.js +14 -3
  26. package/lib/template/playlist-detail/index.js.map +1 -1
  27. package/lib/template/skill-detail/all-courses.d.ts +5 -1
  28. package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
  29. package/lib/template/skill-detail/all-courses.js +19 -7
  30. package/lib/template/skill-detail/all-courses.js.map +1 -1
  31. package/lib/template/skill-detail/index.d.ts +4 -1
  32. package/lib/template/skill-detail/index.d.ts.map +1 -1
  33. package/lib/template/skill-detail/index.js +14 -3
  34. package/lib/template/skill-detail/index.js.map +1 -1
  35. package/locales/bs/global.json +8 -7
  36. package/locales/cs/global.json +5 -4
  37. package/locales/de/global.json +5 -4
  38. package/locales/en/global.json +1 -0
  39. package/locales/es/global.json +5 -4
  40. package/locales/et/global.json +5 -4
  41. package/locales/fi/global.json +5 -4
  42. package/locales/fr/global.json +5 -4
  43. package/locales/hr/global.json +8 -7
  44. package/locales/hu/global.json +5 -4
  45. package/locales/hy/global.json +8 -7
  46. package/locales/it/global.json +5 -4
  47. package/locales/ja/global.json +5 -4
  48. package/locales/ko/global.json +5 -4
  49. package/locales/nl/global.json +5 -4
  50. package/locales/pl/global.json +5 -4
  51. package/locales/pt/global.json +5 -4
  52. package/locales/ro/global.json +5 -4
  53. package/locales/ru/global.json +5 -4
  54. package/locales/sk/global.json +5 -4
  55. package/locales/sl/global.json +5 -4
  56. package/locales/sv/global.json +5 -4
  57. package/locales/tl/global.json +8 -7
  58. package/locales/tr/global.json +5 -4
  59. package/locales/uk/global.json +5 -4
  60. package/locales/vi/global.json +8 -7
  61. package/locales/zh/global.json +5 -4
  62. package/locales/zh_TW/global.json +8 -7
  63. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["uncappedMap","convert","cap","TYPES","success","COLORS","cm_positive_200","error","cm_negative_200","warning","cm_yellow_400","info","cm_grey_500","STYLES","style","Banner","props","type","message","cta","temporary","bannerKey","onEnd","switchValue","setSwitchValue","useState","ButtonSeparator","classnames","buttonsBar","handleSwitchToggle","useCallback","action","e","newSwitchValue","buildButton","buttonType","label","commonStyle","button","padding","buildCta","ctaOptions","options","i","ctaWrapper","iconName","iconColor","banner","temporaryBanner","icon","temporaryIcon","ctaPropTypes","PropTypes","shape","string","oneOf","func","propTypes","isRequired","arrayOf","bool"],"sources":["../../../src/molecule/banner/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys, noop, isEmpty, map, size} from 'lodash/fp';\nimport {COLORS} from '../../variables/colors';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst TYPES = {\n success: ['circle-check', COLORS.cm_positive_200],\n error: ['triangle-exclamation', COLORS.cm_negative_200],\n warning: ['circle-exclamation', COLORS.cm_yellow_400],\n info: ['circle-info', COLORS.cm_grey_500]\n};\n\nconst STYLES = {\n success: style.success,\n error: style.error,\n warning: style.warning,\n info: style.info\n};\n\nconst Banner = props => {\n const {type, message, cta = [], temporary, bannerKey, onEnd} = props;\n const [switchValue, setSwitchValue] = useState(false);\n\n const ButtonSeparator = <div className={classnames(style.buttonsBar, STYLES[type])} />;\n\n const handleSwitchToggle = useCallback(\n action => e => {\n const newSwitchValue = !switchValue;\n setSwitchValue(newSwitchValue);\n action(newSwitchValue);\n },\n [switchValue]\n );\n\n const buildButton = ({type: buttonType = 'button', label, action = noop}) => {\n const commonStyle = classnames(style.button, STYLES[type]);\n\n switch (buttonType) {\n case 'switch':\n return (\n <div className={commonStyle}>\n <InputSwitch\n id=\"show-microlearning-switch\"\n theme=\"coorpmanager\"\n title={label}\n value={switchValue}\n onChange={handleSwitchToggle(action)}\n data-name={`banner-switch-cta`}\n aria-label={label}\n />\n </div>\n );\n default:\n return (\n <div className={commonStyle}>\n <ButtonLink\n data-name=\"banner-button-cta\"\n aria-label={label}\n label={label}\n onClick={action}\n type=\"text\"\n customStyle={{padding: 0}}\n />\n </div>\n );\n }\n };\n\n const buildCta = ctaOptions => {\n return uncappedMap((options, i) => {\n if (isEmpty(options)) return null;\n\n return (\n <div className={style.ctaWrapper} key={i}>\n {i > 0 && i <= size(options) ? ButtonSeparator : null}\n {buildButton(options)}\n </div>\n );\n }, ctaOptions);\n };\n\n const [iconName, iconColor] = TYPES[type];\n\n return (\n <div\n key={bannerKey}\n className={classnames(style.banner, STYLES[type], temporary && style.temporaryBanner)}\n onAnimationEnd={onEnd}\n title={message}\n >\n <div data-name={`${type}-banner-message`} className={style.message}>\n <Icon\n iconName={iconName}\n iconColor={iconColor}\n className={classnames(style.icon, temporary && style.temporaryIcon)}\n customStyle={{padding: 0}}\n />\n {message}\n </div>\n {buildCta(cta)}\n </div>\n );\n};\n\nconst ctaPropTypes = PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['button', 'switch']),\n action: PropTypes.func\n});\n\nBanner.propTypes = {\n bannerKey: PropTypes.string,\n type: PropTypes.oneOf(keys(TYPES)),\n message: PropTypes.string.isRequired,\n cta: PropTypes.arrayOf(ctaPropTypes),\n temporary: PropTypes.bool,\n onEnd: PropTypes.func\n};\n\nexport default Banner;\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,WAAW,GAAG,cAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,CAApB;;AAEA,MAAMC,KAAK,GAAG;EACZC,OAAO,EAAE,CAAC,cAAD,EAAiBC,cAAA,CAAOC,eAAxB,CADG;EAEZC,KAAK,EAAE,CAAC,sBAAD,EAAyBF,cAAA,CAAOG,eAAhC,CAFK;EAGZC,OAAO,EAAE,CAAC,oBAAD,EAAuBJ,cAAA,CAAOK,aAA9B,CAHG;EAIZC,IAAI,EAAE,CAAC,aAAD,EAAgBN,cAAA,CAAOO,WAAvB;AAJM,CAAd;AAOA,MAAMC,MAAM,GAAG;EACbT,OAAO,EAAEU,cAAA,CAAMV,OADF;EAEbG,KAAK,EAAEO,cAAA,CAAMP,KAFA;EAGbE,OAAO,EAAEK,cAAA,CAAML,OAHF;EAIbE,IAAI,EAAEG,cAAA,CAAMH;AAJC,CAAf;;AAOA,MAAMI,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IAACC,IAAD;IAAOC,OAAP;IAAgBC,GAAG,GAAG,EAAtB;IAA0BC,SAA1B;IAAqC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rC,IAAI,EAAEmC,kBAAA,CAAUG,KAAV,CAAgB,CAAC,QAAD,EAAW,QAAX,CAAhB,CAF6B;EAGnCxB,MAAM,EAAEqB,kBAAA,CAAUI;AAHiB,CAAhB,CAArB;AAMAzC,MAAM,CAAC0C,SAAP,2CAAmB;EACjBpC,SAAS,EAAE+B,kBAAA,CAAUE,MADJ;EAEjBrC,IAAI,EAAEmC,kBAAA,CAAUG,KAAV,CAAgB,oBAAKpD,KAAL,CAAhB,CAFW;EAGjBe,OAAO,EAAEkC,kBAAA,CAAUE,MAAV,CAAiBI,UAHT;EAIjBvC,GAAG,EAAEiC,kBAAA,CAAUO,OAAV,CAAkBR,YAAlB,CAJY;EAKjB/B,SAAS,EAAEgC,kBAAA,CAAUQ,IALJ;EAMjBtC,KAAK,EAAE8B,kBAAA,CAAUI;AANA,CAAnB;eASezC,M"}
1
+ {"version":3,"file":"index.js","names":["uncappedMap","convert","cap","TYPES","success","COLORS","cm_positive_200","error","cm_negative_200","warning","cm_yellow_400","info","cm_grey_500","STYLES","style","Banner","props","type","message","cta","temporary","bannerKey","onEnd","oldSwitchValue","switchValue","setSwitchValue","useState","ButtonSeparator","classnames","buttonsBar","handleSwitchToggle","useCallback","action","e","newSwitchValue","buildButton","buttonType","label","commonStyle","button","padding","buildCta","ctaOptions","options","i","ctaWrapper","iconName","iconColor","banner","temporaryBanner","icon","temporaryIcon","ctaPropTypes","PropTypes","shape","string","oneOf","func","bool","propTypes","isRequired","arrayOf"],"sources":["../../../src/molecule/banner/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys, noop, isEmpty, map, size, pipe, find, get} from 'lodash/fp';\nimport {COLORS} from '../../variables/colors';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst TYPES = {\n success: ['circle-check', COLORS.cm_positive_200],\n error: ['triangle-exclamation', COLORS.cm_negative_200],\n warning: ['circle-exclamation', COLORS.cm_yellow_400],\n info: ['circle-info', COLORS.cm_grey_500]\n};\n\nconst STYLES = {\n success: style.success,\n error: style.error,\n warning: style.warning,\n info: style.info\n};\n\nconst Banner = props => {\n const {type, message, cta = [], temporary, bannerKey, onEnd} = props;\n const oldSwitchValue = pipe(find({type: 'switch'}), get('oldSwitchValue'))(cta);\n const [switchValue, setSwitchValue] = useState(oldSwitchValue || false);\n\n const ButtonSeparator = <div className={classnames(style.buttonsBar, STYLES[type])} />;\n\n const handleSwitchToggle = useCallback(\n action => e => {\n const newSwitchValue = !switchValue;\n setSwitchValue(newSwitchValue);\n action(newSwitchValue);\n },\n [switchValue]\n );\n\n const buildButton = ({type: buttonType = 'button', label, action = noop}) => {\n const commonStyle = classnames(style.button, STYLES[type]);\n\n switch (buttonType) {\n case 'switch':\n return (\n <div className={commonStyle}>\n <InputSwitch\n id=\"show-microlearning-switch\"\n theme=\"default\"\n title={label}\n value={switchValue}\n onChange={handleSwitchToggle(action)}\n data-name={`banner-switch-cta`}\n aria-label={label}\n />\n </div>\n );\n default:\n return (\n <div className={commonStyle}>\n <ButtonLink\n data-name=\"banner-button-cta\"\n aria-label={label}\n label={label}\n onClick={action}\n type=\"text\"\n customStyle={{padding: 0}}\n />\n </div>\n );\n }\n };\n\n const buildCta = ctaOptions => {\n return uncappedMap((options, i) => {\n if (isEmpty(options)) return null;\n\n return (\n <div className={style.ctaWrapper} key={i}>\n {i > 0 && i <= size(options) ? ButtonSeparator : null}\n {buildButton(options)}\n </div>\n );\n }, ctaOptions);\n };\n\n const [iconName, iconColor] = TYPES[type];\n\n return (\n <div\n key={bannerKey}\n className={classnames(style.banner, STYLES[type], temporary && style.temporaryBanner)}\n onAnimationEnd={onEnd}\n title={message}\n >\n <div data-name={`${type}-banner-message`} className={style.message}>\n <Icon\n iconName={iconName}\n iconColor={iconColor}\n className={classnames(style.icon, temporary && style.temporaryIcon)}\n customStyle={{padding: 0}}\n />\n {message}\n </div>\n {buildCta(cta)}\n </div>\n );\n};\n\nconst ctaPropTypes = PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['button', 'switch']),\n action: PropTypes.func,\n oldSwitchValue: PropTypes.bool\n});\n\nBanner.propTypes = {\n bannerKey: PropTypes.string,\n type: PropTypes.oneOf(keys(TYPES)),\n message: PropTypes.string.isRequired,\n cta: PropTypes.arrayOf(ctaPropTypes),\n temporary: PropTypes.bool,\n onEnd: PropTypes.func\n};\n\nexport default Banner;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,WAAW,GAAG,cAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,CAApB;;AAEA,MAAMC,KAAK,GAAG;EACZC,OAAO,EAAE,CAAC,cAAD,EAAiBC,cAAA,CAAOC,eAAxB,CADG;EAEZC,KAAK,EAAE,CAAC,sBAAD,EAAyBF,cAAA,CAAOG,eAAhC,CAFK;EAGZC,OAAO,EAAE,CAAC,oBAAD,EAAuBJ,cAAA,CAAOK,aAA9B,CAHG;EAIZC,IAAI,EAAE,CAAC,aAAD,EAAgBN,cAAA,CAAOO,WAAvB;AAJM,CAAd;AAOA,MAAMC,MAAM,GAAG;EACbT,OAAO,EAAEU,cAAA,CAAMV,OADF;EAEbG,KAAK,EAAEO,cAAA,CAAMP,KAFA;EAGbE,OAAO,EAAEK,cAAA,CAAML,OAHF;EAIbE,IAAI,EAAEG,cAAA,CAAMH;AAJC,CAAf;;AAOA,MAAMI,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IAACC,IAAD;IAAOC,OAAP;IAAgBC,GAAG,GAAG,EAAtB;IAA0BC,SAA1B;IAAqCC,SAArC;IAAgDC;EAAhD,IAAyDN,KAA/D;EACA,MAAMO,cAAc,GAAG,oBAAK,oBAAK;IAACN,IAAI,EAAE;EAA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AK,EAAEgB,kBAAA,CAAUE,MADkB;EAEnCtC,IAAI,EAAEoC,kBAAA,CAAUG,KAAV,CAAgB,CAAC,QAAD,EAAW,QAAX,CAAhB,CAF6B;EAGnCxB,MAAM,EAAEqB,kBAAA,CAAUI,IAHiB;EAInClC,cAAc,EAAE8B,kBAAA,CAAUK;AAJS,CAAhB,CAArB;AAOA3C,MAAM,CAAC4C,SAAP,2CAAmB;EACjBtC,SAAS,EAAEgC,kBAAA,CAAUE,MADJ;EAEjBtC,IAAI,EAAEoC,kBAAA,CAAUG,KAAV,CAAgB,oBAAKrD,KAAL,CAAhB,CAFW;EAGjBe,OAAO,EAAEmC,kBAAA,CAAUE,MAAV,CAAiBK,UAHT;EAIjBzC,GAAG,EAAEkC,kBAAA,CAAUQ,OAAV,CAAkBT,YAAlB,CAJY;EAKjBhC,SAAS,EAAEiC,kBAAA,CAAUK,IALJ;EAMjBpC,KAAK,EAAE+B,kBAAA,CAAUI;AANA,CAAnB;eASe1C,M"}
@@ -13,6 +13,7 @@ declare namespace BrandUpdate {
13
13
  label: PropTypes.Requireable<string>;
14
14
  type: PropTypes.Requireable<string>;
15
15
  action: PropTypes.Requireable<(...args: any[]) => any>;
16
+ oldSwitchValue: PropTypes.Requireable<boolean>;
16
17
  }> | null | undefined)[]>;
17
18
  temporary: PropTypes.Requireable<boolean>;
18
19
  onEnd: PropTypes.Requireable<(...args: any[]) => any>;
@@ -83,7 +83,10 @@ declare namespace PlaylistDetail {
83
83
  }>>;
84
84
  const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
85
85
  const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
86
- const bannerMicrolearningRuleAction: PropTypes.Requireable<(...args: any[]) => any>;
86
+ namespace bannerMicrolearning {
87
+ const action: PropTypes.Requireable<(...args: any[]) => any>;
88
+ const oldSwitchValue: PropTypes.Requireable<boolean>;
89
+ }
87
90
  }
88
91
  }
89
92
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/playlist-detail/index.js"],"names":[],"mappings":";AAgBA,uEA2FC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/playlist-detail/index.js"],"names":[],"mappings":";AAgBA,uEAgGC"}
@@ -51,12 +51,16 @@ const PlaylistDetail = (props, context) => {
51
51
  sorting,
52
52
  onBackClick,
53
53
  onContinueLearningClick,
54
- bannerMicrolearningRuleAction = null
54
+ bannerMicrolearning = {}
55
55
  } = props;
56
56
  const descriptionRef = (0, _react.useRef)(null);
57
57
  const {
58
58
  translate
59
59
  } = context;
60
+ const {
61
+ action: bannerMicrolearningAction,
62
+ oldSwitchValue
63
+ } = bannerMicrolearning;
60
64
  const [isDescriptionTruncated, setIsDescriptionTruncated] = (0, _react.useState)(false);
61
65
  const [showMore, setShowMore] = (0, _react.useState)(false);
62
66
  const handleShowMore = (0, _react.useCallback)(() => setShowMore(!showMore), [setShowMore, showMore]);
@@ -115,7 +119,11 @@ const PlaylistDetail = (props, context) => {
115
119
  content: playlistCourses,
116
120
  filters: filters,
117
121
  sorting: sorting,
118
- bannerMicrolearningRuleAction: bannerMicrolearningRuleAction
122
+ bannerMicrolearning: {
123
+ type: 'playlist',
124
+ action: bannerMicrolearningAction,
125
+ oldSwitchValue
126
+ }
119
127
  })));
120
128
  };
121
129
 
@@ -137,7 +145,10 @@ PlaylistDetail.propTypes = process.env.NODE_ENV !== "production" ? {
137
145
  sorting: _propTypes.default.shape(_select.default.propTypes),
138
146
  onBackClick: _propTypes.default.func,
139
147
  onContinueLearningClick: _propTypes.default.func,
140
- bannerMicrolearningRuleAction: _propTypes.default.func
148
+ bannerMicrolearning: {
149
+ action: _propTypes.default.func,
150
+ oldSwitchValue: _propTypes.default.bool
151
+ }
141
152
  } : {};
142
153
  var _default = PlaylistDetail;
143
154
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["PlaylistDetail","props","context","title","coverImages","playlistRef","description","ongoingCoursesAvailable","playlistCourses","filters","sorting","onBackClick","onContinueLearningClick","bannerMicrolearningRuleAction","descriptionRef","useRef","translate","isDescriptionTruncated","setIsDescriptionTruncated","useState","showMore","setShowMore","handleShowMore","useCallback","useEffect","current","clientHeight","scrollHeight","Description","classnames","style","truncate","backgroundContainer","container","backButton","ctaContainer","coverWrapper","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, useEffect, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isNil} from 'lodash/fp';\nimport Markdown from 'markdown-to-jsx';\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 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 bannerMicrolearningRuleAction = null\n } = props;\n const descriptionRef = useRef(null);\n const {translate} = context;\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 return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={playlistRef}>\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.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 {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.continueLearningButton}>\n <ContinueLearningButton\n ongoingCoursesAvailable={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n </div>\n <AllCourses\n content={playlistCourses}\n filters={filters}\n sorting={sorting}\n bannerMicrolearningRuleAction={bannerMicrolearningRuleAction}\n />\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: PropT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":["PlaylistDetail","props","context","title","coverImages","playlistRef","description","ongoingCoursesAvailable","playlistCourses","filters","sorting","onBackClick","onContinueLearningClick","bannerMicrolearning","descriptionRef","useRef","translate","action","bannerMicrolearningAction","oldSwitchValue","isDescriptionTruncated","setIsDescriptionTruncated","useState","showMore","setShowMore","handleShowMore","useCallback","useEffect","current","clientHeight","scrollHeight","Description","classnames","style","truncate","backgroundContainer","container","backButton","ctaContainer","coverWrapper","showMoreWrapper","faSize","wrapperSize","continueLearningButton","type","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, useEffect, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isNil} from 'lodash/fp';\nimport Markdown from 'markdown-to-jsx';\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 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 bannerMicrolearning = {}\n } = props;\n const descriptionRef = useRef(null);\n const {translate} = context;\n const {action: bannerMicrolearningAction, oldSwitchValue} = bannerMicrolearning;\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 return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={playlistRef}>\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.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 {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.continueLearningButton}>\n <ContinueLearningButton\n ongoingCoursesAvailable={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n </div>\n <AllCourses\n content={playlistCourses}\n filters={filters}\n sorting={sorting}\n bannerMicrolearning={{\n type: 'playlist',\n action: bannerMicrolearningAction,\n oldSwitchValue\n }}\n />\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 bannerMicrolearning: {\n action: PropTypes.func,\n oldSwitchValue: PropTypes.bool\n }\n};\n\nexport default PlaylistDetail;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,cAAc,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACzC,MAAM;IACJC,KADI;IAEJC,WAFI;IAGJC,WAHI;IAIJC,WAJI;IAKJC,uBALI;IAMJC,eANI;IAOJC,OAPI;IAQJC,OARI;IASJC,WATI;IAUJC,uBAVI;IAWJC,mBAAmB,GAAG;EAXlB,IAYFZ,KAZJ;EAaA,MAAMa,cAAc,GAAG,IAAAC,aAAA,EAAO,IAAP,CAAvB;EACA,MAAM;IAACC;EAAD,IAAcd,OAApB;EACA,MAAM;IAACe,MAAM,EAAEC,yBAAT;IAAoCC;EAApC,IAAsDN,mBAA5D;EAEA,MAAM,CAACO,sBAAD,EAAyBC,yBAAzB,IAAsD,IAAAC,eAAA,EAAS,KAAT,CAA5D;EACA,MAAM,CAACC,QAAD,EAAWC,WAAX,IAA0B,IAAAF,eAAA,EAAS,KAAT,CAAhC;EAEA,MAAMG,cAAc,GAAG,IAAAC,kBAAA,EAAY,MAAMF,WAAW,CAAC,CAACD,QAAF,CAA7B,EAA0C,CAACC,WAAD,EAAcD,QAAd,CAA1C,CAAvB;EAEA,IAAAI,gBAAA,EAAU,MAAM;IACd,IAAIb,cAAc,CAACc,OAAnB,EAA4B;MAC1B,MAAM;QAACC,YAAY,GAAG,CAAhB;QAAmBC,YAAY,GAAG;MAAlC,IAAuChB,cAAc,CAACc,OAA5D;MACAP,yBAAyB,CAACS,YAAY,GAAGD,YAAhB,CAAzB;IACD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BM,6BAAhB,CAAlB;EAFc,CAAhB,CAPgB;EAWzBpD,OAAO,EAAEwC,kBAAA,CAAUM,KAAV,CAAgBO,eAAA,CAAOd,SAAvB,CAXgB;EAYzBtC,WAAW,EAAEuC,kBAAA,CAAUS,IAZE;EAazB/C,uBAAuB,EAAEsC,kBAAA,CAAUS,IAbV;EAczB9C,mBAAmB,EAAE;IACnBI,MAAM,EAAEiC,kBAAA,CAAUS,IADC;IAEnBxC,cAAc,EAAE+B,kBAAA,CAAUK;EAFP;AAdI,CAA3B;eAoBevD,c"}
@@ -74,7 +74,11 @@ declare namespace AllCourses {
74
74
  'aria-label': PropTypes.Requireable<string>;
75
75
  'aria-labelledby': PropTypes.Requireable<string>;
76
76
  }>>;
77
- const bannerMicrolearningRuleAction: PropTypes.Requireable<(...args: any[]) => any>;
77
+ const bannerMicrolearning: PropTypes.Requireable<PropTypes.InferProps<{
78
+ type: PropTypes.Requireable<string>;
79
+ action: PropTypes.Requireable<(...args: any[]) => any>;
80
+ oldSwitchValue: PropTypes.Requireable<boolean>;
81
+ }>>;
78
82
  }
79
83
  }
80
84
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"all-courses.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/all-courses.js"],"names":[],"mappings":";AAiDA,mEA0IC"}
1
+ {"version":3,"file":"all-courses.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/all-courses.js"],"names":[],"mappings":";AAiDA,mEAgJC"}
@@ -3,6 +3,8 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
5
 
6
+ var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
7
+
6
8
  var _isNil2 = _interopRequireDefault(require("lodash/fp/isNil"));
7
9
 
8
10
  var _size2 = _interopRequireDefault(require("lodash/fp/size"));
@@ -87,12 +89,15 @@ FilterButton.propTypes = process.env.NODE_ENV !== "production" ? {
87
89
  } : {};
88
90
 
89
91
  const AllCourses = (props, context) => {
92
+ const {
93
+ translate
94
+ } = context;
90
95
  const {
91
96
  content,
92
97
  filters,
93
98
  sorting,
94
99
  totalContents,
95
- bannerMicrolearningRuleAction
100
+ bannerMicrolearning = {}
96
101
  } = props;
97
102
  const {
98
103
  options,
@@ -103,8 +108,10 @@ const AllCourses = (props, context) => {
103
108
  loading
104
109
  } = content;
105
110
  const {
106
- translate
107
- } = context;
111
+ type: bannerMessageType,
112
+ action: bannerAction,
113
+ oldSwitchValue
114
+ } = bannerMicrolearning;
108
115
  const [showCompleted, setShowCompleted] = (0, _react.useState)(true);
109
116
  const [searchValue, setSearchValue] = (0, _react.useState)('');
110
117
  const sortView = sorting !== undefined ? /*#__PURE__*/_react.default.createElement("div", {
@@ -157,15 +164,16 @@ const AllCourses = (props, context) => {
157
164
  onChange: handleShowCompletedToggle
158
165
  }), sortView ? /*#__PURE__*/_react.default.createElement("div", {
159
166
  className: _allCourses.default.sortWrapper
160
- }, translate('sort_by'), sortView) : null)), bannerMicrolearningRuleAction ? /*#__PURE__*/_react.default.createElement("div", {
167
+ }, translate('sort_by'), sortView) : null)), !(0, _isEmpty2.default)(bannerMicrolearning) ? /*#__PURE__*/_react.default.createElement("div", {
161
168
  className: _allCourses.default.bannerWrapper
162
169
  }, /*#__PURE__*/_react.default.createElement(_banner.default, {
163
170
  type: "info",
164
- message: translate('banner_microlearning_rule_message'),
171
+ message: bannerMessageType === 'skill' ? translate('banner_microlearning_rule_message_skill') : translate('banner_microlearning_rule_message'),
165
172
  cta: [{
166
173
  type: 'switch',
167
174
  label: translate('banner_microlearning_rule_label'),
168
- action: bannerMicrolearningRuleAction
175
+ action: bannerAction,
176
+ oldSwitchValue
169
177
  }]
170
178
  })) : null, /*#__PURE__*/_react.default.createElement("div", {
171
179
  className: _allCourses.default.filterWrapper
@@ -224,7 +232,11 @@ AllCourses.propTypes = process.env.NODE_ENV !== "production" ? {
224
232
  options: _propTypes.default.arrayOf(_propTypes.default.shape(_select.SelectOptionPropTypes))
225
233
  }),
226
234
  sorting: _propTypes.default.shape(_select.default.propTypes),
227
- bannerMicrolearningRuleAction: _propTypes.default.func
235
+ bannerMicrolearning: _propTypes.default.shape({
236
+ type: _propTypes.default.oneOf(['skill', 'playlist']),
237
+ action: _propTypes.default.func,
238
+ oldSwitchValue: _propTypes.default.bool
239
+ })
228
240
  } : {};
229
241
  var _default = AllCourses;
230
242
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"all-courses.js","names":["uncappedMap","convert","cap","FilterButton","props","context","dataName","ariaLabel","selected","label","onClick","skin","primarySkinColor","buttonProps","customStyle","backgroundColor","color","transition","width","contextTypes","Provider","childContextTypes","translate","propTypes","PropTypes","string","bool","func","AllCourses","content","filters","sorting","totalContents","bannerMicrolearningRuleAction","options","onChange","list","loading","showCompleted","setShowCompleted","useState","searchValue","setSearchValue","sortView","undefined","filteredContent","useMemo","course","progress","contentResult","skill","searchValueIncluded","title","handleSearch","useCallback","value","handleSearchReset","handleShowCompletedToggle","prevShowCompleted","style","continueLearningWrapper","continueLearningTitle","continueLearningNumber","searchAndSortSection","searchWrapper","placeholder","sortSection","sortWrapper","bannerWrapper","type","action","filterWrapper","filterProps","index","name","handleFilterChange","filterButtonWrapper","divider","justifyContent","emptySearchResultContainer","emptySearchResultTitle","emptySearchResultDescription","emptySearchResultClearSearch","shape","CardsGrid","number","arrayOf","SelectOptionPropTypes","Select"],"sources":["../../../src/template/skill-detail/all-courses.js"],"sourcesContent":["import React, {useState, useCallback, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, filter, map, size, isNil} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport SearchForm from '../../molecule/search-form';\nimport CardsGrid from '../../organism/cards-grid';\nimport searchValueIncluded from '../../util/search-value-included';\nimport InputSwitch from '../../atom/input-switch';\nimport Banner from '../../molecule/banner';\nimport style from './all-courses.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst FilterButton = (props, context) => {\n const {dataName, ariaLabel, selected, label, onClick} = props;\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const buttonProps = {\n customStyle: {\n backgroundColor: selected ? primarySkinColor : '#E1E1E3',\n color: selected ? '#FFFFFF' : '#515161',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n },\n label,\n onClick,\n 'data-name': dataName,\n 'aria-label': ariaLabel\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nFilterButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nFilterButton.propTypes = {\n dataName: PropTypes.string,\n ariaLabel: PropTypes.string,\n selected: PropTypes.bool,\n label: PropTypes.string,\n onClick: PropTypes.func\n};\n\nconst AllCourses = (props, context) => {\n const {content, filters, sorting, totalContents, bannerMicrolearningRuleAction} = props;\n const {options, onChange} = filters;\n const {list, loading} = content;\n const {translate} = context;\n const [showCompleted, setShowCompleted] = useState(true);\n const [searchValue, setSearchValue] = useState('');\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 filteredContent = useMemo(() => {\n return showCompleted ? list : filter(course => course.progress < 1, list);\n }, [list, showCompleted]);\n\n const contentResult = useMemo(() => {\n return filter(skill => searchValueIncluded(skill.title, searchValue), filteredContent);\n }, [filteredContent, searchValue]);\n\n const handleSearch = useCallback(\n value => {\n setSearchValue(value);\n },\n [setSearchValue]\n );\n\n const handleSearchReset = useCallback(() => {\n setSearchValue('');\n }, [setSearchValue]);\n\n const handleShowCompletedToggle = useCallback(() => {\n setShowCompleted(prevShowCompleted => !prevShowCompleted);\n }, []);\n\n return (\n <>\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('all_content')}</span>\n <span className={style.continueLearningNumber}>\n {isNil(totalContents) ? size(contentResult) : totalContents}\n </span>\n </div>\n <div className={style.searchAndSortSection}>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_place_holder'),\n value: searchValue,\n onChange: handleSearch\n }}\n onReset={handleSearchReset}\n dataTestId=\"all-courses-search-input\"\n />\n </div>\n <div className={style.sortSection}>\n <InputSwitch\n id={'show-completed-courses-switch'}\n type=\"switch\"\n name={translate('show_completed')}\n title={translate('show_completed')}\n aria-label={'Show completed courses aria label'}\n value={showCompleted}\n onChange={handleShowCompletedToggle}\n />\n {sortView ? (\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n ) : null}\n </div>\n </div>\n {bannerMicrolearningRuleAction ? (\n <div className={style.bannerWrapper}>\n <Banner\n type=\"info\"\n message={translate('banner_microlearning_rule_message')}\n cta={[\n {\n type: 'switch',\n label: translate('banner_microlearning_rule_label'),\n action: bannerMicrolearningRuleAction\n }\n ]}\n />\n </div>\n ) : null}\n <div className={style.filterWrapper}>\n {size(options) > 2\n ? uncappedMap((filterProps, index) => {\n const {name, value, selected} = filterProps;\n\n function handleFilterChange() {\n onChange(value);\n }\n\n return (\n <div key={index} className={style.filterButtonWrapper}>\n <FilterButton\n dataName={`filter-button-${value}`}\n ariaLabel={`Filter by ${name}`}\n selected={selected}\n label={name}\n onClick={handleFilterChange}\n />\n {value === 'ALL' ? <div className={style.divider} /> : null}\n </div>\n );\n }, options)\n : null}\n </div>\n <div>\n {size(contentResult) ? (\n <CardsGrid\n list={contentResult}\n loading={loading}\n customStyle={{justifyContent: 'left'}}\n />\n ) : (\n <div className={style.emptySearchResultContainer}>\n <div className={style.emptySearchResultTitle}>\n {translate('empty_search_result_title', {searchValue})}\n </div>\n <div className={style.emptySearchResultDescription}>\n {translate('empty_search_result_description')}\n </div>\n <div className={style.emptySearchResultClearSearch} onClick={handleSearchReset}>\n {translate('empty_search_result_clear_search')}\n </div>\n </div>\n )}\n </div>\n </>\n );\n};\n\nAllCourses.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nAllCourses.propTypes = {\n content: PropTypes.shape(CardsGrid.propTypes),\n totalContents: 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 bannerMicrolearningRuleAction: PropTypes.func\n};\n\nexport default AllCourses;\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,WAAW,GAAG,cAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,CAApB;;AAEA,MAAMC,YAAY,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACvC,MAAM;IAACC,QAAD;IAAWC,SAAX;IAAsBC,QAAtB;IAAgCC,KAAhC;IAAuCC;EAAvC,IAAkDN,KAAxD;EACA,MAAM;IAACO;EAAD,IAASN,OAAf;EACA,MAAMO,gBAAgB,GAAG,mBAAI,gBAAJ,EAAsBD,IAAtB,CAAzB;EAEA,MAAME,WAAW,GAAG;IAClBC,WAAW,EAAE;MACXC,eAAe,EAAEP,QAAQ,GAAGI,gBAAH,GAAsB,SADpC;MAEXI,KAAK,EAAER,QAAQ,GAAG,SAAH,GAAe,SAFnB;MAGXS,UAAU,EAAE,6DAHD;MAIXC,KAAK,EAAE;IAJI,CADK;IAOlBT,KAPkB;IAQlBC,OARkB;IASlB,aAAaJ,QATK;IAUlB,cAAcC;EAVI,CAApB;EAaA,oBAAO,6BAAC,mBAAD,EAAgBM,WAAhB,CAAP;AACD,CAnBD;;AAqBAV,YAAY,CAACgB,YAAb,GAA4B;EAC1BR,IAAI,EAAES,iBAAA,CAASC,iBAAT,CAA2BV,IADP;EAE1BW,SAAS,EAAEF,iBAAA,CAASC,iBAAT,CAA2BC;AAFZ,CAA5B;AAKAnB,YAAY,CAACoB,SAAb,2CAAyB;EACvBjB,QAAQ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courses.js","names":["uncappedMap","convert","cap","FilterButton","props","context","dataName","ariaLabel","selected","label","onClick","skin","primarySkinColor","buttonProps","customStyle","backgroundColor","color","transition","width","contextTypes","Provider","childContextTypes","translate","propTypes","PropTypes","string","bool","func","AllCourses","content","filters","sorting","totalContents","bannerMicrolearning","options","onChange","list","loading","type","bannerMessageType","action","bannerAction","oldSwitchValue","showCompleted","setShowCompleted","useState","searchValue","setSearchValue","sortView","undefined","filteredContent","useMemo","course","progress","contentResult","skill","searchValueIncluded","title","handleSearch","useCallback","value","handleSearchReset","handleShowCompletedToggle","prevShowCompleted","style","continueLearningWrapper","continueLearningTitle","continueLearningNumber","searchAndSortSection","searchWrapper","placeholder","sortSection","sortWrapper","bannerWrapper","filterWrapper","filterProps","index","name","handleFilterChange","filterButtonWrapper","divider","justifyContent","emptySearchResultContainer","emptySearchResultTitle","emptySearchResultDescription","emptySearchResultClearSearch","shape","CardsGrid","number","arrayOf","SelectOptionPropTypes","Select","oneOf"],"sources":["../../../src/template/skill-detail/all-courses.js"],"sourcesContent":["import React, {useState, useCallback, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, filter, map, size, isNil, isEmpty} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport SearchForm from '../../molecule/search-form';\nimport CardsGrid from '../../organism/cards-grid';\nimport searchValueIncluded from '../../util/search-value-included';\nimport InputSwitch from '../../atom/input-switch';\nimport Banner from '../../molecule/banner';\nimport style from './all-courses.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst FilterButton = (props, context) => {\n const {dataName, ariaLabel, selected, label, onClick} = props;\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const buttonProps = {\n customStyle: {\n backgroundColor: selected ? primarySkinColor : '#E1E1E3',\n color: selected ? '#FFFFFF' : '#515161',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n },\n label,\n onClick,\n 'data-name': dataName,\n 'aria-label': ariaLabel\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nFilterButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nFilterButton.propTypes = {\n dataName: PropTypes.string,\n ariaLabel: PropTypes.string,\n selected: PropTypes.bool,\n label: PropTypes.string,\n onClick: PropTypes.func\n};\n\nconst AllCourses = (props, context) => {\n const {translate} = context;\n const {content, filters, sorting, totalContents, bannerMicrolearning = {}} = props;\n const {options, onChange} = filters;\n const {list, loading} = content;\n const {type: bannerMessageType, action: bannerAction, oldSwitchValue} = bannerMicrolearning;\n const [showCompleted, setShowCompleted] = useState(true);\n const [searchValue, setSearchValue] = useState('');\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 filteredContent = useMemo(() => {\n return showCompleted ? list : filter(course => course.progress < 1, list);\n }, [list, showCompleted]);\n\n const contentResult = useMemo(() => {\n return filter(skill => searchValueIncluded(skill.title, searchValue), filteredContent);\n }, [filteredContent, searchValue]);\n\n const handleSearch = useCallback(\n value => {\n setSearchValue(value);\n },\n [setSearchValue]\n );\n\n const handleSearchReset = useCallback(() => {\n setSearchValue('');\n }, [setSearchValue]);\n\n const handleShowCompletedToggle = useCallback(() => {\n setShowCompleted(prevShowCompleted => !prevShowCompleted);\n }, []);\n\n return (\n <>\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('all_content')}</span>\n <span className={style.continueLearningNumber}>\n {isNil(totalContents) ? size(contentResult) : totalContents}\n </span>\n </div>\n <div className={style.searchAndSortSection}>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_place_holder'),\n value: searchValue,\n onChange: handleSearch\n }}\n onReset={handleSearchReset}\n dataTestId=\"all-courses-search-input\"\n />\n </div>\n <div className={style.sortSection}>\n <InputSwitch\n id={'show-completed-courses-switch'}\n type=\"switch\"\n name={translate('show_completed')}\n title={translate('show_completed')}\n aria-label={'Show completed courses aria label'}\n value={showCompleted}\n onChange={handleShowCompletedToggle}\n />\n {sortView ? (\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n ) : null}\n </div>\n </div>\n {!isEmpty(bannerMicrolearning) ? (\n <div className={style.bannerWrapper}>\n <Banner\n type=\"info\"\n message={\n bannerMessageType === 'skill'\n ? translate('banner_microlearning_rule_message_skill')\n : translate('banner_microlearning_rule_message')\n }\n cta={[\n {\n type: 'switch',\n label: translate('banner_microlearning_rule_label'),\n action: bannerAction,\n oldSwitchValue\n }\n ]}\n />\n </div>\n ) : null}\n <div className={style.filterWrapper}>\n {size(options) > 2\n ? uncappedMap((filterProps, index) => {\n const {name, value, selected} = filterProps;\n\n function handleFilterChange() {\n onChange(value);\n }\n\n return (\n <div key={index} className={style.filterButtonWrapper}>\n <FilterButton\n dataName={`filter-button-${value}`}\n ariaLabel={`Filter by ${name}`}\n selected={selected}\n label={name}\n onClick={handleFilterChange}\n />\n {value === 'ALL' ? <div className={style.divider} /> : null}\n </div>\n );\n }, options)\n : null}\n </div>\n <div>\n {size(contentResult) ? (\n <CardsGrid\n list={contentResult}\n loading={loading}\n customStyle={{justifyContent: 'left'}}\n />\n ) : (\n <div className={style.emptySearchResultContainer}>\n <div className={style.emptySearchResultTitle}>\n {translate('empty_search_result_title', {searchValue})}\n </div>\n <div className={style.emptySearchResultDescription}>\n {translate('empty_search_result_description')}\n </div>\n <div className={style.emptySearchResultClearSearch} onClick={handleSearchReset}>\n {translate('empty_search_result_clear_search')}\n </div>\n </div>\n )}\n </div>\n </>\n );\n};\n\nAllCourses.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nAllCourses.propTypes = {\n content: PropTypes.shape(CardsGrid.propTypes),\n totalContents: 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 bannerMicrolearning: PropTypes.shape({\n type: PropTypes.oneOf(['skill', 'playlist']),\n action: PropTypes.func,\n oldSwitchValue: PropTypes.bool\n })\n};\n\nexport default AllCourses;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,WAAW,GAAG,cAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,CAApB;;AAEA,MAAMC,YAAY,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACvC,MAAM;IAACC,QAAD;IAAWC,SAAX;IAAsBC,QAAtB;IAAgCC,KAAhC;IAAuCC;EAAvC,IAAkDN,KAAxD;EACA,MAAM;IAACO;EAAD,IAASN,OAAf;EACA,MAAMO,gBAAgB,GAAG,mBAAI,gBAAJ,EAAsBD,IAAtB,CAAzB;EAEA,MAAME,WAAW,GAAG;IAClBC,WAAW,EAAE;MACXC,eAAe,EAAEP,QAAQ,GAAGI,gBAAH,GAAsB,SADpC;MAEXI,KAAK,EAAER,QAAQ,GAAG,SAAH,GAAe,SAFnB;MAGXS,UAAU,EAAE,6DAHD;MAIXC,KAAK,EAAE;IAJI,CADK;IAOlBT,KAPkB;IAQlBC,OARkB;IASlB,aAAaJ,QATK;IAUlB,cAAcC;EAVI,CAApB;EAaA,oBAAO,6BAAC,mBAAD,EAAgBM,WAAhB,CAAP;AACD,CAnBD;;AAqBAV,YAAY,CAACgB,YAAb,GAA4B;EAC1BR,IAAI,EAAES,iBAAA,CAASC,iBAAT,CAA2BV,IADP;EAE1BW,SAAS,EAAEF,iBAAA,CAASC,iBAAT,CAA2BC;AAFZ,CAA5B;AAKAnB,YAAY,CAACoB,SAAb,2CAAyB;EACvBjB,QAAQ,EAAEkB,kBAAA,CAAUC,MADG;EAEvBlB,SAAS,EAAEiB,kBAAA,C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,kBAAA,CAAU8D,KAAV,CAAgBK,eAAA,CAAOpE,SAAvB,CAPY;EAQrBU,mBAAmB,EAAET,kBAAA,CAAU8D,KAAV,CAAgB;IACnChD,IAAI,EAAEd,kBAAA,CAAUoE,KAAV,CAAgB,CAAC,OAAD,EAAU,UAAV,CAAhB,CAD6B;IAEnCpD,MAAM,EAAEhB,kBAAA,CAAUG,IAFiB;IAGnCe,cAAc,EAAElB,kBAAA,CAAUE;EAHS,CAAhB;AARA,CAAvB;eAeeE,U"}
@@ -123,7 +123,10 @@ declare namespace SkillDetail {
123
123
  export const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
124
124
  export const onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
125
125
  export const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
126
- export const bannerMicrolearningRuleAction: PropTypes.Requireable<(...args: any[]) => any>;
126
+ export namespace bannerMicrolearning {
127
+ const action: PropTypes.Requireable<(...args: any[]) => any>;
128
+ const oldSwitchValue: PropTypes.Requireable<boolean>;
129
+ }
127
130
  }
128
131
  export { propTypes_1 as propTypes };
129
132
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":"AAeO,8EA+BN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYD,oEAqJC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":"AAeO,8EA+BN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYD,oEA0JC"}
@@ -96,7 +96,7 @@ const SkillDetail = (props, context) => {
96
96
  onBackClick,
97
97
  onReviewClick,
98
98
  onContinueLearningClick,
99
- bannerMicrolearningRuleAction = null
99
+ bannerMicrolearning = {}
100
100
  } = props;
101
101
  const descriptionRef = (0, _react.useRef)(null);
102
102
  const {
@@ -107,6 +107,10 @@ const SkillDetail = (props, context) => {
107
107
  const {
108
108
  translate
109
109
  } = context;
110
+ const {
111
+ action: bannerMicrolearningAction,
112
+ oldSwitchValue
113
+ } = bannerMicrolearning;
110
114
  const [isDescriptionTruncated, setIsDescriptionTruncated] = (0, _react.useState)(false);
111
115
  const [showMore, setShowMore] = (0, _react.useState)(false);
112
116
  const handleShowMore = (0, _react.useCallback)(() => setShowMore(!showMore), [setShowMore, showMore]);
@@ -203,7 +207,11 @@ const SkillDetail = (props, context) => {
203
207
  filters: filters,
204
208
  sorting: sorting,
205
209
  totalContents: totalContents,
206
- bannerMicrolearningRuleAction: bannerMicrolearningRuleAction
210
+ bannerMicrolearning: {
211
+ type: 'skill',
212
+ action: bannerMicrolearningAction,
213
+ oldSwitchValue
214
+ }
207
215
  })));
208
216
  };
209
217
 
@@ -232,7 +240,10 @@ SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
232
240
  onBackClick: _propTypes.default.func,
233
241
  onReviewClick: _propTypes.default.func,
234
242
  onContinueLearningClick: _propTypes.default.func,
235
- bannerMicrolearningRuleAction: _propTypes.default.func
243
+ bannerMicrolearning: {
244
+ action: _propTypes.default.func,
245
+ oldSwitchValue: _propTypes.default.bool
246
+ }
236
247
  } : {};
237
248
  var _default = SkillDetail;
238
249
  exports.default = _default;
@@ -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","skillIncludedCourses","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","bannerMicrolearningRuleAction","descriptionRef","useRef","score","questionsToReview","totalContents","isDescriptionTruncated","setIsDescriptionTruncated","useState","showMore","setShowMore","handleShowMore","useCallback","useEffect","current","clientHeight","scrollHeight","Description","classnames","style","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButton","ctaContainer","skillFocusBadge","faSize","wrapperSize","showMoreWrapper","ctaWrapper","skillInformation","skillInformationNumber","progressContainer","progressInformationNumber","toFixed","string","isRequired","shape","number","CardsGrid","onChange","options","arrayOf","SelectOptionPropTypes","Select"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState, useRef, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get, isNil} from 'lodash/fp';\nimport Markdown from 'markdown-to-jsx';\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 bannerMicrolearningRuleAction = null\n } = props;\n const descriptionRef = useRef(null);\n const {score = 0, questionsToReview, totalContents} = metrics;\n const {translate} = context;\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 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 {!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>\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 {isDescriptionTruncated ? (\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 {questionsToReview > 0 ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n &nbsp;{translate('skill_chart_side_panel_questions_to_review')}\n </div>\n ) : null}\n <div className={style.progressContainer}>\n <ProgressBar />\n <span className={style.progressInformationNumber}>{score.toFixed(1)}%</span>\n </div>\n <AllCourses\n content={skillIncludedCourses}\n filters={filters}\n sorting={sorting}\n totalContents={totalContents}\n bannerMicrolearningRuleAction={bannerMicrolearningRuleAction}\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 questionsToReview: PropTypes.number,\n totalContents: 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 bannerMicrolearningRuleAction: PropTypes.func\n};\n\nexport default SkillDetail;\n"],"mappings":";;;;;;;;;AAAA;;AAC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AAUE,IAlBD;EAmBtBY,aAAa,EAAEd,kBAAA,CAAUE,IAnBH;EAoBtBa,uBAAuB,EAAEf,kBAAA,CAAUE,IApBb;EAqBtBc,6BAA6B,EAAEhB,kBAAA,CAAUE;AArBnB,CAAxB;eAwBeC,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","bannerMicrolearning","descriptionRef","useRef","score","questionsToReview","totalContents","action","bannerMicrolearningAction","oldSwitchValue","isDescriptionTruncated","setIsDescriptionTruncated","useState","showMore","setShowMore","handleShowMore","useCallback","useEffect","current","clientHeight","scrollHeight","Description","classnames","style","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButton","ctaContainer","skillFocusBadge","faSize","wrapperSize","showMoreWrapper","ctaWrapper","skillInformation","skillInformationNumber","progressContainer","progressInformationNumber","toFixed","type","string","isRequired","shape","number","CardsGrid","onChange","options","arrayOf","SelectOptionPropTypes","Select"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState, useRef, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get, isNil} from 'lodash/fp';\nimport Markdown from 'markdown-to-jsx';\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 bannerMicrolearning = {}\n } = props;\n const descriptionRef = useRef(null);\n const {score = 0, questionsToReview, totalContents} = metrics;\n const {translate} = context;\n const {action: bannerMicrolearningAction, oldSwitchValue} = bannerMicrolearning;\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 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 {!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>\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 {isDescriptionTruncated ? (\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 {questionsToReview > 0 ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n &nbsp;{translate('skill_chart_side_panel_questions_to_review')}\n </div>\n ) : null}\n <div className={style.progressContainer}>\n <ProgressBar />\n <span className={style.progressInformationNumber}>{score.toFixed(1)}%</span>\n </div>\n <AllCourses\n content={skillIncludedCourses}\n filters={filters}\n sorting={sorting}\n totalContents={totalContents}\n bannerMicrolearning={{\n type: 'skill',\n action: bannerMicrolearningAction,\n oldSwitchValue\n }}\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 questionsToReview: PropTypes.number,\n totalContents: 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 bannerMicrolearning: {\n action: PropTypes.func,\n oldSwitchValue: PropTypes.bool\n }\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,a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learning_rule_message": "5'Learning do not count towards the learning priorities and have been hidden.",
19
- "banner_microlearning_rule_label": "Show 5'Learning",
18
+ "banner_microlearning_rule_message": "5&#39;Učenje se ne ubraja u prioritete učenja i skriveno je.",
19
+ "banner_microlearning_rule_message_skill": "Tvojih 5'Learning se ne računa u napredak vještina i sakriveno je.",
20
+ "banner_microlearning_rule_label": "Prikaži 5&#39;Učenje",
20
21
  "bonus_stars": "Bonus zvjezdice",
21
22
  "certificates": "Certifikati",
22
23
  "certificate(s)": "certifikat(i)",
@@ -29,7 +30,7 @@
29
30
  "items": "stavke",
30
31
  "certificate": "Certifikat",
31
32
  "certification": "Certifikacija",
32
- "certification_progress_wrapper_subtitle": "To unlock your rewards, reach the following goal",
33
+ "certification_progress_wrapper_subtitle": "Da biste otključali svoje nagrade, dostignite sljedeći cilj",
33
34
  "chapters": "poglavlja",
34
35
  "Close": "Zatvori",
35
36
  "clue_stars_to_loose_plural": "Otključavanje traga smanjuje broj zvijezda koje možete dobiti za ovo pitanje za {{count}} (ako tačno odgovorite)",
@@ -46,10 +47,10 @@
46
47
  "learning_priority_modal_title": "Novi prioritet učenja",
47
48
  "learning_priority_modal_description": "Kreirajte prioritet učenja odabirom jedne vještine, liste za reprodukciju ili certifikata.",
48
49
  "locked": "Zaključano",
49
- "icon_picker_title": "Change icon",
50
- "icon_picker_description": "Select a new icon for your skill",
51
- "translation_title": "Translate",
52
- "translation_description": "Manage translations to reach more learners",
50
+ "icon_picker_title": "Promijeni ikonu",
51
+ "icon_picker_description": "Odaberite novu ikonu za svoju vještinu",
52
+ "translation_title": "Prevedi",
53
+ "translation_description": "Upravljajte prijevodima kako biste dosegli više učenika",
53
54
  "skills_change_focus": "Promijenite fokus vještina",
54
55
  "skills_choose_focus": "Odaberite fokus",
55
56
  "cancel": "Otkaži",
@@ -15,8 +15,9 @@
15
15
  "Back to Dashboard Home": "Zpět na domovskou stránku ovládacího panelu",
16
16
  "back_to_catalog": "Zpět na kurzy",
17
17
  "badge": "Odznak",
18
- "banner_microlearning_rule_message": "5'Learning do not count towards the learning priorities and have been hidden.",
19
- "banner_microlearning_rule_label": "Show 5'Learning",
18
+ "banner_microlearning_rule_message": "5minutové učení se nezapočítává do vzdělávacích priorit a bylo skryto.",
19
+ "banner_microlearning_rule_message_skill": "Tvých 5'Learning se nepočítá do pokroku dovedností a bylo skryto.",
20
+ "banner_microlearning_rule_label": "Zobrazit 5minutové učení",
20
21
  "bonus_stars": "Bonusové hvězdy",
21
22
  "certificates": "Certifikáty",
22
23
  "certificate(s)": "certifikát(y)",
@@ -48,8 +49,8 @@
48
49
  "locked": "Uzamčeno",
49
50
  "icon_picker_title": "Ikona změny",
50
51
  "icon_picker_description": "Vyberte novou ikonu pro svou dovednost",
51
- "translation_title": "Translate",
52
- "translation_description": "Manage translations to reach more learners",
52
+ "translation_title": "Přeložit",
53
+ "translation_description": "Spravujte překlady, abyste oslovili více studentů",
53
54
  "skills_change_focus": "Změnit zaměření dovednosti",
54
55
  "skills_choose_focus": "Vyberte své zaměření",
55
56
  "cancel": "Zrušit",
@@ -15,8 +15,9 @@
15
15
  "Back to Dashboard Home": "Zurück zur Startseite des Dashboards",
16
16
  "back_to_catalog": "Zurück zu den Kursen",
17
17
  "badge": "Abzeichen",
18
- "banner_microlearning_rule_message": "5'Learning do not count towards the learning priorities and have been hidden.",
19
- "banner_microlearning_rule_label": "Show 5'Learning",
18
+ "banner_microlearning_rule_message": "5'Learning zählt nicht zu den Lernprioritäten und wurde ausgeblendet.",
19
+ "banner_microlearning_rule_message_skill": "Dein 5'Learning zählt nicht zum Fortschritt der Fähigkeiten und wurde ausgeblendet.",
20
+ "banner_microlearning_rule_label": "5'Learning anzeigen",
20
21
  "bonus_stars": "Bonussterne",
21
22
  "certificates": "Zertifikate",
22
23
  "certificate(s)": "Zertifikat(e)",
@@ -48,8 +49,8 @@
48
49
  "locked": "Gesperrt",
49
50
  "icon_picker_title": "Symbol „Ändern“",
50
51
  "icon_picker_description": "Wählen Sie ein neues Symbol für Ihre Fertigkeit",
51
- "translation_title": "Translate",
52
- "translation_description": "Manage translations to reach more learners",
52
+ "translation_title": "Übersetzen",
53
+ "translation_description": "Verwalten Sie Übersetzungen, um mehr Lernende zu erreichen",
53
54
  "skills_change_focus": "Fähigkeitsfokus ändern",
54
55
  "skills_choose_focus": "Wählen Sie Ihren Fokus",
55
56
  "cancel": "Abbrechen",
@@ -16,6 +16,7 @@
16
16
  "back_to_catalog": "Back to courses",
17
17
  "badge": "Badge",
18
18
  "banner_microlearning_rule_message": "5'Learning do not count towards the learning priorities and have been hidden.",
19
+ "banner_microlearning_rule_message_skill": "5'Learning do not count towards skill progress and have been hidden.",
19
20
  "banner_microlearning_rule_label": "Show 5'Learning",
20
21
  "bonus_stars": "Bonus stars",
21
22
  "certificates": "Certificates",
@@ -15,8 +15,9 @@
15
15
  "Back to Dashboard Home": "Volver al panel de inicio",
16
16
  "back_to_catalog": "Volver a los cursos",
17
17
  "badge": "Insignia",
18
- "banner_microlearning_rule_message": "5'Learning do not count towards the learning priorities and have been hidden.",
19
- "banner_microlearning_rule_label": "Show 5'Learning",
18
+ "banner_microlearning_rule_message": "5'Learning no cuenta para las prioridades de aprendizaje y han sido ocultados.",
19
+ "banner_microlearning_rule_message_skill": "Tu 5'Learning no cuenta en el progreso de las habilidades y ha sido ocultado.",
20
+ "banner_microlearning_rule_label": "Mostrar 5'Learning",
20
21
  "bonus_stars": "Estrellas extra",
21
22
  "certificates": "Certificados",
22
23
  "certificate(s)": "certificado(s)",
@@ -48,8 +49,8 @@
48
49
  "locked": "Bloqueado",
49
50
  "icon_picker_title": "Cambiar icono",
50
51
  "icon_picker_description": "Selecciona un nuevo icono para tu habilidad",
51
- "translation_title": "Translate",
52
- "translation_description": "Manage translations to reach more learners",
52
+ "translation_title": "Traducción",
53
+ "translation_description": "Gestione las traducciones para aumentar el número de alumnos",
53
54
  "skills_change_focus": "Cambiar enfoque de habilidades",
54
55
  "skills_choose_focus": "Elige el enfoque que te interese",
55
56
  "cancel": "Cancelar",