@coorpacademy/components 11.32.35-alpha.6 → 11.32.35

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 (44) hide show
  1. package/es/molecule/discipline-associated-skills/index.d.ts +0 -1
  2. package/es/molecule/discipline-associated-skills/index.d.ts.map +1 -1
  3. package/es/molecule/discipline-associated-skills/index.js +3 -8
  4. package/es/molecule/discipline-associated-skills/index.js.map +1 -1
  5. package/es/molecule/progress-wrapper/index.d.ts +5 -4
  6. package/es/molecule/progress-wrapper/index.d.ts.map +1 -1
  7. package/es/molecule/progress-wrapper/index.js +28 -14
  8. package/es/molecule/progress-wrapper/index.js.map +1 -1
  9. package/es/molecule/progress-wrapper/style.css +25 -3
  10. package/es/template/certification-detail/index.d.ts +46 -6
  11. package/es/template/certification-detail/index.d.ts.map +1 -1
  12. package/es/template/certification-detail/index.js +40 -22
  13. package/es/template/certification-detail/index.js.map +1 -1
  14. package/es/template/certification-detail/style.css +12 -1
  15. package/es/template/common/discipline/index.d.ts +0 -1
  16. package/es/template/common/discipline/index.d.ts.map +1 -1
  17. package/es/template/common/discipline/index.js +2 -6
  18. package/es/template/common/discipline/index.js.map +1 -1
  19. package/es/template/skill-detail/all-courses.d.ts.map +1 -1
  20. package/es/template/skill-detail/all-courses.js +2 -2
  21. package/es/template/skill-detail/all-courses.js.map +1 -1
  22. package/lib/molecule/discipline-associated-skills/index.d.ts +0 -1
  23. package/lib/molecule/discipline-associated-skills/index.d.ts.map +1 -1
  24. package/lib/molecule/discipline-associated-skills/index.js +3 -8
  25. package/lib/molecule/discipline-associated-skills/index.js.map +1 -1
  26. package/lib/molecule/progress-wrapper/index.d.ts +5 -4
  27. package/lib/molecule/progress-wrapper/index.d.ts.map +1 -1
  28. package/lib/molecule/progress-wrapper/index.js +29 -14
  29. package/lib/molecule/progress-wrapper/index.js.map +1 -1
  30. package/lib/molecule/progress-wrapper/style.css +25 -3
  31. package/lib/template/certification-detail/index.d.ts +46 -6
  32. package/lib/template/certification-detail/index.d.ts.map +1 -1
  33. package/lib/template/certification-detail/index.js +41 -22
  34. package/lib/template/certification-detail/index.js.map +1 -1
  35. package/lib/template/certification-detail/style.css +12 -1
  36. package/lib/template/common/discipline/index.d.ts +0 -1
  37. package/lib/template/common/discipline/index.d.ts.map +1 -1
  38. package/lib/template/common/discipline/index.js +2 -6
  39. package/lib/template/common/discipline/index.js.map +1 -1
  40. package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
  41. package/lib/template/skill-detail/all-courses.js +2 -2
  42. package/lib/template/skill-detail/all-courses.js.map +1 -1
  43. package/locales/en/global.json +0 -1
  44. package/package.json +2 -2
@@ -10,7 +10,6 @@ declare namespace DisciplineAssociatedSkills {
10
10
  locale: PropTypes.Requireable<string>;
11
11
  focused: PropTypes.Requireable<boolean>;
12
12
  }> | null | undefined)[]>;
13
- const skillsBaseUrl: PropTypes.Requireable<string>;
14
13
  const onSkillClick: PropTypes.Requireable<(...args: any[]) => any>;
15
14
  }
16
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-associated-skills/index.js"],"names":[],"mappings":";AAUA,0FAgFC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-associated-skills/index.js"],"names":[],"mappings":";AAUA,0FAyEC"}
@@ -15,10 +15,8 @@ const DisciplineAssociatedSkills = (props, context) => {
15
15
  } = context;
16
16
  const {
17
17
  skills = [],
18
- skillsBaseUrl,
19
18
  onSkillClick
20
19
  } = props;
