@coorpacademy/components 11.32.43 → 11.32.44-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.
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +12 -6
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/cta/index.js +2 -2
- package/es/atom/cta/index.js.map +1 -1
- package/es/atom/icon/index.d.ts +1 -0
- package/es/atom/icon/index.d.ts.map +1 -1
- package/es/atom/icon/index.js +8 -1
- package/es/atom/icon/index.js.map +1 -1
- package/es/atom/input-file-draggable/index.js +2 -2
- package/es/atom/input-file-draggable/index.js.map +1 -1
- package/es/atom/link/index.d.ts +2 -2
- package/es/atom/link/index.d.ts.map +1 -1
- package/es/atom/link/index.js +38 -46
- package/es/atom/link/index.js.map +1 -1
- package/es/molecule/banner/index.js +3 -3
- package/es/molecule/banner/index.js.map +1 -1
- package/es/molecule/certification-card/index.d.ts +4 -0
- package/es/molecule/certification-card/index.d.ts.map +1 -1
- package/es/molecule/certification-card/index.js +14 -10
- package/es/molecule/certification-card/index.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +14 -2
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/draggable-list/index.d.ts +12 -0
- package/es/molecule/progress-wrapper/index.d.ts.map +1 -1
- package/es/molecule/progress-wrapper/index.js +21 -11
- package/es/molecule/progress-wrapper/index.js.map +1 -1
- package/es/organism/accordion/coorp-manager/part/index.js +2 -1
- package/es/organism/accordion/coorp-manager/part/index.js.map +1 -1
- package/es/organism/brand-learning-priorities/index.d.ts +12 -0
- package/es/organism/list-item/index.d.ts +16 -1
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +58 -9
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +25 -11
- package/es/organism/list-items/index.d.ts +12 -0
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +2 -3
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/sidebar/index.d.ts +28 -3
- package/es/organism/sidebar/index.d.ts.map +1 -1
- package/es/organism/sidebar/index.js +7 -3
- package/es/organism/sidebar/index.js.map +1 -1
- package/es/template/app-player/loading/index.d.ts +14 -2
- package/es/template/app-player/player/index.d.ts +28 -4
- package/es/template/app-player/player/slides/index.d.ts +14 -2
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +18 -6
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +16 -4
- package/es/template/app-player/popin-end/summary.d.ts +2 -2
- package/es/template/app-player/popin-header/index.d.ts +2 -2
- package/es/template/app-review/index.d.ts +14 -2
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +14 -2
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +14 -2
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +38 -2
- package/es/template/certification-detail/index.d.ts +1 -0
- package/es/template/certification-detail/index.d.ts.map +1 -1
- package/es/template/certification-detail/index.js +3 -1
- package/es/template/certification-detail/index.js.map +1 -1
- package/es/template/certifications/index.d.ts +9 -0
- package/es/template/certifications/index.d.ts.map +1 -1
- package/es/template/certifications/index.js +32 -12
- package/es/template/certifications/index.js.map +1 -1
- package/es/template/common/dashboard/index.d.ts +28 -4
- package/es/template/common/search-page/index.d.ts +14 -2
- package/es/template/external-course/index.d.ts +14 -2
- package/es/template/skill-detail/index.d.ts +1 -1
- package/es/template/skill-detail/index.d.ts.map +1 -1
- package/es/template/skill-detail/index.js +5 -5
- package/es/template/skill-detail/index.js.map +1 -1
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js +12 -6
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/cta/index.js +2 -2
- package/lib/atom/cta/index.js.map +1 -1
- package/lib/atom/icon/index.d.ts +1 -0
- package/lib/atom/icon/index.d.ts.map +1 -1
- package/lib/atom/icon/index.js +12 -2
- package/lib/atom/icon/index.js.map +1 -1
- package/lib/atom/input-file-draggable/index.js.map +1 -1
- package/lib/atom/link/index.d.ts +2 -2
- package/lib/atom/link/index.d.ts.map +1 -1
- package/lib/atom/link/index.js +38 -47
- package/lib/atom/link/index.js.map +1 -1
- package/lib/molecule/banner/index.js.map +1 -1
- package/lib/molecule/certification-card/index.d.ts +4 -0
- package/lib/molecule/certification-card/index.d.ts.map +1 -1
- package/lib/molecule/certification-card/index.js +14 -10
- package/lib/molecule/certification-card/index.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +14 -2
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/draggable-list/index.d.ts +12 -0
- package/lib/molecule/progress-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/progress-wrapper/index.js +25 -12
- package/lib/molecule/progress-wrapper/index.js.map +1 -1
- package/lib/organism/accordion/coorp-manager/part/index.js +3 -1
- package/lib/organism/accordion/coorp-manager/part/index.js.map +1 -1
- package/lib/organism/brand-learning-priorities/index.d.ts +12 -0
- package/lib/organism/list-item/index.d.ts +16 -1
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +56 -5
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +25 -11
- package/lib/organism/list-items/index.d.ts +12 -0
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +2 -3
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/sidebar/index.d.ts +28 -3
- package/lib/organism/sidebar/index.d.ts.map +1 -1
- package/lib/organism/sidebar/index.js +7 -3
- package/lib/organism/sidebar/index.js.map +1 -1
- package/lib/template/app-player/loading/index.d.ts +14 -2
- package/lib/template/app-player/player/index.d.ts +28 -4
- package/lib/template/app-player/player/slides/index.d.ts +14 -2
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +18 -6
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +16 -4
- package/lib/template/app-player/popin-end/summary.d.ts +2 -2
- package/lib/template/app-player/popin-header/index.d.ts +2 -2
- package/lib/template/app-review/index.d.ts +14 -2
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +14 -2
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +14 -2
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +38 -2
- package/lib/template/certification-detail/index.d.ts +1 -0
- package/lib/template/certification-detail/index.d.ts.map +1 -1
- package/lib/template/certification-detail/index.js +3 -1
- package/lib/template/certification-detail/index.js.map +1 -1
- package/lib/template/certifications/index.d.ts +9 -0
- package/lib/template/certifications/index.d.ts.map +1 -1
- package/lib/template/certifications/index.js +34 -14
- package/lib/template/certifications/index.js.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +28 -4
- package/lib/template/common/search-page/index.d.ts +14 -2
- package/lib/template/external-course/index.d.ts +14 -2
- package/lib/template/skill-detail/index.d.ts +1 -1
- package/lib/template/skill-detail/index.d.ts.map +1 -1
- package/lib/template/skill-detail/index.js +5 -5
- package/lib/template/skill-detail/index.js.map +1 -1
- package/locales/bs/global.json +10 -10
- package/locales/cs/global.json +10 -10
- package/locales/de/global.json +10 -10
- package/locales/en/global.json +1 -1
- package/locales/es/global.json +10 -10
- package/locales/et/global.json +10 -10
- package/locales/fi/global.json +10 -10
- package/locales/fr/global.json +10 -10
- package/locales/hr/global.json +10 -10
- package/locales/hu/global.json +10 -10
- package/locales/hy/global.json +10 -10
- package/locales/it/global.json +10 -10
- package/locales/ja/global.json +10 -10
- package/locales/ko/global.json +10 -10
- package/locales/nl/global.json +10 -10
- package/locales/pl/global.json +10 -10
- package/locales/pt/global.json +10 -10
- package/locales/ro/global.json +10 -10
- package/locales/ru/global.json +10 -10
- package/locales/sk/global.json +10 -10
- package/locales/sl/global.json +10 -10
- package/locales/sv/global.json +10 -10
- package/locales/tl/global.json +8 -8
- package/locales/tr/global.json +10 -10
- package/locales/uk/global.json +10 -10
- package/locales/vi/global.json +10 -10
- package/locales/zh/global.json +10 -10
- package/locales/zh_TW/global.json +10 -10
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ICONS","success","ValidateIcon","error","QuestionIcon","warning","STYLES","style","Banner","props","type","message","firstCTA","firstCTALabel","secondCTALabel","secondCTA","temporary","bannerKey","onEnd","Icon","classnames","banner","temporaryBanner","icon","temporaryIcon","button","buttonsBar","propTypes","PropTypes","string","oneOf","isRequired","func","bool"],"sources":["../../../src/molecule/banner/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys} from 'lodash/fp';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as QuestionIcon,\n NovaCompositionCoorpacademyValidate as ValidateIcon\n} from '@coorpacademy/nova-icons';\nimport
|
|
1
|
+
{"version":3,"file":"index.js","names":["ICONS","success","ValidateIcon","error","QuestionIcon","warning","STYLES","style","Banner","props","type","message","firstCTA","firstCTALabel","secondCTALabel","secondCTA","temporary","bannerKey","onEnd","Icon","classnames","banner","temporaryBanner","icon","temporaryIcon","button","buttonsBar","propTypes","PropTypes","string","oneOf","isRequired","func","bool"],"sources":["../../../src/molecule/banner/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys} from 'lodash/fp';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as QuestionIcon,\n NovaCompositionCoorpacademyValidate as ValidateIcon\n} from '@coorpacademy/nova-icons';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ICONS = {\n success: ValidateIcon,\n error: QuestionIcon,\n warning: QuestionIcon\n};\n\nconst STYLES = {\n success: style.success,\n error: style.error,\n warning: style.warning\n};\n\nconst Banner = props => {\n const {\n type,\n message,\n firstCTA,\n firstCTALabel,\n secondCTALabel,\n secondCTA,\n temporary,\n bannerKey,\n onEnd\n } = props;\n const Icon = ICONS[type];\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 className={classnames(style.icon, temporary && style.temporaryIcon)} />\n {message}\n </div>\n {firstCTALabel ? (\n <div className={classnames(style.button, STYLES[type])}>\n <ButtonLink\n data-name=\"first-banner-cta\"\n aria-label={firstCTALabel}\n label={firstCTALabel}\n onClick={firstCTA}\n type=\"text\"\n />\n </div>\n ) : null}\n {firstCTALabel && secondCTALabel ? (\n <div className={classnames(style.buttonsBar, STYLES[type])} />\n ) : null}\n {secondCTALabel ? (\n <div className={classnames(style.button, STYLES[type])}>\n <ButtonLink\n data-name=\"second-banner-cta\"\n onClick={secondCTA}\n aria-label={secondCTALabel}\n label={secondCTALabel}\n type=\"text\"\n />\n </div>\n ) : null}\n </div>\n );\n};\n\nBanner.propTypes = {\n bannerKey: PropTypes.string,\n type: PropTypes.oneOf(keys(ICONS)),\n message: PropTypes.string.isRequired,\n firstCTA: PropTypes.func,\n firstCTALabel: PropTypes.string,\n secondCTALabel: PropTypes.string,\n secondCTA: PropTypes.func,\n temporary: PropTypes.bool,\n onEnd: PropTypes.func\n};\n\nexport default Banner;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAIA;;AACA;;;;AAEA,MAAMA,KAAK,GAAG;EACZC,OAAO,EAAEC,8CADG;EAEZC,KAAK,EAAEC,0DAFK;EAGZC,OAAO,EAAED;AAHG,CAAd;AAMA,MAAME,MAAM,GAAG;EACbL,OAAO,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BN,EAwBGI,cAAc,gBACb;IAAK,SAAS,EAAE,IAAAM,mBAAA,EAAWb,cAAA,CAAMkB,MAAjB,EAAyBnB,MAAM,CAACI,IAAD,CAA/B;EAAhB,gBACE,6BAAC,mBAAD;IACE,aAAU,mBADZ;IAEE,OAAO,EAAEK,SAFX;IAGE,cAAYD,cAHd;IAIE,KAAK,EAAEA,cAJT;IAKE,IAAI,EAAC;EALP,EADF,CADa,GAUX,IAlCN,CADF;AAsCD,CAnDD;;AAqDAN,MAAM,CAACmB,SAAP,2CAAmB;EACjBV,SAAS,EAAEW,kBAAA,CAAUC,MADJ;EAEjBnB,IAAI,EAAEkB,kBAAA,CAAUE,KAAV,CAAgB,oBAAK9B,KAAL,CAAhB,CAFW;EAGjBW,OAAO,EAAEiB,kBAAA,CAAUC,MAAV,CAAiBE,UAHT;EAIjBnB,QAAQ,EAAEgB,kBAAA,CAAUI,IAJH;EAKjBnB,aAAa,EAAEe,kBAAA,CAAUC,MALR;EAMjBf,cAAc,EAAEc,kBAAA,CAAUC,MANT;EAOjBd,SAAS,EAAEa,kBAAA,CAAUI,IAPJ;EAQjBhB,SAAS,EAAEY,kBAAA,CAAUK,IARJ;EASjBf,KAAK,EAAEU,kBAAA,CAAUI;AATA,CAAnB;eAYexB,M"}
|
|
@@ -15,6 +15,10 @@ declare namespace CertificationCard {
|
|
|
15
15
|
const progress: PropTypes.Requireable<number>;
|
|
16
16
|
const imgUrl: PropTypes.Requireable<string>;
|
|
17
17
|
const onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
+
const tag: PropTypes.Requireable<string>;
|
|
19
|
+
const locales: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
|
+
conditionDescriptionProgress: PropTypes.Requireable<string>;
|
|
21
|
+
}>>;
|
|
18
22
|
}
|
|
19
23
|
}
|
|
20
24
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/certification-card/index.js"],"names":[],"mappings":";AAQA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/certification-card/index.js"],"names":[],"mappings":";AAQA,0EA4DC"}
|
|
@@ -22,17 +22,17 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
22
22
|
const CertificationCard = (props, context) => {
|
|
23
23
|
const {
|
|
24
24
|
label,
|
|
25
|
-
|
|
25
|
+
locales: {
|
|
26
|
+
conditionDescriptionProgress
|
|
27
|
+
},
|
|
28
|
+
tag,
|
|
29
|
+
goal: {
|
|
30
|
+
title
|
|
31
|
+
},
|
|
26
32
|
progress,
|
|
27
33
|
imgUrl,
|
|
28
34
|
onClick
|
|
29
35
|
} = props;
|
|
30
|
-
const {
|
|
31
|
-
title,
|
|
32
|
-
condition: {
|
|
33
|
-
nbDone
|
|
34
|
-
}
|
|
35
|
-
} = goal;
|
|
36
36
|
const {
|
|
37
37
|
translate
|
|
38
38
|
} = context;
|
|
@@ -76,14 +76,14 @@ const CertificationCard = (props, context) => {
|
|
|
76
76
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
77
77
|
className: _style.default.titleWrapper
|
|
78
78
|
}, /*#__PURE__*/_react.default.createElement(_tag.default, {
|
|
79
|
-
label:
|
|
79
|
+
label: tag,
|
|
80
80
|
size: "S"
|
|
81
81
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
82
82
|
className: _style.default.title,
|
|
83
83
|
"data-name": "certification-title"
|
|
84
84
|
}, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
85
85
|
className: _style.default.moduleCount
|
|
86
|
-
},
|
|
86
|
+
}, conditionDescriptionProgress)), /*#__PURE__*/_react.default.createElement(_progressBar.default, {
|
|
87
87
|
className: _style.default.customProgressBar,
|
|
88
88
|
style: {
|
|
89
89
|
backgroundColor: _colors.COLORS.positive
|
|
@@ -107,7 +107,11 @@ CertificationCard.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
107
107
|
}),
|
|
108
108
|
progress: _propTypes.default.number,
|
|
109
109
|
imgUrl: _propTypes.default.string,
|
|
110
|
-
onClick: _propTypes.default.func
|
|
110
|
+
onClick: _propTypes.default.func,
|
|
111
|
+
tag: _propTypes.default.string,
|
|
112
|
+
locales: _propTypes.default.shape({
|
|
113
|
+
conditionDescriptionProgress: _propTypes.default.string
|
|
114
|
+
})
|
|
111
115
|
} : {};
|
|
112
116
|
var _default = CertificationCard;
|
|
113
117
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CertificationCard","props","context","label","
|
|
1
|
+
{"version":3,"file":"index.js","names":["CertificationCard","props","context","label","locales","conditionDescriptionProgress","tag","goal","title","progress","imgUrl","onClick","translate","isInprogress","progressLabel","progressTagType","progressIconProps","position","iconName","iconColor","backgroundColor","size","faSize","wrapperSize","customStyle","padding","style","container","top","right","imageSection","imageContainer","detailWrapper","titleWrapper","moduleCount","customProgressBar","COLORS","positive","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","shape","condition","nbDone","number","func"],"sources":["../../../src/molecule/certification-card/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {COLORS} from '../../variables/colors';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport ProgressBar from '../progress-bar';\nimport style from './style.css';\n\nconst CertificationCard = (props, context) => {\n const {\n label,\n locales: {conditionDescriptionProgress},\n tag,\n goal: {title},\n progress,\n imgUrl,\n onClick\n } = props;\n const {translate} = context;\n const isInprogress = progress < 100;\n const progressLabel = isInprogress ? translate('in_progress') : translate('completed');\n const progressTagType = isInprogress ? 'progress' : 'success';\n\n const progressIconProps = {\n position: 'left',\n iconName: isInprogress ? 'clock' : 'circle-check',\n iconColor: isInprogress ? '#B87A00' : '#05944F',\n backgroundColor: isInprogress ? '#FFEECC' : '#D6F5E5',\n size: {\n faSize: 10,\n wrapperSize: 10\n },\n customStyle: {padding: 0}\n };\n\n return (\n <div className={style.container} data-name={`certification-card-${label}`} onClick={onClick}>\n {progress > 0 ? (\n <Tag\n label={progressLabel}\n type={progressTagType}\n customStyle={{position: 'absolute', top: '12px', right: '12px'}}\n icon={progressIconProps}\n />\n ) : null}\n <div className={style.imageSection}>\n <div className={style.imageContainer}>\n <img src={imgUrl} />\n </div>\n </div>\n <div className={style.detailWrapper}>\n <div className={style.titleWrapper}>\n <Tag label={tag} size=\"S\" />\n <div className={style.title} data-name=\"certification-title\">\n {title}\n </div>\n <div className={style.moduleCount}>{conditionDescriptionProgress}</div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progress}\n max={100}\n />\n </div>\n </div>\n );\n};\n\nCertificationCard.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nCertificationCard.propTypes = {\n label: PropTypes.string,\n goal: PropTypes.shape({\n title: PropTypes.string,\n condition: PropTypes.shape({\n nbDone: PropTypes.number\n })\n }),\n progress: PropTypes.number,\n imgUrl: PropTypes.string,\n onClick: PropTypes.func,\n tag: PropTypes.string,\n locales: PropTypes.shape({\n conditionDescriptionProgress: PropTypes.string\n })\n};\n\nexport default CertificationCard;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,iBAAiB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC5C,MAAM;IACJC,KADI;IAEJC,OAAO,EAAE;MAACC;IAAD,CAFL;IAGJC,GAHI;IAIJC,IAAI,EAAE;MAACC;IAAD,CAJF;IAKJC,QALI;IAMJC,MANI;IAOJC;EAPI,IAQFV,KARJ;EASA,MAAM;IAACW;EAAD,IAAcV,OAApB;EACA,MAAMW,YAAY,GAAGJ,QAAQ,GAAG,GAAhC;EACA,MAAMK,aAAa,GAAGD,YAAY,GAAGD,SAAS,CAAC,aAAD,CAAZ,GAA8BA,SAAS,CAAC,WAAD,CAAzE;EACA,MAAMG,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E,SAAS,EAAEqB,cAAA,CAAMS,iBADnB;IAEE,KAAK,EAAE;MAACf,eAAe,EAAEgB,cAAA,CAAOC;IAAzB,CAFT;IAGE,WAAW,EAAE,KAHf;IAIE,KAAK,EAAE5B,QAJT;IAKE,GAAG,EAAE;EALP,EARF,CAdF,CADF;AAiCD,CA5DD;;AA8DAT,iBAAiB,CAACsC,YAAlB,GAAiC;EAC/B1B,SAAS,EAAE2B,iBAAA,CAASC,iBAAT,CAA2B5B;AADP,CAAjC;AAIAZ,iBAAiB,CAACyC,SAAlB,2CAA8B;EAC5BtC,KAAK,EAAEuC,kBAAA,CAAUC,MADW;EAE5BpC,IAAI,EAAEmC,kBAAA,CAAUE,KAAV,CAAgB;IACpBpC,KAAK,EAAEkC,kBAAA,CAAUC,MADG;IAEpBE,SAAS,EAAEH,kBAAA,CAAUE,KAAV,CAAgB;MACzBE,MAAM,EAAEJ,kBAAA,CAAUK;IADO,CAAhB;EAFS,CAAhB,CAFsB;EAQ5BtC,QAAQ,EAAEiC,kBAAA,CAAUK,MARQ;EAS5BrC,MAAM,EAAEgC,kBAAA,CAAUC,MATU;EAU5BhC,OAAO,EAAE+B,kBAAA,CAAUM,IAVS;EAW5B1C,GAAG,EAAEoC,kBAAA,CAAUC,MAXa;EAY5BvC,OAAO,EAAEsC,kBAAA,CAAUE,KAAV,CAAgB;IACvBvC,4BAA4B,EAAEqC,kBAAA,CAAUC;EADjB,CAAhB;AAZmB,CAA9B;eAiBe3C,iB"}
|
|
@@ -136,6 +136,7 @@ declare const propTypes: {
|
|
|
136
136
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
137
137
|
title: PropTypes.Validator<string>;
|
|
138
138
|
subtitle: PropTypes.Requireable<string>;
|
|
139
|
+
provider: PropTypes.Requireable<string>;
|
|
139
140
|
selected: PropTypes.Requireable<boolean>;
|
|
140
141
|
selectedColor: PropTypes.Requireable<string>;
|
|
141
142
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -188,6 +189,17 @@ declare const propTypes: {
|
|
|
188
189
|
'aria-label': PropTypes.Requireable<string>;
|
|
189
190
|
contentType: PropTypes.Requireable<string>;
|
|
190
191
|
id: PropTypes.Requireable<string>;
|
|
192
|
+
leftIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
193
|
+
iconName: PropTypes.Requireable<string>;
|
|
194
|
+
iconColor: PropTypes.Requireable<string>;
|
|
195
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
196
|
+
borderRadius: PropTypes.Requireable<string>;
|
|
197
|
+
preset: PropTypes.Requireable<string>;
|
|
198
|
+
gradientBackground: PropTypes.Requireable<boolean>;
|
|
199
|
+
size: PropTypes.Requireable<number>;
|
|
200
|
+
wrapperSize: PropTypes.Requireable<number>;
|
|
201
|
+
}>>;
|
|
202
|
+
editAsIcon: PropTypes.Requireable<boolean>;
|
|
191
203
|
}> | null | undefined)[]>;
|
|
192
204
|
type: PropTypes.Requireable<string>;
|
|
193
205
|
itemType: PropTypes.Requireable<string>;
|
|
@@ -285,11 +297,11 @@ declare const propTypes: {
|
|
|
285
297
|
'aria-label': PropTypes.Requireable<string>;
|
|
286
298
|
title: PropTypes.Requireable<string>;
|
|
287
299
|
target: PropTypes.Requireable<string>;
|
|
288
|
-
skinHover: PropTypes.Requireable<boolean>;
|
|
289
300
|
hoverColor: PropTypes.Requireable<string>;
|
|
301
|
+
hoverBackgroundColor: PropTypes.Requireable<string>;
|
|
290
302
|
download: PropTypes.Requireable<boolean>;
|
|
291
303
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
292
|
-
|
|
304
|
+
onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
|
|
293
305
|
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
294
306
|
useButtonTag: PropTypes.Requireable<boolean>;
|
|
295
307
|
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDd,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,UAAU,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE;QACZ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAC5D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;QACzB,IAAI,EACA,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,GAChD,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;KACtD,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -62,6 +62,7 @@ declare namespace DraggableList {
|
|
|
62
62
|
}> | PropTypes.InferProps<{
|
|
63
63
|
title: PropTypes.Validator<string>;
|
|
64
64
|
subtitle: PropTypes.Requireable<string>;
|
|
65
|
+
provider: PropTypes.Requireable<string>;
|
|
65
66
|
selected: PropTypes.Requireable<boolean>;
|
|
66
67
|
selectedColor: PropTypes.Requireable<string>;
|
|
67
68
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -114,6 +115,17 @@ declare namespace DraggableList {
|
|
|
114
115
|
'aria-label': PropTypes.Requireable<string>;
|
|
115
116
|
contentType: PropTypes.Requireable<string>;
|
|
116
117
|
id: PropTypes.Requireable<string>;
|
|
118
|
+
leftIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
119
|
+
iconName: PropTypes.Requireable<string>;
|
|
120
|
+
iconColor: PropTypes.Requireable<string>;
|
|
121
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
122
|
+
borderRadius: PropTypes.Requireable<string>;
|
|
123
|
+
preset: PropTypes.Requireable<string>;
|
|
124
|
+
gradientBackground: PropTypes.Requireable<boolean>;
|
|
125
|
+
size: PropTypes.Requireable<number>;
|
|
126
|
+
wrapperSize: PropTypes.Requireable<number>;
|
|
127
|
+
}>>;
|
|
128
|
+
editAsIcon: PropTypes.Requireable<boolean>;
|
|
117
129
|
}> | PropTypes.InferProps<{
|
|
118
130
|
'aria-label': PropTypes.Requireable<string>;
|
|
119
131
|
id: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";AA+GA;;;;;;;8BA8DC"}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
|
|
6
|
+
var _get2 = _interopRequireDefault(require("lodash/fp/get"));
|
|
7
|
+
|
|
6
8
|
var _map2 = _interopRequireDefault(require("lodash/fp/map"));
|
|
7
9
|
|
|
8
10
|
var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
|
|
@@ -11,6 +13,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
13
|
|
|
12
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
15
|
|
|
16
|
+
var _cssColorFunction = require("css-color-function");
|
|
17
|
+
|
|
14
18
|
var _title = _interopRequireDefault(require("../../atom/title"));
|
|
15
19
|
|
|
16
20
|
var _progressBar = _interopRequireDefault(require("../progress-bar"));
|
|
@@ -23,10 +27,14 @@ var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
|
23
27
|
|
|
24
28
|
var _icon = _interopRequireDefault(require("../../atom/icon"));
|
|
25
29
|
|
|
26
|
-
var _provider =
|
|
30
|
+
var _provider = _interopRequireWildcard(require("../../atom/provider"));
|
|
27
31
|
|
|
28
32
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
29
33
|
|
|
34
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
|
+
|
|
36
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
|
+
|
|
30
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
39
|
|
|
32
40
|
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); }
|
|
@@ -45,26 +53,30 @@ const DetailSection = ({
|
|
|
45
53
|
const {
|
|
46
54
|
translate
|
|
47
55
|
} = context;
|
|
56
|
+
const skin = (0, _provider.GetSkinFromContext)(context);
|
|
57
|
+
const primarySkinColor = (0, _get2.default)('common.primary', skin);
|
|
48
58
|
const isTypeStars = type === 'stars';
|
|
49
|
-
|
|
50
|
-
const DownloadButton = /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
59
|
+
const downloadButtonProps = {
|
|
51
60
|
label: translate('download'),
|
|
52
61
|
link: {
|
|
53
62
|
target: '_blank',
|
|
54
63
|
href: downloadUrl
|
|
55
64
|
},
|
|
56
|
-
|
|
57
|
-
|
|
65
|
+
'data-name': `download-${type}-button`,
|
|
66
|
+
'aria-label': `download ${type} button`,
|
|
58
67
|
customStyle: {
|
|
59
|
-
backgroundColor:
|
|
60
|
-
color:
|
|
61
|
-
width: 'auto'
|
|
68
|
+
backgroundColor: (0, _cssColorFunction.convert)(`color(${primarySkinColor} a(0.07))`),
|
|
69
|
+
color: primarySkinColor,
|
|
70
|
+
width: 'auto',
|
|
71
|
+
transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'
|
|
62
72
|
},
|
|
73
|
+
hoverBackgroundColor: primarySkinColor,
|
|
74
|
+
hoverColor: '#FFFFFF',
|
|
63
75
|
icon: {
|
|
64
76
|
position: 'left',
|
|
65
77
|
faIcon: {
|
|
66
78
|
name: 'download',
|
|
67
|
-
color:
|
|
79
|
+
color: primarySkinColor,
|
|
68
80
|
size: 14,
|
|
69
81
|
customStyle: {
|
|
70
82
|
padding: 0
|
|
@@ -72,7 +84,7 @@ const DetailSection = ({
|
|
|
72
84
|
}
|
|
73
85
|
},
|
|
74
86
|
disabled: isLocked
|
|
75
|
-
}
|
|
87
|
+
};
|
|
76
88
|
|
|
77
89
|
const LockedTag = /*#__PURE__*/_react.default.createElement(_tag.default, {
|
|
78
90
|
label: translate('locked'),
|
|
@@ -120,7 +132,7 @@ const DetailSection = ({
|
|
|
120
132
|
className: _style.default.detailsTitle
|
|
121
133
|
}, type === 'diploma' ? translate('diploma') : translate('badge')), isLocked ? LockedTag : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
122
134
|
className: _style.default.buttonContainer
|
|
123
|
-
},
|
|
135
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, downloadButtonProps))));
|
|
124
136
|
};
|
|
125
137
|
|
|
126
138
|
const ProgressWrapper = ({
|
|
@@ -186,7 +198,8 @@ const commonDetailSectionPropTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
186
198
|
stars: _propTypes.default.number
|
|
187
199
|
} : {};
|
|
188
200
|
DetailSection.contextTypes = {
|
|
189
|
-
translate: _provider.default.childContextTypes.translate
|
|
201
|
+
translate: _provider.default.childContextTypes.translate,
|
|
202
|
+
skin: _provider.default.childContextTypes.skin
|
|
190
203
|
};
|
|
191
204
|
DetailSection.propTypes = process.env.NODE_ENV !== "production" ? _extends({
|
|
192
205
|
index: _propTypes.default.number,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["uncappedMap","convert","cap","DetailSection","index","type","isLocked","downloadUrl","stars","context","translate","isTypeStars","DownloadButton","target","href","backgroundColor","color","width","position","faIcon","name","size","customStyle","padding","LockedTag","iconName","iconColor","preset","style","detailsInfo","detailsInfoText","detailsTitle","img","buttonContainer","ProgressWrapper","completedModules","mandatoryModules","title","subtitle","progression","sections","mandatoryCompletedModulesLocale","container","titleContainer","statscontainer","stats","statsNumber","customProgressBar","COLORS","positive","statsProgressionMobile","details","section","commonDetailSectionPropTypes","PropTypes","oneOf","string","number","contextTypes","Provider","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-${type}-button`}\n aria-label={`download ${type} button`}\n customStyle={{backgroundColor: '#F1F6FE', color: '#0061FF', width: 'auto'}}\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={translate('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\n className={style[`detailsSection${index}`]}\n data-name={type}\n aria-label={`${type} informations`}\n >\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\n className={style[`detailsSection${index}`]}\n data-name={type}\n aria-label={`${type} informations`}\n >\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 mandatoryCompletedModulesLocale = translate('modules_completed_mandatory');\n const isLocked = progression !== 100;\n\n return (\n <div\n className={style.container}\n data-name=\"prgress-wrapper\"\n aria-label=\"progress wrapper section\"\n >\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} data-name=\"progress-stats\">\n {`${\n completedModules > mandatoryModules ? mandatoryModules : completedModules\n } / ${mandatoryModules}`}\n </span>\n {mandatoryCompletedModulesLocale}\n </div>\n </div>\n <div className={style.progression}>\n <span className={style.statsNumber} data-name=\"progress-value\">\n {progression}%\n </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 (section, index) => (\n <DetailSection\n {...section}\n isLocked={isLocked}\n key={`${section.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(Prop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Ee,kBAAA,CAAUG,MALG;EAM1BjB,QAAQ,EAAEc,kBAAA,CAAUS,OAAV,CAAkBT,kBAAA,CAAUU,KAAV,CAAgBX,4BAAhB,CAAlB;AANgB,CAA5B;eASenB,e"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["uncappedMap","convert","cap","DetailSection","index","type","isLocked","downloadUrl","stars","context","translate","skin","GetSkinFromContext","primarySkinColor","isTypeStars","downloadButtonProps","label","link","target","href","customStyle","backgroundColor","color","width","transition","hoverBackgroundColor","hoverColor","icon","position","faIcon","name","size","padding","disabled","LockedTag","iconName","iconColor","preset","style","detailsInfo","detailsInfoText","detailsTitle","img","buttonContainer","ProgressWrapper","completedModules","mandatoryModules","title","subtitle","progression","sections","mandatoryCompletedModulesLocale","container","titleContainer","statscontainer","stats","statsNumber","customProgressBar","COLORS","positive","statsProgressionMobile","details","section","commonDetailSectionPropTypes","PropTypes","oneOf","string","number","contextTypes","Provider","childContextTypes","propTypes","bool","arrayOf","shape"],"sources":["../../../src/molecule/progress-wrapper/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport {isEmpty, map, get} 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, {GetSkinFromContext} 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 skin = GetSkinFromContext(context);\n const primarySkinColor = get('common.primary', skin);\n const isTypeStars = type === 'stars';\n\n const downloadButtonProps = {\n label: translate('download'),\n link: {\n target: '_blank',\n href: downloadUrl\n },\n 'data-name': `download-${type}-button`,\n 'aria-label': `download ${type} button`,\n customStyle: {\n backgroundColor: convert(`color(${primarySkinColor} a(0.07))`),\n color: primarySkinColor,\n width: 'auto',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'\n },\n hoverBackgroundColor: primarySkinColor,\n hoverColor: '#FFFFFF',\n icon: {\n position: 'left',\n faIcon: {\n name: 'download',\n color: primarySkinColor,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n disabled: isLocked\n };\n\n const LockedTag = (\n <Tag\n label={translate('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\n className={style[`detailsSection${index}`]}\n data-name={type}\n aria-label={`${type} informations`}\n >\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\n className={style[`detailsSection${index}`]}\n data-name={type}\n aria-label={`${type} informations`}\n >\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}>\n <ButtonLink {...downloadButtonProps} />\n </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 mandatoryCompletedModulesLocale = translate('modules_completed_mandatory');\n const isLocked = progression !== 100;\n\n return (\n <div\n className={style.container}\n data-name=\"prgress-wrapper\"\n aria-label=\"progress wrapper section\"\n >\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} data-name=\"progress-stats\">\n {`${\n completedModules > mandatoryModules ? mandatoryModules : completedModules\n } / ${mandatoryModules}`}\n </span>\n {mandatoryCompletedModulesLocale}\n </div>\n </div>\n <div className={style.progression}>\n <span className={style.statsNumber} data-name=\"progress-value\">\n {progression}%\n </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 (section, index) => (\n <DetailSection\n {...section}\n isLocked={isLocked}\n key={`${section.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 skin: Provider.childContextTypes.skin\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;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;AAEA,MAAMA,WAAW,GAAG,cAAIC,OAAJ,C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CAAUE,MADS;EAE1BlB,QAAQ,EAAEgB,kBAAA,CAAUE,MAFM;EAG1BrB,gBAAgB,EAAEmB,kBAAA,CAAUG,MAHF;EAI1BrB,gBAAgB,EAAEkB,kBAAA,CAAUG,MAJF;EAK1BlB,WAAW,EAAEe,kBAAA,CAAUG,MALG;EAM1BjB,QAAQ,EAAEc,kBAAA,CAAUS,OAAV,CAAkBT,kBAAA,CAAUU,KAAV,CAAgBX,4BAAhB,CAAlB;AANgB,CAA5B;eASenB,e"}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
|
|
6
|
+
var _getOr2 = _interopRequireDefault(require("lodash/fp/getOr"));
|
|
7
|
+
|
|
6
8
|
var _get2 = _interopRequireDefault(require("lodash/fp/get"));
|
|
7
9
|
|
|
8
10
|
var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
|
|
@@ -171,7 +173,7 @@ const AccordionPart = (props, context) => {
|
|
|
171
173
|
className: themeStyle[theme]
|
|
172
174
|
}, !isCollapsibleTab ? /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
173
175
|
onClick: handleParentClick,
|
|
174
|
-
|
|
176
|
+
hoverColor: (0, _getOr2.default)('#00B0FF', 'common.primary', skin),
|
|
175
177
|
href: href,
|
|
176
178
|
"data-name": `link-item`,
|
|
177
179
|
target: '_blank',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ICON_TYPES","arrow","LightBulbIcon","dashboard","DashboardIcon","analytics","AnalyticsIcon","administration","AdministrationIcon","animation","AnimationIcon","contentCreation","ContentCreationIcon","editorialization","EditorializationIcon","defaultStyle","titleIcon","style","label","titleLabel","selectedLabel","title","setupTitle","container","openHeader","closedHeader","default","setupThemeStyle","titleActivatedIcon","setupTitleActivatedIcon","setupTitleLabel","setupSelectedTitleLabel","setupSelectedTitle","selectedTitle","setupContainer","coorpManagerOpenHeader","coorpManagerClosedHeader","MoreLessIcons","type","moreClassName","lessClassName","darkColor","mediumColor","color","newTabIcon","Part","skin","selected","iconType","onParentClick","onClick","isOpen","children","theme","openIconActivated","openIcon","closeIconActivated","closeIcon","iconColor","iconBlue","iconGrey","hoverIconColor","blueTitleIcon","selectedBlackLabel","labelBlack","Icon","isLink","isCollapsible","wrapper","classnames","border","borderBgBlue","borderBgNone","flex","setupPart","header","AccordionPart","props","context","content","href","onUpdateOpenedTab","themeStyle","handleParentClick","isCollapsibleTab","textDecoration","contextTypes","Provider","childContextTypes","propTypes","PropTypes","oneOf","string","node","func","bool"],"sources":["../../../../../src/organism/accordion/coorp-manager/part/index.js"],"sourcesContent":["import React from 'react';\nimport {noop, keys, get} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaSolidLightsLightbulb4 as LightBulbIcon,\n NovaCompositionNavigationArrowDown as ArrowIcon,\n NovaCompositionCoorpacademyOpenInNewTab as OpenInNewTabIcon,\n NovaCompositionCoorpacademyDashboard as DashboardIcon,\n NovaCompositionCoorpacademyAnalytics as AnalyticsIcon,\n NovaCompositionCoorpacademyAnimation as AnimationIcon,\n NovaCompositionCoorpacademyAdministration as AdministrationIcon,\n NovaCompositionCoorpacademyContentCreation as ContentCreationIcon,\n NovaCompositionCoorpacademyEditorialization as EditorializationIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../../../../atom/link';\nimport Provider from '../../../../atom/provider';\nimport style from './style.css';\n\nconst ICON_TYPES = {\n arrow: LightBulbIcon,\n dashboard: DashboardIcon,\n analytics: AnalyticsIcon,\n administration: AdministrationIcon,\n animation: AnimationIcon,\n contentCreation: ContentCreationIcon,\n editorialization: EditorializationIcon\n};\n\nconst defaultStyle = {\n titleIcon: style.titleIcon,\n label: style.titleLabel,\n selectedLabel: style.titleLabel,\n title: style.setupTitle,\n container: style.container,\n openHeader: style.openHeader,\n closedHeader: style.closedHeader,\n default: null\n};\n\nconst setupThemeStyle = {\n titleIcon: style.titleIcon,\n titleActivatedIcon: style.setupTitleActivatedIcon,\n label: style.setupTitleLabel,\n selectedLabel: style.setupSelectedTitleLabel,\n setupSelectedTitle: style.setupSelectedTitle,\n selectedTitle: style.selectedTitle,\n title: style.setupTitle,\n container: style.setupContainer,\n openHeader: style.coorpManagerOpenHeader,\n closedHeader: style.coorpManagerClosedHeader\n};\n\nconst MoreLessIcons = ({type, moreClassName, lessClassName, darkColor, mediumColor}) => {\n return type !== 'iconLink' ? (\n <div>\n <ArrowIcon className={moreClassName} style={{color: darkColor}} />\n <ArrowIcon className={lessClassName} style={{color: mediumColor}} />\n </div>\n ) : (\n <OpenInNewTabIcon className={style.newTabIcon} />\n );\n};\n\nconst Part = ({\n skin,\n selected,\n iconType,\n onParentClick,\n onClick,\n isOpen,\n title,\n type,\n children,\n theme\n}) => {\n const darkColor = get('common.dark', skin);\n const mediumColor = get('common.medium', skin);\n const lessClassName = isOpen ? style.openIconActivated : style.openIcon;\n const moreClassName = !isOpen ? style.closeIconActivated : style.closeIcon;\n const iconColor = selected ? style.iconBlue : style.iconGrey;\n const hoverIconColor = selected && style.blueTitleIcon;\n const selectedBlackLabel = selected && style.labelBlack;\n const Icon = ICON_TYPES[iconType];\n const isLink = type === 'iconLink';\n const isCollapsible = type === 'collapsibleTab';\n\n return (\n <div className={style.wrapper}>\n {theme === 'setup' ? (\n <div\n className={classnames(style.border, selected ? style.borderBgBlue : style.borderBgNone)}\n />\n ) : null}\n <div data-type={iconType} onClick={onParentClick} style={{flex: 1}}>\n <div data-name=\"accordionPart\" className={style.setupPart}>\n <div className={style.header} data-type={iconType} onClick={onClick}>\n <div data-name=\"title\" className={style.title}>\n {Icon ? (\n <Icon className={classnames(style.titleIcon, iconColor, hoverIconColor)} />\n ) : null}\n <h3 className={classnames(style.titleLabel, selectedBlackLabel)}>\n {title}\n {isLink ? <OpenInNewTabIcon className={style.newTabIcon} /> : null}\n </h3>\n </div>\n {isCollapsible ? (\n <div>\n <ArrowIcon className={moreClassName} style={{color: darkColor}} />\n <ArrowIcon className={lessClassName} style={{color: mediumColor}} />\n </div>\n ) : null}\n </div>\n {isCollapsible ? children : null}\n </div>\n </div>\n </div>\n );\n};\n\nconst AccordionPart = (props, context) => {\n const {skin} = context;\n const {\n title,\n content,\n iconType,\n theme,\n onClick = noop,\n selected = false,\n type,\n href,\n isOpen,\n onUpdateOpenedTab\n } = props;\n\n const themeStyle = theme === 'setup' ? setupThemeStyle : defaultStyle;\n\n function handleParentClick() {\n onUpdateOpenedTab();\n onClick();\n }\n\n const isCollapsibleTab = type === 'collapsibleTab';\n return (\n <div data-name=\"accordionPart\" className={themeStyle[theme]}>\n {!isCollapsibleTab ? (\n <Link\n onClick={handleParentClick}\n skinHover\n href={href}\n data-name={`link-item`}\n target={'_blank'}\n style={{\n textDecoration: 'none'\n }}\n >\n <Part\n skin={skin}\n title={title}\n content={content}\n iconType={iconType}\n theme={theme}\n onParentClick={handleParentClick}\n onClick={onClick}\n isOpen={isOpen}\n selected={selected}\n type={type}\n />\n </Link>\n ) : (\n <Part\n skin={skin}\n title={title}\n content={content}\n iconType={iconType}\n theme={theme}\n onParentClick={handleParentClick}\n onClick={onClick}\n selected={selected}\n isOpen={isOpen}\n type={type}\n />\n )}\n {isCollapsibleTab && isOpen ? <div className={themeStyle.container}>{content}</div> : null}\n </div>\n );\n};\n\nAccordionPart.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nAccordionPart.propTypes = {\n iconType: PropTypes.oneOf(keys(ICON_TYPES)),\n type: PropTypes.oneOf(['simpleTab', 'collapsibleTab', 'iconLink']),\n title: PropTypes.string,\n content: PropTypes.node,\n onClick: PropTypes.func,\n selected: PropTypes.bool,\n theme: PropTypes.string,\n href: PropTypes.string,\n isOpen: PropTypes.bool,\n onUpdateOpenedTab: PropTypes.func\n};\n\nMoreLessIcons.propTypes = {\n type: PropTypes.string,\n moreClassName: PropTypes.string,\n lessClassName: PropTypes.string,\n darkColor: PropTypes.string,\n mediumColor: PropTypes.string\n};\n\nP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;eAIeb,a"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ICON_TYPES","arrow","LightBulbIcon","dashboard","DashboardIcon","analytics","AnalyticsIcon","administration","AdministrationIcon","animation","AnimationIcon","contentCreation","ContentCreationIcon","editorialization","EditorializationIcon","defaultStyle","titleIcon","style","label","titleLabel","selectedLabel","title","setupTitle","container","openHeader","closedHeader","default","setupThemeStyle","titleActivatedIcon","setupTitleActivatedIcon","setupTitleLabel","setupSelectedTitleLabel","setupSelectedTitle","selectedTitle","setupContainer","coorpManagerOpenHeader","coorpManagerClosedHeader","MoreLessIcons","type","moreClassName","lessClassName","darkColor","mediumColor","color","newTabIcon","Part","skin","selected","iconType","onParentClick","onClick","isOpen","children","theme","openIconActivated","openIcon","closeIconActivated","closeIcon","iconColor","iconBlue","iconGrey","hoverIconColor","blueTitleIcon","selectedBlackLabel","labelBlack","Icon","isLink","isCollapsible","wrapper","classnames","border","borderBgBlue","borderBgNone","flex","setupPart","header","AccordionPart","props","context","content","href","onUpdateOpenedTab","themeStyle","handleParentClick","isCollapsibleTab","textDecoration","contextTypes","Provider","childContextTypes","propTypes","PropTypes","oneOf","string","node","func","bool"],"sources":["../../../../../src/organism/accordion/coorp-manager/part/index.js"],"sourcesContent":["import React from 'react';\nimport {noop, keys, get, getOr} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaSolidLightsLightbulb4 as LightBulbIcon,\n NovaCompositionNavigationArrowDown as ArrowIcon,\n NovaCompositionCoorpacademyOpenInNewTab as OpenInNewTabIcon,\n NovaCompositionCoorpacademyDashboard as DashboardIcon,\n NovaCompositionCoorpacademyAnalytics as AnalyticsIcon,\n NovaCompositionCoorpacademyAnimation as AnimationIcon,\n NovaCompositionCoorpacademyAdministration as AdministrationIcon,\n NovaCompositionCoorpacademyContentCreation as ContentCreationIcon,\n NovaCompositionCoorpacademyEditorialization as EditorializationIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../../../../atom/link';\nimport Provider from '../../../../atom/provider';\nimport style from './style.css';\n\nconst ICON_TYPES = {\n arrow: LightBulbIcon,\n dashboard: DashboardIcon,\n analytics: AnalyticsIcon,\n administration: AdministrationIcon,\n animation: AnimationIcon,\n contentCreation: ContentCreationIcon,\n editorialization: EditorializationIcon\n};\n\nconst defaultStyle = {\n titleIcon: style.titleIcon,\n label: style.titleLabel,\n selectedLabel: style.titleLabel,\n title: style.setupTitle,\n container: style.container,\n openHeader: style.openHeader,\n closedHeader: style.closedHeader,\n default: null\n};\n\nconst setupThemeStyle = {\n titleIcon: style.titleIcon,\n titleActivatedIcon: style.setupTitleActivatedIcon,\n label: style.setupTitleLabel,\n selectedLabel: style.setupSelectedTitleLabel,\n setupSelectedTitle: style.setupSelectedTitle,\n selectedTitle: style.selectedTitle,\n title: style.setupTitle,\n container: style.setupContainer,\n openHeader: style.coorpManagerOpenHeader,\n closedHeader: style.coorpManagerClosedHeader\n};\n\nconst MoreLessIcons = ({type, moreClassName, lessClassName, darkColor, mediumColor}) => {\n return type !== 'iconLink' ? (\n <div>\n <ArrowIcon className={moreClassName} style={{color: darkColor}} />\n <ArrowIcon className={lessClassName} style={{color: mediumColor}} />\n </div>\n ) : (\n <OpenInNewTabIcon className={style.newTabIcon} />\n );\n};\n\nconst Part = ({\n skin,\n selected,\n iconType,\n onParentClick,\n onClick,\n isOpen,\n title,\n type,\n children,\n theme\n}) => {\n const darkColor = get('common.dark', skin);\n const mediumColor = get('common.medium', skin);\n const lessClassName = isOpen ? style.openIconActivated : style.openIcon;\n const moreClassName = !isOpen ? style.closeIconActivated : style.closeIcon;\n const iconColor = selected ? style.iconBlue : style.iconGrey;\n const hoverIconColor = selected && style.blueTitleIcon;\n const selectedBlackLabel = selected && style.labelBlack;\n const Icon = ICON_TYPES[iconType];\n const isLink = type === 'iconLink';\n const isCollapsible = type === 'collapsibleTab';\n\n return (\n <div className={style.wrapper}>\n {theme === 'setup' ? (\n <div\n className={classnames(style.border, selected ? style.borderBgBlue : style.borderBgNone)}\n />\n ) : null}\n <div data-type={iconType} onClick={onParentClick} style={{flex: 1}}>\n <div data-name=\"accordionPart\" className={style.setupPart}>\n <div className={style.header} data-type={iconType} onClick={onClick}>\n <div data-name=\"title\" className={style.title}>\n {Icon ? (\n <Icon className={classnames(style.titleIcon, iconColor, hoverIconColor)} />\n ) : null}\n <h3 className={classnames(style.titleLabel, selectedBlackLabel)}>\n {title}\n {isLink ? <OpenInNewTabIcon className={style.newTabIcon} /> : null}\n </h3>\n </div>\n {isCollapsible ? (\n <div>\n <ArrowIcon className={moreClassName} style={{color: darkColor}} />\n <ArrowIcon className={lessClassName} style={{color: mediumColor}} />\n </div>\n ) : null}\n </div>\n {isCollapsible ? children : null}\n </div>\n </div>\n </div>\n );\n};\n\nconst AccordionPart = (props, context) => {\n const {skin} = context;\n const {\n title,\n content,\n iconType,\n theme,\n onClick = noop,\n selected = false,\n type,\n href,\n isOpen,\n onUpdateOpenedTab\n } = props;\n\n const themeStyle = theme === 'setup' ? setupThemeStyle : defaultStyle;\n\n function handleParentClick() {\n onUpdateOpenedTab();\n onClick();\n }\n\n const isCollapsibleTab = type === 'collapsibleTab';\n return (\n <div data-name=\"accordionPart\" className={themeStyle[theme]}>\n {!isCollapsibleTab ? (\n <Link\n onClick={handleParentClick}\n hoverColor={getOr('#00B0FF', 'common.primary', skin)}\n href={href}\n data-name={`link-item`}\n target={'_blank'}\n style={{\n textDecoration: 'none'\n }}\n >\n <Part\n skin={skin}\n title={title}\n content={content}\n iconType={iconType}\n theme={theme}\n onParentClick={handleParentClick}\n onClick={onClick}\n isOpen={isOpen}\n selected={selected}\n type={type}\n />\n </Link>\n ) : (\n <Part\n skin={skin}\n title={title}\n content={content}\n iconType={iconType}\n theme={theme}\n onParentClick={handleParentClick}\n onClick={onClick}\n selected={selected}\n isOpen={isOpen}\n type={type}\n />\n )}\n {isCollapsibleTab && isOpen ? <div className={themeStyle.container}>{content}</div> : null}\n </div>\n );\n};\n\nAccordionPart.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nAccordionPart.propTypes = {\n iconType: PropTypes.oneOf(keys(ICON_TYPES)),\n type: PropTypes.oneOf(['simpleTab', 'collapsibleTab', 'iconLink']),\n title: PropTypes.string,\n content: PropTypes.node,\n onClick: PropTypes.func,\n selected: PropTypes.bool,\n theme: PropTypes.string,\n href: PropTypes.string,\n isOpen: PropTypes.bool,\n onUpdateOpenedTab: PropTypes.func\n};\n\nMoreLessIcons.propTypes = {\n type: PropTypes.string,\n moreClassName: PropTypes.string,\n lessClassName: PropTypes.string,\n darkColor: PropTypes.string,\n mediumColor: PropTypes.string\n};\n\nPart.propTypes = {\n ...AccordionPart.propTypes\n};\n\nexport default AccordionPart;\n"],"mappings":";;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AAWA;;AACA;;AACA;;;;;;AAEA,MAAMA,UAAU,GAAG;EACjBC,KAAK,EAAEC,oCADU;EAEjBC,SAAS,EAAEC,+CAFM;EAGjBC,SAAS,EAAEC,+CAHM;EAIjBC,cAAc,EAAEC,oDAJC;EAKjBC,SAAS,EAAEC,+CALM;EAMjBC,eAAe,EAAEC,qDANA;EAOjBC,gBAAgB,EAAEC;AAPD,CAAnB;AAUA,MAAMC,YAAY,GAAG;EACnBC,SAAS,EAAEC,cAAA,CAAMD,SADE;EAEnBE,KAAK,EAAED,cAAA,CAAME,UAFM;EAGnBC,aAAa,EAAEH,cAAA,CAAME,UAHF;EAInBE,KAAK,EAAEJ,cAAA,CAAMK,UAJM;EAKnBC,SAAS,EAAEN,cAAA,CAAMM,SALE;EAMnBC,UAAU,EAAEP,cAAA,CAAMO,UANC;EAOnBC,YAAY,EAAER,cAAA,CAAMQ,YAPD;EAQnBC,OAAO,EAAE;AARU,CAArB;AAWA,MAAMC,eAAe,GAAG;EACtBX,SAAS,EAAEC,cAAA,CAAMD,SADK;EAEtBY,kBAAkB,EAAEX,cAAA,CAAMY,uBAFJ;EAGtBX,KAAK,EAAED,cAAA,CAAMa,eAHS;EA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Z,IAAI,EAAEU,kBAAA,CAAUE,MARQ;EASxBzC,MAAM,EAAEuC,kBAAA,CAAUK,IATM;EAUxBd,iBAAiB,EAAES,kBAAA,CAAUI;AAVL,CAA1B;AAaAzD,aAAa,CAACoD,SAAd,2CAA0B;EACxBnD,IAAI,EAAEoD,kBAAA,CAAUE,MADQ;EAExBrD,aAAa,EAAEmD,kBAAA,CAAUE,MAFD;EAGxBpD,aAAa,EAAEkD,kBAAA,CAAUE,MAHD;EAIxBnD,SAAS,EAAEiD,kBAAA,CAAUE,MAJG;EAKxBlD,WAAW,EAAEgD,kBAAA,CAAUE;AALC,CAA1B;AAQA/C,IAAI,CAAC4C,SAAL,wDACKb,aAAa,CAACa,SADnB;eAIeb,a"}
|
|
@@ -62,6 +62,7 @@ declare namespace BrandLearningPriorities {
|
|
|
62
62
|
}> | PropTypes.InferProps<{
|
|
63
63
|
title: PropTypes.Validator<string>;
|
|
64
64
|
subtitle: PropTypes.Requireable<string>;
|
|
65
|
+
provider: PropTypes.Requireable<string>;
|
|
65
66
|
selected: PropTypes.Requireable<boolean>;
|
|
66
67
|
selectedColor: PropTypes.Requireable<string>;
|
|
67
68
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -114,6 +115,17 @@ declare namespace BrandLearningPriorities {
|
|
|
114
115
|
'aria-label': PropTypes.Requireable<string>;
|
|
115
116
|
contentType: PropTypes.Requireable<string>;
|
|
116
117
|
id: PropTypes.Requireable<string>;
|
|
118
|
+
leftIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
119
|
+
iconName: PropTypes.Requireable<string>;
|
|
120
|
+
iconColor: PropTypes.Requireable<string>;
|
|
121
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
122
|
+
borderRadius: PropTypes.Requireable<string>;
|
|
123
|
+
preset: PropTypes.Requireable<string>;
|
|
124
|
+
gradientBackground: PropTypes.Requireable<boolean>;
|
|
125
|
+
size: PropTypes.Requireable<number>;
|
|
126
|
+
wrapperSize: PropTypes.Requireable<number>;
|
|
127
|
+
}>>;
|
|
128
|
+
editAsIcon: PropTypes.Requireable<boolean>;
|
|
117
129
|
}> | PropTypes.InferProps<{
|
|
118
130
|
'aria-label': PropTypes.Requireable<string>;
|
|
119
131
|
id: PropTypes.Requireable<string>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export default ListItem;
|
|
2
|
-
declare function ListItem({ buttonLink, secondButtonLink, bulletPointMenuButton, tags, title, selected, selectedColor, subtitle, dataColumns, order, "aria-label": ariaLabel, disabled, contentType, isBulkStyle, isOverflowHidden, onClick }: {
|
|
2
|
+
declare function ListItem({ buttonLink, secondButtonLink, bulletPointMenuButton, tags, title, provider, selected, selectedColor, subtitle, dataColumns, order, "aria-label": ariaLabel, disabled, contentType, isBulkStyle, isOverflowHidden, onClick, leftIcon, editAsIcon }: {
|
|
3
3
|
buttonLink: any;
|
|
4
4
|
secondButtonLink: any;
|
|
5
5
|
bulletPointMenuButton: any;
|
|
6
6
|
tags: any;
|
|
7
7
|
title: any;
|
|
8
|
+
provider: any;
|
|
8
9
|
selected: any;
|
|
9
10
|
selectedColor: any;
|
|
10
11
|
subtitle: any;
|
|
@@ -16,6 +17,8 @@ declare function ListItem({ buttonLink, secondButtonLink, bulletPointMenuButton,
|
|
|
16
17
|
isBulkStyle?: boolean | undefined;
|
|
17
18
|
isOverflowHidden?: boolean | undefined;
|
|
18
19
|
onClick?: import("lodash/fp").LodashNoop | undefined;
|
|
20
|
+
leftIcon: any;
|
|
21
|
+
editAsIcon?: boolean | undefined;
|
|
19
22
|
}, context: any): JSX.Element;
|
|
20
23
|
declare namespace ListItem {
|
|
21
24
|
namespace contextTypes {
|
|
@@ -45,6 +48,7 @@ declare namespace ListItem {
|
|
|
45
48
|
const propTypes: {
|
|
46
49
|
title: PropTypes.Validator<string>;
|
|
47
50
|
subtitle: PropTypes.Requireable<string>;
|
|
51
|
+
provider: PropTypes.Requireable<string>;
|
|
48
52
|
selected: PropTypes.Requireable<boolean>;
|
|
49
53
|
selectedColor: PropTypes.Requireable<string>;
|
|
50
54
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -97,6 +101,17 @@ declare namespace ListItem {
|
|
|
97
101
|
'aria-label': PropTypes.Requireable<string>;
|
|
98
102
|
contentType: PropTypes.Requireable<string>;
|
|
99
103
|
id: PropTypes.Requireable<string>;
|
|
104
|
+
leftIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
105
|
+
iconName: PropTypes.Requireable<string>;
|
|
106
|
+
iconColor: PropTypes.Requireable<string>;
|
|
107
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
108
|
+
borderRadius: PropTypes.Requireable<string>;
|
|
109
|
+
preset: PropTypes.Requireable<string>;
|
|
110
|
+
gradientBackground: PropTypes.Requireable<boolean>;
|
|
111
|
+
size: PropTypes.Requireable<number>;
|
|
112
|
+
wrapperSize: PropTypes.Requireable<number>;
|
|
113
|
+
}>>;
|
|
114
|
+
editAsIcon: PropTypes.Requireable<boolean>;
|
|
100
115
|
};
|
|
101
116
|
}
|
|
102
117
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAaA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAaA;;;;;;;;;;;;;;;;;;;;8BAiJC"}
|