@coorpacademy/components 11.40.5 → 11.40.6-alpha.7
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 +15 -8
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +75 -37
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/types.d.ts +20 -14
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js +4 -3
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/button-menu/index.d.ts +1 -3
- package/es/atom/button-menu/index.d.ts.map +1 -1
- package/es/atom/button-menu/index.js +1 -7
- package/es/atom/button-menu/index.js.map +1 -1
- package/es/atom/button-menu/types.d.ts +2 -6
- package/es/atom/button-menu/types.d.ts.map +1 -1
- package/es/atom/radio-with-title/index.d.ts +15 -8
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.d.ts +15 -8
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/title/index.d.ts +15 -8
- package/es/molecule/bullet-point-menu-button/index.d.ts +1 -3
- package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/es/molecule/bullet-point-menu-button/types.d.ts +1 -3
- package/es/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
- package/es/molecule/button-menu-action/index.d.ts +19 -11
- package/es/molecule/button-menu-action/index.d.ts.map +1 -1
- package/es/molecule/button-menu-action/index.js +27 -3
- package/es/molecule/button-menu-action/index.js.map +1 -1
- package/es/molecule/button-menu-action/types.d.ts +22 -12
- package/es/molecule/button-menu-action/types.d.ts.map +1 -1
- package/es/molecule/button-menu-action/types.js +7 -2
- package/es/molecule/button-menu-action/types.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +133 -85
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/index.d.ts +17 -14
- package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/types.d.ts +17 -14
- package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/es/molecule/quick-filters/index.d.ts +15 -8
- package/es/molecule/quick-filters/index.d.ts.map +1 -1
- package/es/molecule/quick-filters/types.d.ts +15 -8
- package/es/molecule/quick-filters/types.d.ts.map +1 -1
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +15 -8
- package/es/molecule/title-radio-wrapper/index.d.ts +15 -8
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +15 -8
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/organism/content-skill-modal/index.d.ts +115 -68
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +115 -68
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/icon-editor/index.d.ts +15 -8
- package/es/organism/icon-editor/index.d.ts.map +1 -1
- package/es/organism/icon-editor/types.d.ts +15 -8
- package/es/organism/icon-editor/types.d.ts.map +1 -1
- package/es/organism/list-items/index.d.ts +115 -68
- package/es/organism/rewards-form/index.d.ts +15 -8
- package/es/organism/select-opponents/index.d.ts +15 -8
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +15 -8
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/setup-header/index.d.ts +60 -32
- package/es/organism/title-and-input/index.d.ts +45 -24
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +45 -24
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +62 -38
- package/es/template/app-player/loading/index.d.ts +133 -85
- package/es/template/app-player/player/index.d.ts +274 -170
- package/es/template/app-player/player/slides/header/index.d.ts +8 -0
- package/es/template/app-player/player/slides/header/index.d.ts.map +1 -1
- package/es/template/app-player/player/slides/header/index.js +92 -3
- package/es/template/app-player/player/slides/header/index.js.map +1 -1
- package/es/template/app-player/player/slides/header/style.css +1 -1
- package/es/template/app-player/player/slides/index.d.ts +141 -85
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +133 -85
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +141 -85
- package/es/template/app-review/index.d.ts +133 -85
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +133 -85
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +133 -85
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-create/index.d.ts +60 -32
- package/es/template/back-office/brand-create/index.d.ts.map +1 -1
- package/es/template/back-office/brand-list/index.d.ts +60 -32
- package/es/template/back-office/brand-list/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +485 -291
- package/es/template/back-office/dashboard-preview/index.d.ts +60 -32
- package/es/template/back-office/layout/index.d.ts +60 -32
- package/es/template/back-office/layout/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.d.ts +266 -170
- package/es/template/common/search-page/index.d.ts +133 -85
- package/es/template/external-course/index.d.ts +133 -85
- package/es/variables/colors.d.ts +1 -0
- package/es/variables/colors.d.ts.map +1 -1
- package/es/variables/colors.js +1 -0
- package/es/variables/colors.js.map +1 -1
- package/lib/atom/button-link/index.d.ts +15 -8
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js +75 -37
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/types.d.ts +20 -14
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js +4 -3
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/button-menu/index.d.ts +1 -3
- package/lib/atom/button-menu/index.d.ts.map +1 -1
- package/lib/atom/button-menu/index.js +1 -7
- package/lib/atom/button-menu/index.js.map +1 -1
- package/lib/atom/button-menu/types.d.ts +2 -6
- package/lib/atom/button-menu/types.d.ts.map +1 -1
- package/lib/atom/radio-with-title/index.d.ts +15 -8
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.d.ts +15 -8
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/title/index.d.ts +15 -8
- package/lib/molecule/bullet-point-menu-button/index.d.ts +1 -3
- package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/lib/molecule/bullet-point-menu-button/types.d.ts +1 -3
- package/lib/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
- package/lib/molecule/button-menu-action/index.d.ts +19 -11
- package/lib/molecule/button-menu-action/index.d.ts.map +1 -1
- package/lib/molecule/button-menu-action/index.js +26 -2
- package/lib/molecule/button-menu-action/index.js.map +1 -1
- package/lib/molecule/button-menu-action/types.d.ts +22 -12
- package/lib/molecule/button-menu-action/types.d.ts.map +1 -1
- package/lib/molecule/button-menu-action/types.js +7 -2
- package/lib/molecule/button-menu-action/types.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +133 -85
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/index.d.ts +17 -14
- package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/types.d.ts +17 -14
- package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/lib/molecule/quick-filters/index.d.ts +15 -8
- package/lib/molecule/quick-filters/index.d.ts.map +1 -1
- package/lib/molecule/quick-filters/types.d.ts +15 -8
- package/lib/molecule/quick-filters/types.d.ts.map +1 -1
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +15 -8
- package/lib/molecule/title-radio-wrapper/index.d.ts +15 -8
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +15 -8
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/index.d.ts +115 -68
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +115 -68
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/icon-editor/index.d.ts +15 -8
- package/lib/organism/icon-editor/index.d.ts.map +1 -1
- package/lib/organism/icon-editor/types.d.ts +15 -8
- package/lib/organism/icon-editor/types.d.ts.map +1 -1
- package/lib/organism/list-items/index.d.ts +115 -68
- package/lib/organism/rewards-form/index.d.ts +15 -8
- package/lib/organism/select-opponents/index.d.ts +15 -8
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +15 -8
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/setup-header/index.d.ts +60 -32
- package/lib/organism/title-and-input/index.d.ts +45 -24
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +45 -24
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +62 -38
- package/lib/template/app-player/loading/index.d.ts +133 -85
- package/lib/template/app-player/player/index.d.ts +274 -170
- package/lib/template/app-player/player/slides/header/index.d.ts +8 -0
- package/lib/template/app-player/player/slides/header/index.d.ts.map +1 -1
- package/lib/template/app-player/player/slides/header/index.js +92 -3
- package/lib/template/app-player/player/slides/header/index.js.map +1 -1
- package/lib/template/app-player/player/slides/header/style.css +1 -1
- package/lib/template/app-player/player/slides/index.d.ts +141 -85
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +133 -85
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +141 -85
- package/lib/template/app-review/index.d.ts +133 -85
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +133 -85
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +133 -85
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-create/index.d.ts +60 -32
- package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-list/index.d.ts +60 -32
- package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +485 -291
- package/lib/template/back-office/dashboard-preview/index.d.ts +60 -32
- package/lib/template/back-office/layout/index.d.ts +60 -32
- package/lib/template/back-office/layout/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +266 -170
- package/lib/template/common/search-page/index.d.ts +133 -85
- package/lib/template/external-course/index.d.ts +133 -85
- package/lib/variables/colors.d.ts +1 -0
- package/lib/variables/colors.d.ts.map +1 -1
- package/lib/variables/colors.js +1 -0
- package/lib/variables/colors.js.map +1 -1
- package/package.json +2 -2
|
@@ -16,6 +16,14 @@ declare namespace SlidesHeader {
|
|
|
16
16
|
count: PropTypes.Requireable<number>;
|
|
17
17
|
}>>;
|
|
18
18
|
const mode: PropTypes.Requireable<string>;
|
|
19
|
+
const multiLang: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
+
currentLang: PropTypes.Requireable<string>;
|
|
22
|
+
supportedLangs: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
23
|
+
code: PropTypes.Validator<string>;
|
|
24
|
+
label: PropTypes.Validator<string>;
|
|
25
|
+
}> | null | undefined)[]>;
|
|
26
|
+
}>>;
|
|
19
27
|
}
|
|
20
28
|
}
|
|
21
29
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/template/app-player/player/slides/header/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/template/app-player/player/slides/header/index.js"],"names":[],"mappings":";AAmFA,4EAeC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import _upperCase from "lodash/fp/upperCase";
|
|
2
|
+
import _map from "lodash/fp/map";
|
|
3
|
+
import _isEmpty from "lodash/fp/isEmpty";
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import PropTypes from 'prop-types';
|
|
3
6
|
import Link from '../../../../../atom/link';
|
|
7
|
+
import ButtonMenuAction from '../../../../../molecule/button-menu-action';
|
|
8
|
+
import { COLORS } from '../../../../../variables/colors';
|
|
4
9
|
import Learner from './learner';
|
|
5
10
|
import Microlearning from './microlearning';
|
|
6
11
|
import Lives from './lives';
|
|
@@ -10,14 +15,90 @@ const HEADER_TYPE = {
|
|
|
10
15
|
LEARNER: 'learner',
|
|
11
16
|
MICROLEARNING: 'microlearning'
|
|
12
17
|
};
|
|
18
|
+
const STYLE_CHECKED = {
|
|
19
|
+
icon: {
|
|
20
|
+
position: 'right',
|
|
21
|
+
faIcon: {
|
|
22
|
+
name: 'check',
|
|
23
|
+
color: COLORS.white,
|
|
24
|
+
backgroundColor: COLORS.cm_primary_blue,
|
|
25
|
+
size: 10,
|
|
26
|
+
customStyle: {
|
|
27
|
+
padding: '0px',
|
|
28
|
+
height: '16px',
|
|
29
|
+
width: '16px'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
customStyle: {
|
|
34
|
+
backgroundColor: COLORS.cm_blue_50
|
|
35
|
+
},
|
|
36
|
+
contentCustomStyle: {
|
|
37
|
+
width: '100%',
|
|
38
|
+
justifyContent: 'space-between'
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const buttonMenuActionProps = multiLangOptions => {
|
|
42
|
+
console.log('TCL ------> ~ buttonMenuActionProps ~ multiLangOptions:', multiLangOptions);
|
|
43
|
+
const {
|
|
44
|
+
currentLang = 'en',
|
|
45
|
+
supportedLangs = [],
|
|
46
|
+
onClick
|
|
47
|
+
} = multiLangOptions;
|
|
48
|
+
return {
|
|
49
|
+
button: {
|
|
50
|
+
type: 'text',
|
|
51
|
+
label: _upperCase(currentLang),
|
|
52
|
+
'aria-label': `${currentLang}-button`,
|
|
53
|
+
'data-name': 'button-multi-lang',
|
|
54
|
+
onClick: () => null,
|
|
55
|
+
icon: {
|
|
56
|
+
position: 'left',
|
|
57
|
+
faIcon: {
|
|
58
|
+
name: 'globe',
|
|
59
|
+
color: COLORS.neutral_700,
|
|
60
|
+
size: 14
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
customStyle: {
|
|
64
|
+
width: 'fit-content',
|
|
65
|
+
color: COLORS.neutral_500,
|
|
66
|
+
fontWeight: 600
|
|
67
|
+
},
|
|
68
|
+
withChevron: true
|
|
69
|
+
},
|
|
70
|
+
menu: {
|
|
71
|
+
buttons: _map(({
|
|
72
|
+
code,
|
|
73
|
+
label
|
|
74
|
+
}) => ({
|
|
75
|
+
...(currentLang === code ? STYLE_CHECKED : {}),
|
|
76
|
+
type: 'defaultLeft',
|
|
77
|
+
onClick: () => onClick(code),
|
|
78
|
+
label,
|
|
79
|
+
'data-name': `${code}-button`,
|
|
80
|
+
disabled: false
|
|
81
|
+
}), supportedLangs)
|
|
82
|
+
},
|
|
83
|
+
menuWrapper: {
|
|
84
|
+
customStyle: {
|
|
85
|
+
maxHeight: '248px',
|
|
86
|
+
width: '209px'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
};
|
|
13
91
|
const SlidesHeader = (props = {}, context = undefined) => {
|
|
14
92
|
const {
|
|
15
93
|
type,
|
|
16
94
|
content,
|
|
17
95
|
subcontent,
|
|
18
96
|
lives,
|
|
19
|
-
mode
|
|
97
|
+
mode,
|
|
98
|
+
multiLang
|
|
20
99
|
} = props;
|
|
100
|
+
console.log('TCL ------> ~ SlidesHeader ~ props:', props);
|
|
101
|
+
console.log('TCL ------> ~ SlidesHeader ~ multiLang:', multiLang);
|
|
21
102
|
return /*#__PURE__*/React.createElement("div", {
|
|
22
103
|
"data-name": "slidesHeader",
|
|
23
104
|
className: style.wrapper
|
|
@@ -28,7 +109,7 @@ const SlidesHeader = (props = {}, context = undefined) => {
|
|
|
28
109
|
}) : null, type === HEADER_TYPE.MICROLEARNING ? /*#__PURE__*/React.createElement(Microlearning, {
|
|
29
110
|
content: content,
|
|
30
111
|
mode: mode
|
|
31
|
-
}) : null, lives ? /*#__PURE__*/React.createElement(Lives, {
|
|
112
|
+
}) : null, _isEmpty(multiLang) ? null : /*#__PURE__*/React.createElement(ButtonMenuAction, buttonMenuActionProps(multiLang)), lives ? /*#__PURE__*/React.createElement(Lives, {
|
|
32
113
|
count: lives.count
|
|
33
114
|
}) : null);
|
|
34
115
|
};
|
|
@@ -44,7 +125,15 @@ SlidesHeader.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
44
125
|
details: PropTypes.string
|
|
45
126
|
}),
|
|
46
127
|
lives: PropTypes.shape(Lives.propTypes),
|
|
47
|
-
mode: PropTypes.string
|
|
128
|
+
mode: PropTypes.string,
|
|
129
|
+
multiLang: PropTypes.shape({
|
|
130
|
+
onClick: PropTypes.func,
|
|
131
|
+
currentLang: PropTypes.string,
|
|
132
|
+
supportedLangs: PropTypes.arrayOf(PropTypes.shape({
|
|
133
|
+
code: PropTypes.string.isRequired,
|
|
134
|
+
label: PropTypes.string.isRequired
|
|
135
|
+
}))
|
|
136
|
+
})
|
|
48
137
|
} : {};
|
|
49
138
|
export default SlidesHeader;
|
|
50
139
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","Link","Learner","Microlearning","Lives","style","HEADER_TYPE","LEARNER","MICROLEARNING","SlidesHeader","props","context","undefined","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Link","ButtonMenuAction","COLORS","Learner","Microlearning","Lives","style","HEADER_TYPE","LEARNER","MICROLEARNING","STYLE_CHECKED","icon","position","faIcon","name","color","white","backgroundColor","cm_primary_blue","size","customStyle","padding","height","width","cm_blue_50","contentCustomStyle","justifyContent","buttonMenuActionProps","multiLangOptions","console","log","currentLang","supportedLangs","onClick","button","type","label","_upperCase","neutral_700","neutral_500","fontWeight","withChevron","menu","buttons","_map","code","disabled","menuWrapper","maxHeight","SlidesHeader","props","context","undefined","content","subcontent","lives","mode","multiLang","createElement","className","wrapper","_isEmpty","count","propTypes","process","env","NODE_ENV","oneOf","shape","href","title","string","isRequired","details","func","arrayOf"],"sources":["../../../../../../src/template/app-player/player/slides/header/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map, upperCase} from 'lodash/fp';\nimport Link from '../../../../../atom/link';\nimport ButtonMenuAction from '../../../../../molecule/button-menu-action';\nimport {COLORS} from '../../../../../variables/colors';\nimport Learner from './learner';\nimport Microlearning from './microlearning';\nimport Lives from './lives';\nimport style from './style.css'; // eslint-disable-line css-modules/no-unused-class\n\nconst HEADER_TYPE = {\n LEARNER: 'learner',\n MICROLEARNING: 'microlearning'\n};\n\nconst STYLE_CHECKED = {\n icon: {\n position: 'right',\n faIcon: {\n name: 'check',\n color: COLORS.white,\n backgroundColor: COLORS.cm_primary_blue,\n size: 10,\n customStyle: {\n padding: '0px',\n height: '16px',\n width: '16px'\n }\n }\n },\n customStyle: {backgroundColor: COLORS.cm_blue_50},\n contentCustomStyle: {\n width: '100%',\n justifyContent: 'space-between'\n }\n};\n\nconst buttonMenuActionProps = multiLangOptions => {\n console.log('TCL ------> ~ buttonMenuActionProps ~ multiLangOptions:', multiLangOptions);\n const {currentLang = 'en', supportedLangs = [], onClick} = multiLangOptions;\n\n return {\n button: {\n type: 'text',\n label: upperCase(currentLang),\n 'aria-label': `${currentLang}-button`,\n 'data-name': 'button-multi-lang',\n onClick: () => null,\n icon: {\n position: 'left',\n faIcon: {\n name: 'globe',\n color: COLORS.neutral_700,\n size: 14\n }\n },\n customStyle: {\n width: 'fit-content',\n color: COLORS.neutral_500,\n fontWeight: 600\n },\n withChevron: true\n },\n menu: {\n buttons: map(\n ({code, label}) => ({\n ...(currentLang === code ? STYLE_CHECKED : {}),\n type: 'defaultLeft',\n onClick: () => onClick(code),\n label,\n 'data-name': `${code}-button`,\n disabled: false\n }),\n supportedLangs\n )\n },\n menuWrapper: {\n customStyle: {maxHeight: '248px', width: '209px'}\n }\n };\n};\n\nconst SlidesHeader = (props = {}, context = undefined) => {\n const {type, content, subcontent, lives, mode, multiLang} = props;\n console.log('TCL ------> ~ SlidesHeader ~ props:', props);\n console.log('TCL ------> ~ SlidesHeader ~ multiLang:', multiLang);\n\n return (\n <div data-name=\"slidesHeader\" className={style.wrapper}>\n {type === HEADER_TYPE.LEARNER ? (\n <Learner content={content} subcontent={subcontent} mode={mode} />\n ) : null}\n {type === HEADER_TYPE.MICROLEARNING ? <Microlearning content={content} mode={mode} /> : null}\n {isEmpty(multiLang) ? null : <ButtonMenuAction {...buttonMenuActionProps(multiLang)} />}\n {lives ? <Lives count={lives.count} /> : null}\n </div>\n );\n};\n\nSlidesHeader.propTypes = {\n type: PropTypes.oneOf([HEADER_TYPE.LEARNER, HEADER_TYPE.MICROLEARNING]),\n content: PropTypes.shape({\n href: Link.propTypes.href,\n title: PropTypes.string.isRequired,\n details: PropTypes.string\n }),\n subcontent: PropTypes.shape({\n title: PropTypes.string,\n details: PropTypes.string\n }),\n lives: PropTypes.shape(Lives.propTypes),\n mode: PropTypes.string,\n multiLang: PropTypes.shape({\n onClick: PropTypes.func,\n currentLang: PropTypes.string,\n supportedLangs: PropTypes.arrayOf(\n PropTypes.shape({\n code: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired\n })\n )\n })\n};\n\nexport default SlidesHeader;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,IAAI,MAAM,0BAA0B;AAC3C,OAAOC,gBAAgB,MAA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