21
- const hrefFormat = useCallback(skill => skillsBaseUrl ? `${skillsBaseUrl}/${skill.ref}` : '', [skillsBaseUrl]);
22
20
  const AnchorElement = useCallback(skill => /*#__PURE__*/React.createElement("div", {
23
21
  className: style.chipFocusedContent
24
22
  }, skill.focused ? /*#__PURE__*/React.createElement(Icon, {
@@ -41,9 +39,8 @@ const DisciplineAssociatedSkills = (props, context) => {
41
39
  }, /*#__PURE__*/React.createElement("div", {
42
40
  className: style.chipsWrapper
43
41
  }, skills.map(skill => {
44
- function handleSkillClick(event) {
45
- if (!skillsBaseUrl) event.preventDefault();
46
- onSkillClick();
42
+ function handleSkillClick() {
43
+ onSkillClick(skill.ref);
47
44
  }
48
45
 
49
46
  function handleAnchorElement() {
@@ -54,8 +51,7 @@ const DisciplineAssociatedSkills = (props, context) => {
54
51
  return TooltipContentElement(skill);
55
52
  }
56
53
 
57
- return /*#__PURE__*/React.createElement("a", {
58
- href: hrefFormat(skill),
54
+ return /*#__PURE__*/React.createElement("div", {
59
55
  key: _uniqueId(),
60
56
  className: classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused),
61
57
  onClick: handleSkillClick
@@ -80,7 +76,6 @@ DisciplineAssociatedSkills.propTypes = process.env.NODE_ENV !== "production" ? {
80
76
  locale: PropTypes.string,
81
77
  focused: PropTypes.bool
82
78
  })),
83
- skillsBaseUrl: PropTypes.string,
84
79
  onSkillClick: PropTypes.func
85
80
  } : {};
86
81
  export default DisciplineAssociatedSkills;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","PropTypes","classnames","Icon","ToolTip","Provider","CatalogSection","style","DisciplineAssociatedSkills","props","context","translate","skills","skillsBaseUrl","onSkillClick","hrefFormat","skill","ref","AnchorElement","chipFocusedContent","focused","faSize","wrapperSize","chipFocusedContentText","locale","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","event","preventDefault","handleAnchorElement","handleTooltipContentElement","chipWrapper","chipWrapperFocused","infoIconTooltip","tooltipSkillFocused","tooltip","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","bool","func"],"sources":["../../../src/molecule/discipline-associated-skills/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isEmpty, uniqueId} from 'lodash/fp';\nimport Icon from '../../atom/icon';\nimport ToolTip from '../../atom/tooltip';\nimport Provider from '../../atom/provider';\nimport CatalogSection from '../../atom/catalog-section';\nimport style from './style.css';\n\nconst DisciplineAssociatedSkills = (props, context) => {\n const {translate} = context;\n\n const {skills = [], skillsBaseUrl, onSkillClick} = props;\n\n const hrefFormat = useCallback(\n skill => (skillsBaseUrl ? `${skillsBaseUrl}/${skill.ref}` : ''),\n [skillsBaseUrl]\n );\n\n const AnchorElement = useCallback(\n skill => (\n <div className={style.chipFocusedContent}>\n {skill.focused ? (\n <Icon\n iconName=\"bullseye-arrow\"\n size={{\n faSize: 12,\n wrapperSize: 12\n }}\n />\n ) : null}\n <div className={style.chipFocusedContentText}>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n const TooltipContentElement = useCallback(\n skill => (\n <div className={style.tooltipContentWrapper}>\n {skill.focused ? (\n <div>\n <b>{translate('skill_focused_chip_tooltip')}</b>\n </div>\n ) : null}\n <div>{skill.locale}</div>\n </div>\n ),\n [translate]\n );\n\n return !isEmpty(skills) ? (\n <div data-name=\"discipline-associated-skills\" className={style.associatedSkillsWrapper}>\n <CatalogSection title={translate('associated_skills')}>\n <div className={style.chipsWrapper}>\n {skills.map(skill => {\n function handleSkillClick(event) {\n if (!skillsBaseUrl) event.preventDefault();\n onSkillClick();\n }\n function handleAnchorElement() {\n return AnchorElement(skill);\n }\n function handleTooltipContentElement() {\n return TooltipContentElement(skill);\n }\n return (\n <a\n href={hrefFormat(skill)}\n key={uniqueId()}\n className={classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused)}\n onClick={handleSkillClick}\n >\n <ToolTip\n AnchorElement={handleAnchorElement}\n fontSize={12}\n delayHide={0}\n iconContainerClassName={style.infoIconTooltip}\n tooltipClassName={skill.focused ? style.tooltipSkillFocused : style.tooltip}\n TooltipContent={handleTooltipContentElement}\n closeToolTipInformationTextAriaLabel={translate('close_tooltip_information')}\n />\n </a>\n );\n })}\n </div>\n </CatalogSection>\n </div>\n ) : null;\n};\n\nDisciplineAssociatedSkills.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDisciplineAssociatedSkills.propTypes = {\n skills: PropTypes.arrayOf(\n PropTypes.shape({\n ref: PropTypes.string,\n locale: PropTypes.string,\n focused: PropTypes.bool\n })\n ),\n skillsBaseUrl: PropTypes.string,\n onSkillClick: PropTypes.func\n};\n\nexport default DisciplineAssociatedSkills;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,OAAP,MAAoB,oBAApB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,cAAP,MAA2B,4BAA3B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,0BAA0B,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrD,MAAM;IAACC;EAAD,IAAcD,OAApB;EAEA,MAAM;IAACE,MAAM,GAAG,EAAV;IAAcC,aAAd;IAA6BC;EAA7B,IAA6CL,KAAnD;EAEA,MAAMM,UAAU,GAAGf,WAAW,CAC5BgB,KAAK,IAAKH,aAAa,GAAI,GAAEA,aAAc,IAAGG,KAAK,CAACC,GAAI,EAAjC,GAAqC,EADhC,EAE5B,CAACJ,aAAD,CAF4B,CAA9B;EAKA,MAAMK,aAAa,GAAGlB,WAAW,CAC/BgB,KAAK,iBACH;IAAK,SAAS,EAAET,KAAK,CAACY;EAAtB,GACGH,KAAK,CAACI,OAAN,gBACC,oBAAC,IAAD;IACE,QAAQ,EAAC,gBADX;IAEE,IAAI,EAAE;MACJC,MAAM,EAAE,EADJ;MAEJC,WAAW,EAAE;IAFT;EAFR,EADD,GAQG,IATN,eAUE;IAAK,SAAS,EAAEf,KAAK,CAACgB;EAAtB,GAA+CP,KAAK,CAACQ,MAArD,CAVF,CAF6B,EAe/B,EAf+B,CAAjC;EAkBA,MAAMC,qBAAqB,GAAGzB,WAAW,CACvCgB,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E,oCAAoC,EAAEvB,SAAS,CAAC,2BAAD;IAPjD,EANF,CADF;EAkBD,CA7BA,CADH,CADF,CADF,CADK,GAqCH,IArCJ;AAsCD,CAhFD;;AAkFAH,0BAA0B,CAACgC,YAA3B,GAA0C;EACxC7B,SAAS,EAAEN,QAAQ,CAACoC,iBAAT,CAA2B9B;AADE,CAA1C;AAIAH,0BAA0B,CAACkC,SAA3B,2CAAuC;EACrC9B,MAAM,EAAEX,SAAS,CAAC0C,OAAV,CACN1C,SAAS,CAAC2C,KAAV,CAAgB;IACd3B,GAAG,EAAEhB,SAAS,CAAC4C,MADD;IAEdrB,MAAM,EAAEvB,SAAS,CAAC4C,MAFJ;IAGdzB,OAAO,EAAEnB,SAAS,CAAC6C;EAHL,CAAhB,CADM,CAD6B;EAQrCjC,aAAa,EAAEZ,SAAS,CAAC4C,MARY;EASrC/B,YAAY,EAAEb,SAAS,CAAC8C;AATa,CAAvC;AAYA,eAAevC,0BAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","PropTypes","classnames","Icon","ToolTip","Provider","CatalogSection","style","DisciplineAssociatedSkills","props","context","translate","skills","onSkillClick","AnchorElement","skill","chipFocusedContent","focused","faSize","wrapperSize","chipFocusedContentText","locale","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","ref","handleAnchorElement","handleTooltipContentElement","chipWrapper","chipWrapperFocused","infoIconTooltip","tooltipSkillFocused","tooltip","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","bool","func"],"sources":["../../../src/molecule/discipline-associated-skills/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isEmpty, uniqueId} from 'lodash/fp';\nimport Icon from '../../atom/icon';\nimport ToolTip from '../../atom/tooltip';\nimport Provider from '../../atom/provider';\nimport CatalogSection from '../../atom/catalog-section';\nimport style from './style.css';\n\nconst DisciplineAssociatedSkills = (props, context) => {\n const {translate} = context;\n\n const {skills = [], onSkillClick} = props;\n\n const AnchorElement = useCallback(\n skill => (\n <div className={style.chipFocusedContent}>\n {skill.focused ? (\n <Icon\n iconName=\"bullseye-arrow\"\n size={{\n faSize: 12,\n wrapperSize: 12\n }}\n />\n ) : null}\n <div className={style.chipFocusedContentText}>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n const TooltipContentElement = useCallback(\n skill => (\n <div className={style.tooltipContentWrapper}>\n {skill.focused ? (\n <div>\n <b>{translate('skill_focused_chip_tooltip')}</b>\n </div>\n ) : null}\n <div>{skill.locale}</div>\n </div>\n ),\n [translate]\n );\n\n return !isEmpty(skills) ? (\n <div data-name=\"discipline-associated-skills\" className={style.associatedSkillsWrapper}>\n <CatalogSection title={translate('associated_skills')}>\n <div className={style.chipsWrapper}>\n {skills.map(skill => {\n function handleSkillClick() {\n onSkillClick(skill.ref);\n }\n function handleAnchorElement() {\n return AnchorElement(skill);\n }\n function handleTooltipContentElement() {\n return TooltipContentElement(skill);\n }\n return (\n <div\n key={uniqueId()}\n className={classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused)}\n onClick={handleSkillClick}\n >\n <ToolTip\n AnchorElement={handleAnchorElement}\n fontSize={12}\n delayHide={0}\n iconContainerClassName={style.infoIconTooltip}\n tooltipClassName={skill.focused ? style.tooltipSkillFocused : style.tooltip}\n TooltipContent={handleTooltipContentElement}\n closeToolTipInformationTextAriaLabel={translate('close_tooltip_information')}\n />\n </div>\n );\n })}\n </div>\n </CatalogSection>\n </div>\n ) : null;\n};\n\nDisciplineAssociatedSkills.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDisciplineAssociatedSkills.propTypes = {\n skills: PropTypes.arrayOf(\n PropTypes.shape({\n ref: PropTypes.string,\n locale: PropTypes.string,\n focused: PropTypes.bool\n })\n ),\n onSkillClick: PropTypes.func\n};\n\nexport default DisciplineAssociatedSkills;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OA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AWA,eAAenC,0BAAf"}
@@ -1,7 +1,7 @@
1
1
  export default ProgressWrapper;
2
- declare function ProgressWrapper({ completedModules, mandatoryModules, title, subtitle, progression, sections }: {
2
+ declare function ProgressWrapper({ completedCourses, completedModules, title, subtitle, progression, sections }: {
3
+ completedCourses: any;
3
4
  completedModules: any;
4
- mandatoryModules: any;
5
5
  title: any;
6
6
  subtitle: any;
7
7
  progression: any;
@@ -14,12 +14,13 @@ declare namespace ProgressWrapper {
14
14
  namespace propTypes {
15
15
  const title: PropTypes.Requireable<string>;
16
16
  const subtitle: PropTypes.Requireable<string>;
17
+ const completedCourses: PropTypes.Requireable<number>;
17
18
  const completedModules: PropTypes.Requireable<number>;
18
- const mandatoryModules: PropTypes.Requireable<number>;
19
19
  const progression: PropTypes.Requireable<number>;
20
20
  const sections: PropTypes.Requireable<(PropTypes.InferProps<{
21
21
  type: PropTypes.Requireable<string>;
22
- downloadUrl: PropTypes.Requireable<string>;
22
+ badgeUrl: PropTypes.Requireable<string>;
23
+ onDownload: PropTypes.Requireable<(...args: any[]) => any>;
23
24
  stars: PropTypes.Requireable<number>;
24
25
  }> | null | undefined)[]>;
25
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";AA6FA;;;;;;;8BAuDC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";AAyFA;;;;;;;8BA8DC"}
@@ -1,4 +1,5 @@
1
1
  import _map from "lodash/fp/map";
2
+ import _lowerCase from "lodash/fp/lowerCase";
2
3
  import _isEmpty from "lodash/fp/isEmpty";
3
4
 
4
5
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -23,7 +24,8 @@ const DetailSection = ({
23
24
  index,
24
25
  type,
25
26
  isLocked,
26
- downloadUrl,
27
+ badgeUrl,
28
+ onDownload,
27
29
  stars
28
30
  }, context) => {
29
31
  const {
@@ -32,10 +34,7 @@ const DetailSection = ({
32
34
  const isTypeStars = type === 'stars';
33
35
  const DownloadButton = /*#__PURE__*/React.createElement(ButtonLink, {
34
36
  label: translate('download'),
35
- link: {
36
- target: '_blank',
37
- href: downloadUrl
38
- },
37
+ onClick: onDownload,
39
38
  "data-name": "download-button",
40
39
  "aria-label": "download button",
41
40
  customStyle: {
@@ -87,7 +86,7 @@ const DetailSection = ({
87
86
  className: style[`detailsSection${index}`]
88
87
  }, /*#__PURE__*/React.createElement("img", {
89
88
  className: style.img,
90
- src: type === 'badge' ? downloadUrl : 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'
89
+ src: badgeUrl || 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'
91
90
  }), /*#__PURE__*/React.createElement("div", {
92
91
  className: style.detailsInfo
93
92
  }, /*#__PURE__*/React.createElement("div", {
@@ -100,8 +99,8 @@ const DetailSection = ({
100
99
  };
101
100
 
102
101
  const ProgressWrapper = ({
102
+ completedCourses,
103
103
  completedModules,
104
- mandatoryModules,
105
104
  title,
106
105
  subtitle,
107
106
  progression,
@@ -110,7 +109,7 @@ const ProgressWrapper = ({
110
109
  const {
111
110
  translate
112
111
  } = context;
113
- const mandatoryCompletedModulesLocal = translate('modules_completed_mandatory');
112
+ const modulesCompletedLocal = translate('modules_completed');
114
113
  const isLocked = progression !== 100;
115
114
  return /*#__PURE__*/React.createElement("div", {
116
115
  className: style.container
@@ -127,7 +126,13 @@ const ProgressWrapper = ({
127
126
  className: style.stats
128
127
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
129
128
  className: style.statsNumber
130
- }, `${completedModules > mandatoryModules ? mandatoryModules : completedModules} / ${mandatoryModules}`), mandatoryCompletedModulesLocal)), /*#__PURE__*/React.createElement("div", {
129
+ }, completedCourses), _lowerCase(translate('courses_completed'))), /*#__PURE__*/React.createElement("div", {
130
+ className: style.divider
131
+ }), /*#__PURE__*/React.createElement("div", {
132
+ className: style.statsModule
133
+ }, /*#__PURE__*/React.createElement("span", {
134
+ className: style.statsNumber
135
+ }, completedModules), modulesCompletedLocal)), /*#__PURE__*/React.createElement("div", {
131
136
  className: style.progression
132
137
  }, /*#__PURE__*/React.createElement("span", {
133
138
  className: style.statsNumber
@@ -140,19 +145,27 @@ const ProgressWrapper = ({
140
145
  value: progression,
141
146
  max: 100
142
147
  }), /*#__PURE__*/React.createElement("div", {
148
+ className: style.statsMobile
149
+ }, /*#__PURE__*/React.createElement("div", {
150
+ className: style.statsModuleMobile
151
+ }, /*#__PURE__*/React.createElement("span", {
152
+ className: style.statsNumber
153
+ }, completedModules), modulesCompletedLocal), /*#__PURE__*/React.createElement("div", {
143
154
  className: style.statsProgressionMobile
144
155
  }, /*#__PURE__*/React.createElement("span", {
145
156
  className: style.statsNumber
146
- }, progression, "%")), _isEmpty(sections) ? null : /*#__PURE__*/React.createElement("div", {
157
+ }, progression, "%"))), _isEmpty(sections) ? null : /*#__PURE__*/React.createElement("div", {
147
158
  className: style.details
148
159
  }, uncappedMap(({
149
160
  type,
150
161
  stars,
151
- downloadUrl
162
+ badgeUrl,
163
+ onDownload
152
164
  }, index) => /*#__PURE__*/React.createElement(DetailSection, {
153
165
  type,
154
166
  isLocked,
155
- downloadUrl,
167
+ badgeUrl,
168
+ onDownload,
156
169
  stars,
157
170
  key: `${type}-${index}`,
158
171
  index: index
@@ -161,7 +174,8 @@ const ProgressWrapper = ({
161
174
 
162
175
  const commonDetailSectionPropTypes = process.env.NODE_ENV !== "production" ? {
163
176
  type: PropTypes.oneOf(['diploma', 'badge', 'stars']),
164
- downloadUrl: PropTypes.string,
177
+ badgeUrl: PropTypes.string,
178
+ onDownload: PropTypes.func,
165
179
  stars: PropTypes.number
166
180
  } : {};
167
181
  DetailSection.contextTypes = {
@@ -177,8 +191,8 @@ ProgressWrapper.contextTypes = {
177
191
  ProgressWrapper.propTypes = process.env.NODE_ENV !== "production" ? {
178
192
  title: PropTypes.string,
179
193
  subtitle: PropTypes.string,
194
+ completedCourses: PropTypes.number,
180
195
  completedModules: PropTypes.number,
181
- mandatoryModules: PropTypes.number,
182
196
  progression: PropTypes.number,
183
197
  sections: PropTypes.arrayOf(PropTypes.shape(commonDetailSectionPropTypes))
184
198
  } : {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","Title","ProgressBar","COLORS","Tag","ButtonLink","Icon","Provider","style","uncappedMap","convert","cap","DetailSection","index","type","isLocked","downloadUrl","stars","context","translate","isTypeStars","DownloadButton","target","href","backgroundColor","color","position","faIcon","name","size","customStyle","padding","LockedTag","iconName","iconColor","preset","detailsInfo","detailsInfoText","detailsTitle","img","buttonContainer","ProgressWrapper","completedModules","mandatoryModules","title","subtitle","progression","sections","mandatoryCompletedModulesLocal","container","titleContainer","statscontainer","stats","statsNumber","customProgressBar","positive","statsProgressionMobile","details","commonDetailSectionPropTypes","oneOf","string","number","contextTypes","childContextTypes","propTypes","bool","arrayOf","shape"],"sources":["../../../src/molecule/progress-wrapper/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map} from 'lodash/fp';\nimport Title from '../../atom/title';\nimport ProgressBar from '../progress-bar';\nimport {COLORS} from '../../variables/colors';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport Provider from '../../atom/provider';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst DetailSection = ({index, type, isLocked, downloadUrl, stars}, context) => {\n const {translate} = context;\n const isTypeStars = type === 'stars';\n\n const DownloadButton = (\n <ButtonLink\n label={translate('download')}\n link={{\n target: '_blank',\n href: downloadUrl\n }}\n data-name=\"download-button\"\n aria-label=\"download button\"\n customStyle={{backgroundColor: '#F1F6FE', color: '#0061FF'}}\n icon={{\n position: 'left',\n faIcon: {\n name: 'download',\n color: '#0061FF',\n size: 14,\n customStyle: {padding: 0}\n }\n }}\n disabled={isLocked}\n />\n );\n\n const LockedTag = (\n <Tag\n label=\"Locked\"\n size=\"S\"\n icon={{\n position: 'left',\n iconName: 'lock',\n iconColor: '#515161',\n preset: 's',\n customStyle: {padding: 0}\n }}\n />\n );\n\n return isTypeStars ? (\n <div className={style[`detailsSection${index}`]}>\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>{translate('bonus_stars')}</span>\n {isLocked ? LockedTag : null}\n </div>\n <div className={style.stars}>\n <Icon iconName=\"star\" iconColor=\"#FFCE0A\" backgroundColor=\"#FFF9D1\" preset=\"xl\" />\n <span>{stars}</span>\n </div>\n </div>\n </div>\n ) : (\n <div className={style[`detailsSection${index}`]}>\n <img\n className={style.img}\n src={\n type === 'badge'\n ? downloadUrl\n : 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'\n }\n />\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>\n {type === 'diploma' ? translate('diploma') : translate('badge')}\n </span>\n {isLocked ? LockedTag : null}\n </div>\n\n <div className={style.buttonContainer}>{DownloadButton}</div>\n </div>\n </div>\n );\n};\n\nconst ProgressWrapper = (\n {completedModules, mandatoryModules, title, subtitle, progression, sections},\n context\n) => {\n const {translate} = context;\n const mandatoryCompletedModulesLocal = translate('modules_completed_mandatory');\n const isLocked = progression !== 100;\n\n return (\n <div className={style.container}>\n <div className={style.titleContainer}>\n <Title type=\"form-group\" titleSize=\"medium\" title={title} subtitle={subtitle} />\n </div>\n <div className={style.statscontainer}>\n <div className={style.stats}>\n <div>\n <span className={style.statsNumber}>\n {`${\n completedModules > mandatoryModules ? mandatoryModules : completedModules\n } / ${mandatoryModules}`}\n </span>\n {mandatoryCompletedModulesLocal}\n </div>\n </div>\n <div className={style.progression}>\n <span className={style.statsNumber}>{progression}%</span>\n </div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progression}\n max={100}\n />\n <div className={style.statsProgressionMobile}>\n <span className={style.statsNumber}>{progression}%</span>\n </div>\n\n {isEmpty(sections) ? null : (\n <div className={style.details}>\n {uncappedMap(\n ({type, stars, downloadUrl}, index) => (\n <DetailSection\n {...{type, isLocked, downloadUrl, stars}}\n key={`${type}-${index}`}\n index={index}\n />\n ),\n sections\n )}\n </div>\n )}\n </div>\n );\n};\n\nconst commonDetailSectionPropTypes = {\n type: PropTypes.oneOf(['diploma', 'badge', 'stars']),\n downloadUrl: PropTypes.string,\n stars: PropTypes.number\n};\n\nDetailSection.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDetailSection.propTypes = {\n index: PropTypes.number,\n isLocked: PropTypes.bool,\n ...commonDetailSectionPropTypes\n};\n\nProgressWrapper.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nProgressWrapper.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n completedModules: PropTypes.number,\n mandatoryModules: PropTypes.number,\n progression: PropTypes.number,\n sections: PropTypes.arrayOf(PropTypes.shape(commonDetailSectionPropTypes))\n};\n\nexport default ProgressWrapper;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,SAAQC,MAAR,QAAqB,wBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,QAAP,MAAqB,qBAArB,C,CACA;;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,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HT,EAFQ,EAQVkC,QARU,CADd,CA/BJ,CADF;AA+CD,CAvDD;;AAyDA,MAAMW,4BAAN,2CAAqC;EACnC5C,IAAI,EAAEd,SAAS,CAAC2D,KAAV,CAAgB,CAAC,SAAD,EAAY,OAAZ,EAAqB,OAArB,CAAhB,CAD6B;EAEnC3C,WAAW,EAAEhB,SAAS,CAAC4D,MAFY;EAGnC3C,KAAK,EAAEjB,SAAS,CAAC6D;AAHkB,CAArC;AAMAjD,aAAa,CAACkD,YAAd,GAA6B;EAC3B3C,SAAS,EAAEZ,QAAQ,CAACwD,iBAAT,CAA2B5C;AADX,CAA7B;AAIAP,aAAa,CAACoD,SAAd;EACEnD,KAAK,EAAEb,SAAS,CAAC6D,MADnB;EAEE9C,QAAQ,EAAEf,SAAS,CAACiE;AAFtB,GAGKP,4BAHL;AAMAjB,eAAe,CAACqB,YAAhB,GAA+B;EAC7B3C,SAAS,EAAEZ,QAAQ,CAACwD,iBAAT,CAA2B5C;AADT,CAA/B;AAIAsB,eAAe,CAACuB,SAAhB,2CAA4B;EAC1BpB,KAAK,EAAE5C,SAAS,CAAC4D,MADS;EAE1Bf,QAAQ,EAAE7C,SAAS,CAAC4D,MAFM;EAG1BlB,gBAAgB,EAAE1C,SAAS,CAAC6D,MAHF;EAI1BlB,gBAAgB,EAAE3C,SAAS,CAAC6D,MAJF;EAK1Bf,WAAW,EAAE9C,SAAS,CAAC6D,MALG;EAM1Bd,QAAQ,EAAE/C,SAAS,CAACkE,OAAV,CAAkBlE,SAAS,CAACmE,KAAV,CAAgBT,4BAAhB,CAAlB;AANgB,CAA5B;AASA,eAAejB,eAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","Title","ProgressBar","COLORS","Tag","ButtonLink","Icon","Provider","style","uncappedMap","convert","cap","DetailSection","index","type","isLocked","badgeUrl","onDownload","stars","context","translate","isTypeStars","DownloadButton","backgroundColor","color","position","faIcon","name","size","customStyle","padding","LockedTag","iconName","iconColor","preset","detailsInfo","detailsInfoText","detailsTitle","img","buttonContainer","ProgressWrapper","completedCourses","completedModules","title","subtitle","progression","sections","modulesCompletedLocal","container","titleContainer","statscontainer","stats","statsNumber","divider","statsModule","customProgressBar","positive","statsMobile","statsModuleMobile","statsProgressionMobile","details","commonDetailSectionPropTypes","oneOf","string","func","number","contextTypes","childContextTypes","propTypes","bool","arrayOf","shape"],"sources":["../../../src/molecule/progress-wrapper/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, lowerCase, map} from 'lodash/fp';\nimport Title from '../../atom/title';\nimport ProgressBar from '../progress-bar';\nimport {COLORS} from '../../variables/colors';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport Provider from '../../atom/provider';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst DetailSection = ({index, type, isLocked, badgeUrl, onDownload, stars}, context) => {\n const {translate} = context;\n const isTypeStars = type === 'stars';\n\n const DownloadButton = (\n <ButtonLink\n label={translate('download')}\n onClick={onDownload}\n data-name=\"download-button\"\n aria-label=\"download button\"\n customStyle={{backgroundColor: '#F1F6FE', color: '#0061FF'}}\n icon={{\n position: 'left',\n faIcon: {\n name: 'download',\n color: '#0061FF',\n size: 14,\n customStyle: {padding: 0}\n }\n }}\n disabled={isLocked}\n />\n );\n\n const LockedTag = (\n <Tag\n label=\"Locked\"\n size=\"S\"\n icon={{\n position: 'left',\n iconName: 'lock',\n iconColor: '#515161',\n preset: 's',\n customStyle: {padding: 0}\n }}\n />\n );\n\n return isTypeStars ? (\n <div className={style[`detailsSection${index}`]}>\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>{translate('bonus_stars')}</span>\n {isLocked ? LockedTag : null}\n </div>\n <div className={style.stars}>\n <Icon iconName=\"star\" iconColor=\"#FFCE0A\" backgroundColor=\"#FFF9D1\" preset=\"xl\" />\n <span>{stars}</span>\n </div>\n </div>\n </div>\n ) : (\n <div className={style[`detailsSection${index}`]}>\n <img\n className={style.img}\n src={\n badgeUrl ||\n 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'\n }\n />\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>\n {type === 'diploma' ? translate('diploma') : translate('badge')}\n </span>\n {isLocked ? LockedTag : null}\n </div>\n\n <div className={style.buttonContainer}>{DownloadButton}</div>\n </div>\n </div>\n );\n};\n\nconst ProgressWrapper = (\n {completedCourses, completedModules, title, subtitle, progression, sections},\n context\n) => {\n const {translate} = context;\n const modulesCompletedLocal = translate('modules_completed');\n const isLocked = progression !== 100;\n\n return (\n <div className={style.container}>\n <div className={style.titleContainer}>\n <Title type=\"form-group\" titleSize=\"medium\" title={title} subtitle={subtitle} />\n </div>\n <div className={style.statscontainer}>\n <div className={style.stats}>\n <div>\n <span className={style.statsNumber}>{completedCourses}</span>\n {lowerCase(translate('courses_completed'))}\n </div>\n <div className={style.divider} />\n <div className={style.statsModule}>\n <span className={style.statsNumber}>{completedModules}</span>\n {modulesCompletedLocal}\n </div>\n </div>\n <div className={style.progression}>\n <span className={style.statsNumber}>{progression}%</span>\n </div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progression}\n max={100}\n />\n <div className={style.statsMobile}>\n <div className={style.statsModuleMobile}>\n <span className={style.statsNumber}>{completedModules}</span>\n {modulesCompletedLocal}\n </div>\n <div className={style.statsProgressionMobile}>\n <span className={style.statsNumber}>{progression}%</span>\n </div>\n </div>\n\n {isEmpty(sections) ? null : (\n <div className={style.details}>\n {uncappedMap(\n ({type, stars, badgeUrl, onDownload}, index) => (\n <DetailSection\n {...{type, isLocked, badgeUrl, onDownload, stars}}\n key={`${type}-${index}`}\n index={index}\n />\n ),\n sections\n )}\n </div>\n )}\n </div>\n );\n};\n\nconst commonDetailSectionPropTypes = {\n type: PropTypes.oneOf(['diploma', 'badge', 'stars']),\n badgeUrl: PropTypes.string,\n onDownload: PropTypes.func,\n stars: PropTypes.number\n};\n\nDetailSection.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDetailSection.propTypes = {\n index: PropTypes.number,\n isLocked: PropTypes.bool,\n ...commonDetailSectionPropTypes\n};\n\nProgressWrapper.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nProgressWrapper.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n completedCourses: PropTypes.number,\n completedModules: PropTypes.number,\n progression: PropTypes.number,\n sections: PropTypes.arrayOf(PropTypes.shape(commonDetailSectionPropTypes))\n};\n\nexport default ProgressWrapper;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,SAAQC,MAAR,QAAqB,wBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,QAAP,MAAqB,qBAArB,C,CACA;;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,KAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,CAApB;;AAEA,MAAMC,aAAa,GAAG,CAAC;EAACC,KAAD;EAAQC,IAAR;EAAcC,QAAd;EAAwBC,QAAxB;EAAkCC,UAAlC;EAA8CC;AAA9C,CAAD,EAAuDC,OAAvD,KAAmE;EACvF,MAAM;IAACC;EAAD,IAAcD,OAApB;EACA,MAAME,WAAW,GAAGP,IAAI,KAAK,OAA7B;EAEA,MAAMQ,cAAc,gBAClB,oBAAC,UAAD;IACE,KAAK,EAAEF,SAAS,CAAC,UAAD,CADlB;IAEE,OAAO,EAAEH,UAFX;I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Ed,SAAS,CAAC8D,KAAV,CAAgB,CAAC,SAAD,EAAY,OAAZ,EAAqB,OAArB,CAAhB,CAD6B;EAEnC9C,QAAQ,EAAEhB,SAAS,CAAC+D,MAFe;EAGnC9C,UAAU,EAAEjB,SAAS,CAACgE,IAHa;EAInC9C,KAAK,EAAElB,SAAS,CAACiE;AAJkB,CAArC;AAOArD,aAAa,CAACsD,YAAd,GAA6B;EAC3B9C,SAAS,EAAEb,QAAQ,CAAC4D,iBAAT,CAA2B/C;AADX,CAA7B;AAIAR,aAAa,CAACwD,SAAd;EACEvD,KAAK,EAAEb,SAAS,CAACiE,MADnB;EAEElD,QAAQ,EAAEf,SAAS,CAACqE;AAFtB,GAGKR,4BAHL;AAMArB,eAAe,CAAC0B,YAAhB,GAA+B;EAC7B9C,SAAS,EAAEb,QAAQ,CAAC4D,iBAAT,CAA2B/C;AADT,CAA/B;AAIAoB,eAAe,CAAC4B,SAAhB,2CAA4B;EAC1BzB,KAAK,EAAE3C,SAAS,CAAC+D,MADS;EAE1BnB,QAAQ,EAAE5C,SAAS,CAAC+D,MAFM;EAG1BtB,gBAAgB,EAAEzC,SAAS,CAACiE,MAHF;EAI1BvB,gBAAgB,EAAE1C,SAAS,CAACiE,MAJF;EAK1BpB,WAAW,EAAE7C,SAAS,CAACiE,MALG;EAM1BnB,QAAQ,EAAE9C,SAAS,CAACsE,OAAV,CAAkBtE,SAAS,CAACuE,KAAV,CAAgBV,4BAAhB,CAAlB;AANgB,CAA5B;AASA,eAAerB,eAAf"}
@@ -41,6 +41,14 @@
41
41
  gap: 16px;
42
42
  }
43
43
 
44
+ .divider {
45
+ width: 4px;
46
+ height: 4px;
47
+ background-color: #d7d7da;
48
+ border: solid #d7d7da 1px;
49
+ border-radius: 4px;
50
+ }
51
+
44
52
  .progression {
45
53
  display: flex;
46
54
  justify-content: end;
@@ -121,6 +129,10 @@
121
129
  font-weight: 700;
122
130
  }
123
131
 
132
+ .statsMobile {
133
+ display: none;
134
+ }
135
+
124
136
  .statsModuleMobile {
125
137
  display: none;
126
138
  }
@@ -128,9 +140,6 @@
128
140
  .statsProgressionMobile {
129
141
  composes: progression;
130
142
  display: none;
131
- color: cm_grey_400;
132
- font-weight: 600;
133
- padding-top: 16px;
134
143
  }
135
144
 
136
145
  @media mobile, tablet {
@@ -151,6 +160,12 @@
151
160
  justify-content: space-around;
152
161
  gap: 0;
153
162
  }
163
+ .divider {
164
+ display: none;
165
+ }
166
+ .statsModule {
167
+ display: none;
168
+ }
154
169
  .progression {
155
170
  display: none;
156
171
  }
@@ -160,4 +175,11 @@
160
175
  .statsModuleMobile {
161
176
  display: block;
162
177
  }
178
+ .statsMobile {
179
+ display: flex;
180
+ justify-content: space-between;
181
+ padding-top: 16px;
182
+ color: cm_grey_400;
183
+ font-weight: 600;
184
+ }
163
185
  }
@@ -33,14 +33,21 @@ declare namespace CertificationDetail {
33
33
  const metrics: PropTypes.Requireable<PropTypes.InferProps<{
34
34
  progression: PropTypes.Requireable<number>;
35
35
  stars: PropTypes.Requireable<number>;
36
+ completedCourses: PropTypes.Requireable<number>;
36
37
  completedModules: PropTypes.Requireable<number>;
37
- mandatoryModules: PropTypes.Requireable<number>;
38
- totalModules: PropTypes.Requireable<number>;
39
- totalCourses: PropTypes.Requireable<number>;
40
38
  }>>;
41
- const diplomaUrl: PropTypes.Requireable<string>;
42
- const badgeUrl: PropTypes.Requireable<string>;
43
- const ongoingCoursesAvailable: PropTypes.Requireable<boolean>;
39
+ const onDownloadDiploma: PropTypes.Requireable<(...args: any[]) => any>;
40
+ const badge: PropTypes.Requireable<PropTypes.InferProps<{
41
+ badgeUrl: PropTypes.Requireable<string>;
42
+ onDownloadBadge: PropTypes.Requireable<(...args: any[]) => any>;
43
+ }>>;
44
+ const ongoingCourses: PropTypes.Requireable<PropTypes.InferProps<{
45
+ list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
46
+ customStyle: PropTypes.Requireable<{
47
+ [x: string]: string | null | undefined;
48
+ }>;
49
+ loading: PropTypes.Requireable<boolean>;
50
+ }>>;
44
51
  const certificationCourses: PropTypes.Requireable<PropTypes.InferProps<{
45
52
  list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
46
53
  customStyle: PropTypes.Requireable<{
@@ -48,6 +55,8 @@ declare namespace CertificationDetail {
48
55
  }>;
49
56
  loading: PropTypes.Requireable<boolean>;
50
57
  }>>;
58
+ const totalCourses: PropTypes.Requireable<number>;
59
+ const totalModules: PropTypes.Requireable<number>;
51
60
  const filters: PropTypes.Requireable<PropTypes.InferProps<{
52
61
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
53
62
  options: PropTypes.Requireable<(PropTypes.InferProps<{
@@ -57,6 +66,37 @@ declare namespace CertificationDetail {
57
66
  validOption: PropTypes.Requireable<boolean>;
58
67
  }> | null | undefined)[]>;
59
68
  }>>;
69
+ const sorting: PropTypes.Requireable<PropTypes.InferProps<{
70
+ title: PropTypes.Requireable<string>;
71
+ name: PropTypes.Requireable<string>;
72
+ className: PropTypes.Requireable<string>;
73
+ borderClassName: PropTypes.Requireable<string>;
74
+ disabled: PropTypes.Requireable<boolean>;
75
+ multiple: PropTypes.Requireable<boolean>;
76
+ description: PropTypes.Requireable<string>;
77
+ required: PropTypes.Requireable<boolean>;
78
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
79
+ theme: PropTypes.Requireable<string>;
80
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
81
+ name: PropTypes.Validator<string>;
82
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
83
+ selected: PropTypes.Requireable<boolean>;
84
+ validOption: PropTypes.Requireable<boolean>;
85
+ }> | null | undefined)[]>;
86
+ optgroups: PropTypes.Requireable<(PropTypes.InferProps<{
87
+ label: PropTypes.Validator<string>;
88
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
89
+ name: PropTypes.Validator<string>;
90
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
91
+ selected: PropTypes.Requireable<boolean>;
92
+ validOption: PropTypes.Requireable<boolean>;
93
+ }> | null | undefined)[]>;
94
+ }> | null | undefined)[]>;
95
+ modified: PropTypes.Requireable<boolean>;
96
+ error: PropTypes.Requireable<boolean>;
97
+ 'aria-label': PropTypes.Requireable<string>;
98
+ 'aria-labelledby': PropTypes.Requireable<string>;
99
+ }>>;
60
100
  const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
61
101
  const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
62
102
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certification-detail/index.js"],"names":[],"mappings":";AAiBA,4EAgGC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certification-detail/index.js"],"names":[],"mappings":";AAkBA,4EA8GC"}
@@ -5,11 +5,12 @@ import PropTypes from 'prop-types';
5
5
  import classnames from 'classnames';
6
6
  import Provider from '../../atom/provider';
7
7
  import Tag from '../../atom/tag';
8
- import { SelectOptionPropTypes } from '../../atom/select';
8
+ import Select, { SelectOptionPropTypes } from '../../atom/select';
9
9
  import ButtonLinkIcon from '../../atom/button-link-icon';
10
10
  import Icon from '../../atom/icon';
11
11
  import CardsGrid from '../../organism/cards-grid';
12
12
  import AllCourses from '../skill-detail/all-courses';
13
+ import ContinueLearning from '../skill-detail/continue-learning';
13
14
  import { ContinueLearningButton } from '../skill-detail';
14
15
  import ProgressWrapper from '../../molecule/progress-wrapper';
15
16
  import style from './style.css';
@@ -21,26 +22,31 @@ const CertificationDetail = (props, context) => {
21
22
  title,
22
23
  description,
23
24
  certificationCourses,
24
- ongoingCoursesAvailable,
25
+ ongoingCourses,
26
+ totalCourses,
27
+ totalModules,
25
28
  filters,
29
+ sorting,
26
30
  onBackClick,
27
31
  onContinueLearningClick,
28
32
  metrics,
29
33
  logoUrl,
30
- diplomaUrl,
31
- badgeUrl
34
+ onDownloadDiploma,
35
+ badge = {}
32
36
  } = props;
33
37
  const {
34
38
  translate
35
39
  } = context;
36
40
  const {
37
41
  progression,
42
+ completedCourses,
38
43
  completedModules,
39
- mandatoryModules,
40
- stars,
41
- totalModules,
42
- totalCourses
44
+ stars
43
45
  } = metrics;
46
+ const {
47
+ badgeUrl = false,
48
+ onDownloadBadge
49
+ } = badge;
44
50
  const [showMore, setShowMore] = useState(false);
45
51
  const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);
46
52
  const Description = useCallback(() => {
@@ -82,21 +88,28 @@ const CertificationDetail = (props, context) => {
82
88
  }
83
89
  })) : null) : null, /*#__PURE__*/React.createElement("div", {
84
90
  className: style.contentStats
85
- }, /*#__PURE__*/React.createElement("span", null, `${totalModules} ${_lowerCase(translate('modules'))}`)), /*#__PURE__*/React.createElement(ContinueLearningButton, {
86
- ongoingCoursesAvailable: ongoingCoursesAvailable,
91
+ }, /*#__PURE__*/React.createElement("span", null, `${totalCourses} ${_lowerCase(translate('courses'))}`), /*#__PURE__*/React.createElement("div", {
92
+ className: style.divider
93
+ }), /*#__PURE__*/React.createElement("span", null, `${totalModules} ${_lowerCase(translate('modules'))}`)), /*#__PURE__*/React.createElement(ContinueLearningButton, {
94
+ ongoingCoursesAvailable: !!ongoingCourses.list.length,
87
95
  onClick: onContinueLearningClick
88
- }))), /*#__PURE__*/React.createElement(ProgressWrapper, {
96
+ }))), /*#__PURE__*/React.createElement("div", {
97
+ className: style.continueLearningSection
98
+ }, /*#__PURE__*/React.createElement(ContinueLearning, {
99
+ ongoingCourses: ongoingCourses
100
+ })), /*#__PURE__*/React.createElement(ProgressWrapper, {
89
101
  title: translate('your_progress'),
90
102
  subtitle: translate('certification_progress_wrapper_subtitle'),
91
103
  progression: progression,
104
+ completedCourses: completedCourses,
92
105
  completedModules: completedModules,
93
- mandatoryModules: mandatoryModules,
94
106
  sections: _compact([{
95
107
  type: 'diploma',
96
- downloadUrl: diplomaUrl
108
+ onDownload: () => onDownloadDiploma
97
109
  }, badgeUrl && {
98
110
  type: 'badge',
99
- downloadUrl: badgeUrl
111
+ badgeUrl,
112
+ onDownload: () => onDownloadBadge
100
113
  }, {
101
114
  type: 'stars',
102
115
  stars
@@ -104,7 +117,8 @@ const CertificationDetail = (props, context) => {
104
117
  }), /*#__PURE__*/React.createElement(AllCourses, {
105
118
  courses: certificationCourses,
106
119
  totalCourses: totalCourses,
107
- filters: filters
120
+ filters: filters,
121
+ sorting: sorting
108
122
  })));
109
123
  };
110
124
 
@@ -120,19 +134,23 @@ CertificationDetail.propTypes = process.env.NODE_ENV !== "production" ? {
120
134
  metrics: PropTypes.shape({
121
135
  progression: PropTypes.number,
122
136
  stars: PropTypes.number,
123
- completedModules: PropTypes.number,
124
- mandatoryModules: PropTypes.number,
125
- totalModules: PropTypes.number,
126
- totalCourses: PropTypes.number
137
+ completedCourses: PropTypes.number,
138
+ completedModules: PropTypes.number
139
+ }),
140
+ onDownloadDiploma: PropTypes.func,
141
+ badge: PropTypes.shape({
142
+ badgeUrl: PropTypes.string,
143
+ onDownloadBadge: PropTypes.func
127
144
  }),
128
- diplomaUrl: PropTypes.string,
129
- badgeUrl: PropTypes.string,
130
- ongoingCoursesAvailable: PropTypes.bool,
145
+ ongoingCourses: PropTypes.shape(CardsGrid.propTypes),
131
146
  certificationCourses: PropTypes.shape(CardsGrid.propTypes),
147
+ totalCourses: PropTypes.number,
148
+ totalModules: PropTypes.number,
132
149
  filters: PropTypes.shape({
133
150
  onChange: PropTypes.func,
134
151
  options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))
135
152
  }),
153
+ sorting: PropTypes.shape(Select.propTypes),
136
154
  onBackClick: PropTypes.func,
137
155
  onContinueLearningClick: PropTypes.func
138
156
  } : {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","classnames","Provider","Tag","SelectOptionPropTypes","ButtonLinkIcon","Icon","CardsGrid","AllCourses","ContinueLearningButton","ProgressWrapper","style","DESCRIPTION_BREAKPOINT","CertificationDetail","props","context","certificationRef","title","description","certificationCourses","ongoingCoursesAvailable","filters","onBackClick","onContinueLearningClick","metrics","logoUrl","diplomaUrl","badgeUrl","translate","progression","completedModules","mandatoryModules","stars","totalModules","totalCourses","showMore","setShowMore","handleShowMore","Description","truncate","backgroundContainer","container","backButton","ctaContainer","logoContainer","logo","length","showMoreWrapper","faSize","wrapperSize","contentStats","type","downloadUrl","contextTypes","skin","childContextTypes","propTypes","string","isRequired","shape","number","bool","onChange","func","options","arrayOf"],"sources":["../../../src/template/certification-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {compact, lowerCase} from 'lodash/fp';\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 DESCRIPTION_BREAKPOINT = 382;\n\nconst CertificationDetail = (props, context) => {\n const {\n certificationRef,\n title,\n description,\n certificationCourses,\n ongoingCoursesAvailable,\n filters,\n onBackClick,\n onContinueLearningClick,\n metrics,\n logoUrl,\n diplomaUrl,\n badgeUrl\n } = props;\n const {translate} = context;\n const {progression, completedModules, mandatoryModules, stars, totalModules, totalCourses} =\n metrics;\n\n const [showMore, setShowMore] = useState(false);\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n const Description = useCallback(() => {\n return (\n <div className={classnames(style.description, !showMore && style.truncate)}>\n {description}\n </div>\n );\n }, [showMore, description]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={certificationRef}>\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label=\"Back\"\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n <div className={style.ctaContainer}>\n <div className={style.logoContainer}>\n <img className={style.logo} src={logoUrl} />\n </div>\n <div>\n <Tag label={translate('certification')} />\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {description.length >= DESCRIPTION_BREAKPOINT ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {translate(showMore ? 'Show less' : 'Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 16}}\n />\n </div>\n ) : null}\n </>\n ) : null}\n <div className={style.contentStats}>\n <span>{`${totalModules} ${lowerCase(translate('modules'))}`}</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 {\n type: 'diploma',\n downloadUrl: diplomaUrl\n },\n badgeUrl && {\n type: 'badge',\n downloadUrl: badgeUrl\n },\n {\n type: 'stars',\n stars\n }\n ])}\n />\n <AllCourses courses={certificationCourses} totalCourses={totalCourses} filters={filters} />\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 certificationRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n logoUrl: PropTypes.string,\n metrics: PropTypes.shape({\n progression: PropTypes.number,\n stars: PropTypes.number,\n completedModules: PropTypes.number,\n mandatoryModules: PropTypes.number,\n totalModules: PropTypes.number,\n totalCourses: 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};\n\nexport default CertificationDetail;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,SAAQC,qBAAR,QAAoC,mBAApC;AACA,OAAOC,cAAP,MAA2B,6BAA3B;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,SAAP,MAAsB,2BAAtB;AACA,OAAOC,UAAP,MAAuB,6BAAvB;AACA,SAAQC,sBAAR,QAAqC,iBAArC;AACA,OAAOC,eAAP,MAA4B,iCAA5B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,sBAAsB,GAAG,GAA/B;;AAEA,MAAMC,mBAAmB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC9C,MAAM;IACJC,gBADI;IAEJC,KAFI;IAGJC,WAHI;IAIJC,oBAJI;IAKJC,uBALI;IAMJC,OANI;IAOJC,WAPI;IAQJC,uBARI;IASJC,OATI;IAUJC,OAVI;IAWJC,UAXI;IAYJC;EAZI,IAaFb,KAbJ;EAcA,MAAM;IAACc;EAAD,IAAcb,OAApB;EACA,MAAM;IAACc,WAAD;IAAcC,gBAAd;IAAgCC,gBAAhC;IAAkDC,KAAlD;IAAyDC,YAAzD;IAAuEC;EAAvE,IACJV,OADF;EAGA,MAAM,CAACW,QAAD,EAAWC,WAAX,IAA0BrC,QAAQ,CAAC,KAAD,CAAxC;EACA,MAAMsC,cAAc,GAAGvC,WAAW,CAAC,MAAMsC,WAAW,CAAC,CAACD,QAAF,CAAlB,EAA+B,CAACC,WAAD,EAAcD,QAAd,CAA/B,CAAlC;EA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;EAK9BjC,OAAO,EAAExB,SAAS,CAAC2D,KAAV,CAAgB;IACvB9B,WAAW,EAAE7B,SAAS,CAAC4D,MADA;IAEvB5B,KAAK,EAAEhC,SAAS,CAAC4D,MAFM;IAGvB9B,gBAAgB,EAAE9B,SAAS,CAAC4D,MAHL;IAIvB7B,gBAAgB,EAAE/B,SAAS,CAAC4D,MAJL;IAKvB3B,YAAY,EAAEjC,SAAS,CAAC4D,MALD;IAMvB1B,YAAY,EAAElC,SAAS,CAAC4D;EAND,CAAhB,CALqB;EAa9BlC,UAAU,EAAE1B,SAAS,CAACyD,MAbQ;EAc9B9B,QAAQ,EAAE3B,SAAS,CAACyD,MAdU;EAe9BrC,uBAAuB,EAAEpB,SAAS,CAAC6D,IAfL;EAgB9B1C,oBAAoB,EAAEnB,SAAS,CAAC2D,KAAV,CAAgBpD,SAAS,CAACiD,SAA1B,CAhBQ;EAiB9BnC,OAAO,EAAErB,SAAS,CAAC2D,KAAV,CAAgB;IACvBG,QAAQ,EAAE9D,SAAS,CAAC+D,IADG;IAEvBC,OAAO,EAAEhE,SAAS,CAACiE,OAAV,CAAkBjE,SAAS,CAAC2D,KAAV,CAAgBvD,qBAAhB,CAAlB;EAFc,CAAhB,CAjBqB;EAqB9BkB,WAAW,EAAEtB,SAAS,CAAC+D,IArBO;EAsB9BxC,uBAAuB,EAAEvB,SAAS,CAAC+D;AAtBL,CAAhC;AAyBA,eAAelD,mBAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","classnames","Provider","Tag","Select","SelectOptionPropTypes","ButtonLinkIcon","Icon","CardsGrid","AllCourses","ContinueLearning","ContinueLearningButton","ProgressWrapper","style","DESCRIPTION_BREAKPOINT","CertificationDetail","props","context","certificationRef","title","description","certificationCourses","ongoingCourses","totalCourses","totalModules","filters","sorting","onBackClick","onContinueLearningClick","metrics","logoUrl","onDownloadDiploma","badge","translate","progression","completedCourses","completedModules","stars","badgeUrl","onDownloadBadge","showMore","setShowMore","handleShowMore","Description","truncate","backgroundContainer","container","backButton","ctaContainer","logoContainer","logo","length","showMoreWrapper","faSize","wrapperSize","contentStats","divider","list","continueLearningSection","type","onDownload","contextTypes","skin","childContextTypes","propTypes","string","isRequired","shape","number","func","onChange","options","arrayOf"],"sources":["../../../src/template/certification-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {compact, lowerCase} from 'lodash/fp';\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 ContinueLearning from '../skill-detail/continue-learning';\nimport {ContinueLearningButton} from '../skill-detail';\nimport ProgressWrapper from '../../molecule/progress-wrapper';\nimport style from './style.css';\n\nconst DESCRIPTION_BREAKPOINT = 382;\n\nconst CertificationDetail = (props, context) => {\n const {\n certificationRef,\n title,\n description,\n certificationCourses,\n ongoingCourses,\n totalCourses,\n totalModules,\n filters,\n sorting,\n onBackClick,\n onContinueLearningClick,\n metrics,\n logoUrl,\n onDownloadDiploma,\n badge = {}\n } = props;\n const {translate} = context;\n const {progression, completedCourses, completedModules, stars} = metrics;\n const {badgeUrl = false, onDownloadBadge} = badge;\n\n const [showMore, setShowMore] = useState(false);\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n const Description = useCallback(() => {\n return (\n <div className={classnames(style.description, !showMore && style.truncate)}>\n {description}\n </div>\n );\n }, [showMore, description]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={certificationRef}>\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label=\"Back\"\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n <div className={style.ctaContainer}>\n <div className={style.logoContainer}>\n <img className={style.logo} src={logoUrl} />\n </div>\n <div>\n <Tag label={translate('certification')} />\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {description.length >= DESCRIPTION_BREAKPOINT ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {translate(showMore ? 'Show less' : 'Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 16}}\n />\n </div>\n ) : null}\n </>\n ) : null}\n <div className={style.contentStats}>\n <span>{`${totalCourses} ${lowerCase(translate('courses'))}`}</span>\n <div className={style.divider} />\n <span>{`${totalModules} ${lowerCase(translate('modules'))}`}</span>\n </div>\n <ContinueLearningButton\n ongoingCoursesAvailable={!!ongoingCourses.list.length}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n <div className={style.continueLearningSection}>\n <ContinueLearning ongoingCourses={ongoingCourses} />\n </div>\n <ProgressWrapper\n title={translate('your_progress')}\n subtitle={translate('certification_progress_wrapper_subtitle')}\n progression={progression}\n completedCourses={completedCourses}\n completedModules={completedModules}\n sections={compact([\n {\n type: 'diploma',\n onDownload: () => onDownloadDiploma\n },\n badgeUrl && {\n type: 'badge',\n badgeUrl,\n onDownload: () => onDownloadBadge\n },\n {\n type: 'stars',\n stars\n }\n ])}\n />\n <AllCourses\n courses={certificationCourses}\n totalCourses={totalCourses}\n filters={filters}\n sorting={sorting}\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 certificationRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n logoUrl: PropTypes.string,\n metrics: PropTypes.shape({\n progression: PropTypes.number,\n stars: PropTypes.number,\n completedCourses: PropTypes.number,\n completedModules: PropTypes.number\n }),\n onDownloadDiploma: PropTypes.func,\n badge: PropTypes.shape({\n badgeUrl: PropTypes.string,\n onDownloadBadge: PropTypes.func\n }),\n ongoingCourses: PropTypes.shape(CardsGrid.propTypes),\n certificationCourses: PropTypes.shape(CardsGrid.propTypes),\n totalCourses: PropTypes.number,\n totalModules: PropTypes.number,\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default CertificationDetail;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,MAAP,IAAgBC,qBAAhB,QAA4C,mBAA5C;AACA,OAAOC,cAAP,MAA2B,6BAA3B;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,SAAP,MAAsB,2BAAtB;AACA,OAAOC,UAAP,MAAuB,6BAAvB;AACA,OAAOC,gBAAP,MAA6B,mCAA7B;AACA,SAAQC,sBAAR,QAAqC,iBAArC;AACA,OAAOC,eAAP,MAA4B,iCAA5B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,sBAAsB,GAAG,GAA/B;;AAEA,MAAMC,mBAAmB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC9C,MAAM;IACJC,gBADI;IAEJC,KAFI;IAGJC,WAHI;IAIJC,oBAJI;IAKJC,cALI;IAMJC,YANI;IAOJC,YAPI;IAQJC,OARI;IASJC,OATI;IAUJC,WAVI;IAWJC,uBAXI;IAYJC,OAZI;IAaJC,OAbI;IAcJC,iBAdI;IAeJC,KAAK,GAAG;EAfJ,IAgBFhB,KAhBJ;EAiBA,MAAM;IAACiB;EAAD,IAAchB,OAApB;EACA,MAAM;IAACiB,WAAD;IAAcC,gBAAd;I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