@coorpacademy/components 11.32.14 → 11.32.15-alpha.13
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/style.css +1 -0
- package/es/atom/select/index.d.ts.map +1 -1
- package/es/atom/select/index.js +2 -1
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/select/style.css +23 -0
- package/es/molecule/cm-popin/types.d.ts +3 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/index.d.ts +4 -1
- package/es/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/index.js +8 -3
- package/es/molecule/dashboard/cards-list/index.js.map +1 -1
- package/es/molecule/dashboard/cards-list/prop-types.d.ts +3 -1
- package/es/molecule/dashboard/cards-list/prop-types.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/prop-types.js.map +1 -1
- package/es/molecule/dashboard/cards-list/style.css +4 -0
- package/es/molecule/discipline-associated-skills/index.d.ts +1 -0
- package/es/molecule/discipline-associated-skills/index.js +2 -1
- package/es/molecule/discipline-associated-skills/index.js.map +1 -1
- package/es/molecule/discipline-associated-skills/style.css +16 -3
- package/es/organism/cards-grid/index.d.ts +3 -0
- package/es/organism/cards-grid/index.js +4 -1
- package/es/organism/cards-grid/index.js.map +1 -1
- package/es/organism/cards-grid/style.css +0 -1
- package/es/template/app-player/loading/index.d.ts +3 -0
- package/es/template/app-player/player/index.d.ts +6 -0
- package/es/template/app-player/player/slides/index.d.ts +3 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +3 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +7 -1
- package/es/template/app-player/popin-end/summary.d.ts +4 -1
- package/es/template/app-review/index.d.ts +3 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +3 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +3 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +3 -0
- package/es/template/common/authors/index.d.ts +3 -0
- package/es/template/common/authors/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.d.ts +6 -0
- package/es/template/common/discipline/index.d.ts +1 -0
- package/es/template/common/discipline/index.js +1 -0
- package/es/template/common/discipline/index.js.map +1 -1
- package/es/template/common/search-page/index.d.ts +10 -1
- package/es/template/external-course/index.d.ts +3 -0
- package/es/template/my-learning/index.d.ts +3 -0
- package/es/template/my-learning/index.d.ts.map +1 -1
- package/es/template/my-learning/index.js +8 -3
- package/es/template/my-learning/index.js.map +1 -1
- package/es/template/skill-detail/all-courses.css +128 -0
- package/es/template/skill-detail/all-courses.d.ts +80 -0
- package/es/template/skill-detail/all-courses.d.ts.map +1 -0
- package/es/template/skill-detail/all-courses.js +195 -0
- package/es/template/skill-detail/all-courses.js.map +1 -0
- package/es/template/skill-detail/continue-learning.css +16 -0
- package/es/template/skill-detail/continue-learning.d.ts +39 -0
- package/es/template/skill-detail/continue-learning.d.ts.map +1 -0
- package/es/template/skill-detail/continue-learning.js +42 -0
- package/es/template/skill-detail/continue-learning.js.map +1 -0
- package/es/template/skill-detail/index.d.ts +101 -0
- package/es/template/skill-detail/index.d.ts.map +1 -0
- package/es/template/skill-detail/index.js +228 -0
- package/es/template/skill-detail/index.js.map +1 -0
- package/es/template/skill-detail/style.css +174 -0
- package/es/template/teams-dashboard/index.d.ts +4 -1
- package/lib/atom/button-link/style.css +1 -0
- package/lib/atom/select/index.d.ts.map +1 -1
- package/lib/atom/select/index.js +2 -1
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/select/style.css +23 -0
- package/lib/molecule/cm-popin/types.d.ts +3 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.d.ts +4 -1
- package/lib/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.js +8 -4
- package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/prop-types.d.ts +3 -1
- package/lib/molecule/dashboard/cards-list/prop-types.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/prop-types.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/style.css +4 -0
- package/lib/molecule/discipline-associated-skills/index.d.ts +1 -0
- package/lib/molecule/discipline-associated-skills/index.js +2 -1
- package/lib/molecule/discipline-associated-skills/index.js.map +1 -1
- package/lib/molecule/discipline-associated-skills/style.css +16 -3
- package/lib/organism/cards-grid/index.d.ts +3 -0
- package/lib/organism/cards-grid/index.js +4 -1
- package/lib/organism/cards-grid/index.js.map +1 -1
- package/lib/organism/cards-grid/style.css +0 -1
- package/lib/template/app-player/loading/index.d.ts +3 -0
- package/lib/template/app-player/player/index.d.ts +6 -0
- package/lib/template/app-player/player/slides/index.d.ts +3 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +3 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +7 -1
- package/lib/template/app-player/popin-end/summary.d.ts +4 -1
- package/lib/template/app-review/index.d.ts +3 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +3 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +3 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +3 -0
- package/lib/template/common/authors/index.d.ts +3 -0
- package/lib/template/common/authors/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +6 -0
- package/lib/template/common/discipline/index.d.ts +1 -0
- package/lib/template/common/discipline/index.js +1 -0
- package/lib/template/common/discipline/index.js.map +1 -1
- package/lib/template/common/search-page/index.d.ts +10 -1
- package/lib/template/external-course/index.d.ts +3 -0
- package/lib/template/my-learning/index.d.ts +3 -0
- package/lib/template/my-learning/index.d.ts.map +1 -1
- package/lib/template/my-learning/index.js +8 -3
- package/lib/template/my-learning/index.js.map +1 -1
- package/lib/template/skill-detail/all-courses.css +128 -0
- package/lib/template/skill-detail/all-courses.d.ts +80 -0
- package/lib/template/skill-detail/all-courses.d.ts.map +1 -0
- package/lib/template/skill-detail/all-courses.js +214 -0
- package/lib/template/skill-detail/all-courses.js.map +1 -0
- package/lib/template/skill-detail/continue-learning.css +16 -0
- package/lib/template/skill-detail/continue-learning.d.ts +39 -0
- package/lib/template/skill-detail/continue-learning.d.ts.map +1 -0
- package/lib/template/skill-detail/continue-learning.js +59 -0
- package/lib/template/skill-detail/continue-learning.js.map +1 -0
- package/lib/template/skill-detail/index.d.ts +101 -0
- package/lib/template/skill-detail/index.d.ts.map +1 -0
- package/lib/template/skill-detail/index.js +250 -0
- package/lib/template/skill-detail/index.js.map +1 -0
- package/lib/template/skill-detail/style.css +174 -0
- package/lib/template/teams-dashboard/index.d.ts +4 -1
- package/locales/en/global.json +8 -0
- package/package.json +2 -2
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _get2 = _interopRequireDefault(require("lodash/fp/get"));
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _cssColorFunction = require("css-color-function");
|
|
13
|
+
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
16
|
+
var _provider = _interopRequireDefault(require("../../atom/provider"));
|
|
17
|
+
|
|
18
|
+
var _select = _interopRequireWildcard(require("../../atom/select"));
|
|
19
|
+
|
|
20
|
+
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
21
|
+
|
|
22
|
+
var _icon = _interopRequireDefault(require("../../atom/icon"));
|
|
23
|
+
|
|
24
|
+
var _cardsGrid = _interopRequireDefault(require("../../organism/cards-grid"));
|
|
25
|
+
|
|
26
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
27
|
+
|
|
28
|
+
var _allCourses = _interopRequireDefault(require("./all-courses"));
|
|
29
|
+
|
|
30
|
+
var _continueLearning = _interopRequireDefault(require("./continue-learning"));
|
|
31
|
+
|
|
32
|
+
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); }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
|
+
|
|
38
|
+
const ContinueLearningButton = (props, context) => {
|
|
39
|
+
const [hovered, setHovered] = (0, _react.useState)(false);
|
|
40
|
+
const {
|
|
41
|
+
ongoingCoursesAvailable,
|
|
42
|
+
onClick
|
|
43
|
+
} = props;
|
|
44
|
+
const {
|
|
45
|
+
skin,
|
|
46
|
+
translate
|
|
47
|
+
} = context;
|
|
48
|
+
const primarySkinColor = (0, _get2.default)('common.primary', skin);
|
|
49
|
+
const handleMouseOver = (0, _react.useCallback)(() => setHovered(true), [setHovered]);
|
|
50
|
+
const handleMouseLeave = (0, _react.useCallback)(() => setHovered(false), [setHovered]);
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
52
|
+
onMouseOver: handleMouseOver,
|
|
53
|
+
onMouseLeave: handleMouseLeave
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
55
|
+
label: ongoingCoursesAvailable ? translate('continue_learning') : translate('start_learning'),
|
|
56
|
+
type: "primary",
|
|
57
|
+
customStyle: {
|
|
58
|
+
width: 'fit-content',
|
|
59
|
+
borderRadius: '12px',
|
|
60
|
+
backgroundColor: hovered ? (0, _cssColorFunction.convert)(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`) : primarySkinColor
|
|
61
|
+
},
|
|
62
|
+
icon: {
|
|
63
|
+
position: 'left',
|
|
64
|
+
faIcon: {
|
|
65
|
+
name: 'play',
|
|
66
|
+
color: '#FFFFFF',
|
|
67
|
+
size: 16
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
onClick: onClick
|
|
71
|
+
}));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
ContinueLearningButton.contextTypes = {
|
|
75
|
+
skin: _provider.default.childContextTypes.skin,
|
|
76
|
+
translate: _provider.default.childContextTypes.translate
|
|
77
|
+
};
|
|
78
|
+
ContinueLearningButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
79
|
+
ongoingCoursesAvailable: _propTypes.default.bool,
|
|
80
|
+
onClick: _propTypes.default.func
|
|
81
|
+
} : {};
|
|
82
|
+
|
|
83
|
+
const SkillDetail = (props, context) => {
|
|
84
|
+
const {
|
|
85
|
+
title,
|
|
86
|
+
skillRef,
|
|
87
|
+
description,
|
|
88
|
+
metrics = {},
|
|
89
|
+
focused,
|
|
90
|
+
availableForReview,
|
|
91
|
+
ongoingCourses,
|
|
92
|
+
skillIncludedCourses,
|
|
93
|
+
totalCourses,
|
|
94
|
+
filters,
|
|
95
|
+
sorting,
|
|
96
|
+
onBackClick,
|
|
97
|
+
onReviewClick,
|
|
98
|
+
onContinueLearningClick
|
|
99
|
+
} = props;
|
|
100
|
+
const {
|
|
101
|
+
score,
|
|
102
|
+
content,
|
|
103
|
+
questionsToReview,
|
|
104
|
+
contentCompleted = 0
|
|
105
|
+
} = metrics;
|
|
106
|
+
const {
|
|
107
|
+
translate
|
|
108
|
+
} = context;
|
|
109
|
+
const [showMore, setShowMore] = (0, _react.useState)(false);
|
|
110
|
+
const handleShowMore = (0, _react.useCallback)(() => setShowMore(!showMore), [setShowMore, showMore]);
|
|
111
|
+
const Description = (0, _react.useCallback)(() => {
|
|
112
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
113
|
+
className: (0, _classnames.default)(_style.default.description, !showMore && _style.default.truncate)
|
|
114
|
+
}, description);
|
|
115
|
+
}, [showMore, description]);
|
|
116
|
+
const ProgressBar = (0, _react.useCallback)(() => {
|
|
117
|
+
if (score === undefined) return null;
|
|
118
|
+
const progressBarColor = '#3EC483';
|
|
119
|
+
const inlineProgressValueStyle = {
|
|
120
|
+
backgroundColor: progressBarColor,
|
|
121
|
+
width: `${score}%`
|
|
122
|
+
};
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
124
|
+
className: _style.default.progressBarWrapper
|
|
125
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
126
|
+
"data-name": "progress",
|
|
127
|
+
className: _style.default.progress,
|
|
128
|
+
style: inlineProgressValueStyle,
|
|
129
|
+
role: "progressbar"
|
|
130
|
+
}));
|
|
131
|
+
}, [score]);
|
|
132
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
133
|
+
className: _style.default.backgroundContainer
|
|
134
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
135
|
+
className: _style.default.container,
|
|
136
|
+
"data-name": skillRef
|
|
137
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
+
className: _style.default.backButtonWrapper,
|
|
139
|
+
onClick: onBackClick
|
|
140
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
141
|
+
iconName: "arrow-left",
|
|
142
|
+
size: {
|
|
143
|
+
faSize: 14,
|
|
144
|
+
wrapperSize: 14
|
|
145
|
+
}
|
|
146
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
147
|
+
className: _style.default.ctaContainer
|
|
148
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, focused ? /*#__PURE__*/_react.default.createElement("div", {
|
|
149
|
+
className: _style.default.skillFocusBadge
|
|
150
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
151
|
+
iconName: "bullseye-arrow",
|
|
152
|
+
backgroundColor: "#DDD1FF",
|
|
153
|
+
size: {
|
|
154
|
+
faSize: 10,
|
|
155
|
+
wrapperSize: 16
|
|
156
|
+
}
|
|
157
|
+
}), translate('skill_focus')) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
158
|
+
className: _style.default.title
|
|
159
|
+
}, title), description ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Description, null), description.length >= 226 ? /*#__PURE__*/_react.default.createElement("div", {
|
|
160
|
+
className: _style.default.showMoreWrapper,
|
|
161
|
+
onClick: handleShowMore
|
|
162
|
+
}, showMore ? translate('Show less') : translate('Show more'), /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
163
|
+
iconName: showMore ? 'chevron-up' : 'chevron-down',
|
|
164
|
+
size: {
|
|
165
|
+
faSize: 14,
|
|
166
|
+
wrapperSize: 16
|
|
167
|
+
}
|
|
168
|
+
})) : null) : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
169
|
+
className: _style.default.ctaWrapper
|
|
170
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
171
|
+
type: "secondary",
|
|
172
|
+
onClick: onReviewClick,
|
|
173
|
+
label: translate('review_this_skill'),
|
|
174
|
+
disabled: !availableForReview,
|
|
175
|
+
customStyle: {
|
|
176
|
+
width: 'fit-content',
|
|
177
|
+
borderRadius: '12px'
|
|
178
|
+
}
|
|
179
|
+
}), /*#__PURE__*/_react.default.createElement(ContinueLearningButton, {
|
|
180
|
+
ongoingCoursesAvailable: !!ongoingCourses.list.length,
|
|
181
|
+
onClick: onContinueLearningClick
|
|
182
|
+
}))), score !== undefined ? /*#__PURE__*/_react.default.createElement("div", {
|
|
183
|
+
className: _style.default.progressInformationsWrapper
|
|
184
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
185
|
+
className: _style.default.progressTitle
|
|
186
|
+
}, translate('your_progress')), /*#__PURE__*/_react.default.createElement("div", {
|
|
187
|
+
className: _style.default.skillCoursesAndQuestionsWrapper
|
|
188
|
+
}, content ? /*#__PURE__*/_react.default.createElement("div", {
|
|
189
|
+
className: _style.default.skillInformation,
|
|
190
|
+
"data-name": "skill-courses"
|
|
191
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
192
|
+
className: _style.default.skillInformationNumber
|
|
193
|
+
}, content), ' ', translate('courses')) : null, questionsToReview ? /*#__PURE__*/_react.default.createElement("div", {
|
|
194
|
+
className: _style.default.skillInformation,
|
|
195
|
+
"data-name": "skill-questions"
|
|
196
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
197
|
+
className: _style.default.skillInformationNumber
|
|
198
|
+
}, questionsToReview), "\xA0", translate('questions')) : null), /*#__PURE__*/_react.default.createElement(ProgressBar, null), /*#__PURE__*/_react.default.createElement("div", {
|
|
199
|
+
className: _style.default.progressInformations
|
|
200
|
+
}, content && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
201
|
+
className: _style.default.progressInformation,
|
|
202
|
+
"data-name": "skill-completed-courses"
|
|
203
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
204
|
+
className: _style.default.progressInformationNumber
|
|
205
|
+
}, contentCompleted), ` ${translate('courses_completed')}`), /*#__PURE__*/_react.default.createElement("div", {
|
|
206
|
+
className: _style.default.progressInformation,
|
|
207
|
+
"data-name": "completed-percentage"
|
|
208
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
209
|
+
className: _style.default.progressInformationNumber
|
|
210
|
+
}, score, "%"))))) : null, /*#__PURE__*/_react.default.createElement(_continueLearning.default, {
|
|
211
|
+
ongoingCourses: ongoingCourses
|
|
212
|
+
}), /*#__PURE__*/_react.default.createElement(_allCourses.default, {
|
|
213
|
+
skillIncludedCourses: skillIncludedCourses,
|
|
214
|
+
totalCourses: totalCourses,
|
|
215
|
+
filters: filters,
|
|
216
|
+
sorting: sorting
|
|
217
|
+
})));
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
SkillDetail.contextTypes = {
|
|
221
|
+
skin: _provider.default.childContextTypes.skin,
|
|
222
|
+
translate: _provider.default.childContextTypes.translate
|
|
223
|
+
};
|
|
224
|
+
SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
225
|
+
title: _propTypes.default.string.isRequired,
|
|
226
|
+
skillRef: _propTypes.default.string.isRequired,
|
|
227
|
+
description: _propTypes.default.string,
|
|
228
|
+
metrics: _propTypes.default.shape({
|
|
229
|
+
score: _propTypes.default.number,
|
|
230
|
+
content: _propTypes.default.number,
|
|
231
|
+
questionsToReview: _propTypes.default.number,
|
|
232
|
+
contentCompleted: _propTypes.default.number
|
|
233
|
+
}),
|
|
234
|
+
focused: _propTypes.default.bool,
|
|
235
|
+
availableForReview: _propTypes.default.bool,
|
|
236
|
+
ongoingCourses: _propTypes.default.shape(_cardsGrid.default.propTypes),
|
|
237
|
+
skillIncludedCourses: _propTypes.default.shape(_cardsGrid.default.propTypes),
|
|
238
|
+
totalCourses: _propTypes.default.number,
|
|
239
|
+
filters: _propTypes.default.shape({
|
|
240
|
+
onChange: _propTypes.default.func,
|
|
241
|
+
options: _propTypes.default.arrayOf(_propTypes.default.shape(_select.SelectOptionPropTypes))
|
|
242
|
+
}),
|
|
243
|
+
sorting: _propTypes.default.shape(_select.default.propTypes),
|
|
244
|
+
onBackClick: _propTypes.default.func,
|
|
245
|
+
onReviewClick: _propTypes.default.func,
|
|
246
|
+
onContinueLearningClick: _propTypes.default.func
|
|
247
|
+
} : {};
|
|
248
|
+
var _default = SkillDetail;
|
|
249
|
+
exports.default = _default;
|
|
250
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ContinueLearningButton","props","context","hovered","setHovered","useState","ongoingCoursesAvailable","onClick","skin","translate","primarySkinColor","handleMouseOver","useCallback","handleMouseLeave","width","borderRadius","backgroundColor","convert","position","faIcon","name","color","size","contextTypes","Provider","childContextTypes","propTypes","PropTypes","bool","func","SkillDetail","title","skillRef","description","metrics","focused","availableForReview","ongoingCourses","skillIncludedCourses","totalCourses","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","handleShowMore","Description","classnames","style","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButtonWrapper","faSize","wrapperSize","ctaContainer","skillFocusBadge","length","showMoreWrapper","ctaWrapper","list","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","string","isRequired","shape","number","CardsGrid","onChange","options","arrayOf","SelectOptionPropTypes","Select"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport style from './style.css';\nimport AllCourses from './all-courses';\nimport ContinueLearning from './continue-learning';\n\nconst ContinueLearningButton = (props, context) => {\n const [hovered, setHovered] = useState(false);\n const {ongoingCoursesAvailable, onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n return (\n <div onMouseOver={handleMouseOver} onMouseLeave={handleMouseLeave}>\n <ButtonLink\n label={\n ongoingCoursesAvailable ? translate('continue_learning') : translate('start_learning')\n }\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px',\n backgroundColor: hovered\n ? convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)\n : primarySkinColor\n }}\n icon={{\n position: 'left',\n faIcon: {\n name: 'play',\n color: '#FFFFFF',\n size: 16\n }\n }}\n onClick={onClick}\n />\n </div>\n );\n};\n\nContinueLearningButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearningButton.propTypes = {\n ongoingCoursesAvailable: PropTypes.bool,\n onClick: PropTypes.func\n};\n\nconst SkillDetail = (props, context) => {\n const {\n title,\n skillRef,\n description,\n metrics = {},\n focused,\n availableForReview,\n ongoingCourses,\n skillIncludedCourses,\n totalCourses,\n filters,\n sorting,\n onBackClick,\n onReviewClick,\n onContinueLearningClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {translate} = context;\n\n const [showMore, setShowMore] = useState(false);\n\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 const ProgressBar = useCallback(() => {\n if (score === undefined) return null;\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${score}%`\n };\n\n return (\n <div className={style.progressBarWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressValueStyle}\n role=\"progressbar\"\n />\n </div>\n );\n }, [score]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={skillRef}>\n <div className={style.backButtonWrapper} onClick={onBackClick}>\n <Icon\n iconName=\"arrow-left\"\n size={{\n faSize: 14,\n wrapperSize: 14\n }}\n />\n </div>\n <div className={style.ctaContainer}>\n <div>\n {focused ? (\n <div className={style.skillFocusBadge}>\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 10,\n wrapperSize: 16\n }}\n />\n {translate('skill_focus')}\n </div>\n ) : null}\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {description.length >= 226 ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {showMore ? translate('Show less') : translate('Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{\n faSize: 14,\n wrapperSize: 16\n }}\n />\n </div>\n ) : null}\n </>\n ) : null}\n </div>\n\n <div className={style.ctaWrapper}>\n <ButtonLink\n type=\"secondary\"\n onClick={onReviewClick}\n label={translate('review_this_skill')}\n disabled={!availableForReview}\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px'\n }}\n />\n <ContinueLearningButton\n ongoingCoursesAvailable={!!ongoingCourses.list.length}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n {score !== undefined ? (\n <div className={style.progressInformationsWrapper}>\n <div className={style.progressTitle}>{translate('your_progress')}</div>\n <div className={style.skillCoursesAndQuestionsWrapper}>\n {content ? (\n <div className={style.skillInformation} data-name=\"skill-courses\">\n <span className={style.skillInformationNumber}>{content}</span>{' '}\n {translate('courses')}\n </div>\n ) : null}\n {questionsToReview ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n {translate('questions')}\n </div>\n ) : null}\n </div>\n <ProgressBar />\n <div className={style.progressInformations}>\n {content && (\n <>\n <div className={style.progressInformation} data-name=\"skill-completed-courses\">\n <span className={style.progressInformationNumber}>{contentCompleted}</span>\n {` ${translate('courses_completed')}`}\n </div>\n <div className={style.progressInformation} data-name=\"completed-percentage\">\n <span className={style.progressInformationNumber}>{score}%</span>\n </div>\n </>\n )}\n </div>\n </div>\n ) : null}\n <ContinueLearning ongoingCourses={ongoingCourses} />\n <AllCourses\n skillIncludedCourses={skillIncludedCourses}\n totalCourses={totalCourses}\n filters={filters}\n sorting={sorting}\n />\n </div>\n </div>\n );\n};\n\nSkillDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nSkillDetail.propTypes = {\n title: PropTypes.string.isRequired,\n skillRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n content: PropTypes.number,\n questionsToReview: PropTypes.number,\n contentCompleted: PropTypes.number\n }),\n focused: PropTypes.bool,\n availableForReview: PropTypes.bool,\n ongoingCourses: PropTypes.shape(CardsGrid.propTypes),\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\n totalCourses: 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 onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default SkillDetail;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,sBAAsB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACjD,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwB,IAAAC,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IAVG;EAWtBQ,kBAAkB,EAAET,kBAAA,CAAUC,IAXR;EAYtBS,cAAc,EAAEV,kBAAA,CAAUwD,KAAV,CAAgBE,kBAAA,CAAU3D,SAA1B,CAZM;EAatBY,oBAAoB,EAAEX,kBAAA,CAAUwD,KAAV,CAAgBE,kBAAA,CAAU3D,SAA1B,CAbA;EActBa,YAAY,EAAEZ,kBAAA,CAAUyD,MAdF;EAetB5C,OAAO,EAAEb,kBAAA,CAAUwD,KAAV,CAAgB;IACvBG,QAAQ,EAAE3D,kBAAA,CAAUE,IADG;IAEvB0D,OAAO,EAAE5D,kBAAA,CAAU6D,OAAV,CAAkB7D,kBAAA,CAAUwD,KAAV,CAAgBM,6BAAhB,CAAlB;EAFc,CAAhB,CAfa;EAmBtBhD,OAAO,EAAEd,kBAAA,CAAUwD,KAAV,CAAgBO,eAAA,CAAOhE,SAAvB,CAnBa;EAoBtBgB,WAAW,EAAEf,kBAAA,CAAUE,IApBD;EAqBtBc,aAAa,EAAEhB,kBAAA,CAAUE,IArBH;EAsBtBe,uBAAuB,EAAEjB,kBAAA,CAAUE;AAtBb,CAAxB;eAyBeC,W"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value breakpoints: "../../variables/breakpoints.css";
|
|
3
|
+
@value tablet from breakpoints;
|
|
4
|
+
@value mobile from breakpoints;
|
|
5
|
+
@value xtraLightGrey from colors;
|
|
6
|
+
@value cm_grey_100 from colors;
|
|
7
|
+
@value cm_grey_200 from colors;
|
|
8
|
+
@value cm_grey_400 from colors;
|
|
9
|
+
|
|
10
|
+
.textBase {
|
|
11
|
+
font-family: "Gilroy";
|
|
12
|
+
font-style: normal;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.backgroundContainer {
|
|
16
|
+
background-color: white;
|
|
17
|
+
min-height: 100%;
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.container {
|
|
22
|
+
composes: textBase;
|
|
23
|
+
background-color: white;
|
|
24
|
+
font-family: "Gilroy";
|
|
25
|
+
font-style: normal;
|
|
26
|
+
margin-top: 48px;
|
|
27
|
+
margin-bottom: 48px;
|
|
28
|
+
margin-left: auto;
|
|
29
|
+
margin-right: auto;
|
|
30
|
+
padding: 0 16px;
|
|
31
|
+
position: relative;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
min-height: 100%;
|
|
34
|
+
width: 100%;
|
|
35
|
+
max-width: calc(1080px + 40px);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.backButtonWrapper {
|
|
39
|
+
margin-bottom: 16px;
|
|
40
|
+
background-color: cm_grey_100;
|
|
41
|
+
border-radius: 8px;
|
|
42
|
+
width: fit-content;
|
|
43
|
+
padding: 8px;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ctaContainer {
|
|
48
|
+
display: flex;
|
|
49
|
+
width: 100%;
|
|
50
|
+
justify-content: space-between;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.skillFocusBadge {
|
|
54
|
+
display: flex;
|
|
55
|
+
height: 12px;
|
|
56
|
+
width: fit-content;
|
|
57
|
+
align-items: center;
|
|
58
|
+
background-color: #DDD1FF;
|
|
59
|
+
border-radius: 24px;
|
|
60
|
+
padding: 4px 8px;
|
|
61
|
+
font-size: 12px;
|
|
62
|
+
line-height: 16px;
|
|
63
|
+
font-weight: 600;
|
|
64
|
+
color: #3900D6;
|
|
65
|
+
margin-bottom: 16px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ctaWrapper,
|
|
69
|
+
.showMoreWrapper {
|
|
70
|
+
display: flex;
|
|
71
|
+
gap: 8px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.showMoreWrapper {
|
|
75
|
+
align-items: center;
|
|
76
|
+
margin-top: 8px;
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.title {
|
|
82
|
+
font-size: 24px;
|
|
83
|
+
font-weight: 700;
|
|
84
|
+
line-height: 32px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.description {
|
|
88
|
+
margin-top: 8px;
|
|
89
|
+
max-width: 734px;
|
|
90
|
+
font-size: 14px;
|
|
91
|
+
font-weight: 500;
|
|
92
|
+
line-height: 20px;
|
|
93
|
+
color: cm_grey_400;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.truncate {
|
|
97
|
+
display: -webkit-box;
|
|
98
|
+
-webkit-line-clamp: 2;
|
|
99
|
+
-webkit-box-orient: vertical;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
text-overflow: ellipsis;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.progressInformationsWrapper {
|
|
105
|
+
margin-top: 40px;
|
|
106
|
+
background-color: xtraLightGrey;
|
|
107
|
+
border-radius: 16px;
|
|
108
|
+
padding: 24px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.progressTitle {
|
|
112
|
+
font-size: 16px;
|
|
113
|
+
font-weight: 600;
|
|
114
|
+
line-height: 22px;
|
|
115
|
+
margin-bottom: 16px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.skillCoursesAndQuestionsWrapper,
|
|
119
|
+
.progressInformations {
|
|
120
|
+
display: flex;
|
|
121
|
+
justify-content: space-between;
|
|
122
|
+
margin-bottom: 8px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.skillInformation,
|
|
126
|
+
.progressInformation {
|
|
127
|
+
composes: textBase;
|
|
128
|
+
font-weight: 600;
|
|
129
|
+
font-size: 14px;
|
|
130
|
+
line-height: 20px;
|
|
131
|
+
color: cm_grey_400;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.skillInformationNumber,
|
|
135
|
+
.progressInformationNumber {
|
|
136
|
+
color: #000;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.progressBarWrapper {
|
|
140
|
+
position: relative;
|
|
141
|
+
left: 0;
|
|
142
|
+
width: 100%;
|
|
143
|
+
height: 4px;
|
|
144
|
+
border-radius: 2px;
|
|
145
|
+
overflow: hidden;
|
|
146
|
+
background-color: cm_grey_100;
|
|
147
|
+
margin: 16px 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.progress {
|
|
151
|
+
display: block;
|
|
152
|
+
height: 8px;
|
|
153
|
+
animation: progressbar 2s ease-in-out;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@media tablet {
|
|
157
|
+
.ctaContainer {
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.ctaWrapper {
|
|
162
|
+
margin-top: 32px;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@media mobile {
|
|
167
|
+
.ctaWrapper {
|
|
168
|
+
flex-direction: column;
|
|
169
|
+
|
|
170
|
+
button {
|
|
171
|
+
width: 100% !important;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -37,7 +37,7 @@ declare namespace TeamsDashboard {
|
|
|
37
37
|
const sections: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
38
38
|
contentType: PropTypes.Requireable<string>;
|
|
39
39
|
dataName: PropTypes.Requireable<string>;
|
|
40
|
-
title: PropTypes.Requireable<
|
|
40
|
+
title: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
41
41
|
showMore: PropTypes.Requireable<string>;
|
|
42
42
|
cards: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
43
43
|
badge: PropTypes.Requireable<string>;
|
|
@@ -91,6 +91,9 @@ declare namespace TeamsDashboard {
|
|
|
91
91
|
adaptive: PropTypes.Requireable<string>;
|
|
92
92
|
}>>;
|
|
93
93
|
}> | null | undefined)[]>;
|
|
94
|
+
customStyle: PropTypes.Requireable<{
|
|
95
|
+
[x: string]: string | null | undefined;
|
|
96
|
+
}>;
|
|
94
97
|
onScroll: PropTypes.Requireable<(...args: any[]) => any>;
|
|
95
98
|
onShowMore: PropTypes.Requireable<(...args: any[]) => any>;
|
|
96
99
|
'arrows-aria-label': PropTypes.Requireable<PropTypes.InferProps<{
|
package/locales/en/global.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"all": "All",
|
|
3
|
+
"all_courses": "All courses",
|
|
3
4
|
"accepted_cards": "Credit or debit card",
|
|
4
5
|
"An Error Occurred": "An Error Occurred",
|
|
5
6
|
"Answer": "Answer",
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
"Create a new cohort": "Create a new cohort",
|
|
23
24
|
"courses": "Courses",
|
|
24
25
|
"courses_completed": "Courses completed",
|
|
26
|
+
"continue_learning": "Continue learning",
|
|
25
27
|
"skills_change_focus": "Change skill focus",
|
|
26
28
|
"skills_choose_focus": "Choose your focus",
|
|
27
29
|
"cancel": "Cancel",
|
|
@@ -59,6 +61,7 @@
|
|
|
59
61
|
"product_desc_culture": "Digital culture: All levels completed",
|
|
60
62
|
"product_desc_forum": "Forum",
|
|
61
63
|
"product_desc_partnership": "All training courses of our partners",
|
|
64
|
+
"your_progress": "Your progress",
|
|
62
65
|
"Put back": "Put back",
|
|
63
66
|
"Reject": "Reject",
|
|
64
67
|
"Reload": "Reload",
|
|
@@ -66,12 +69,16 @@
|
|
|
66
69
|
"Review lesson": "Review lesson",
|
|
67
70
|
"search_place_holder": "Search...",
|
|
68
71
|
"secured_payment": "Secure server",
|
|
72
|
+
"start_learning": "Start learning",
|
|
73
|
+
"sort_by": "Sort by:",
|
|
69
74
|
"See clue": "See clue",
|
|
70
75
|
"See less": "See less",
|
|
71
76
|
"See lesson": "See lesson",
|
|
72
77
|
"Select a dashboard in the Sidebar": "Select a dashboard in the Sidebar",
|
|
73
78
|
"Show more": "Show more",
|
|
79
|
+
"Show less": "Show less",
|
|
74
80
|
"Show": "Show",
|
|
81
|
+
"show_completed": "Show completed",
|
|
75
82
|
"Start battle": "Start battle",
|
|
76
83
|
"skills_section_title": "Skills",
|
|
77
84
|
"skills_section_description": "Explore or review skills",
|
|
@@ -127,6 +134,7 @@
|
|
|
127
134
|
"invalid_scorm": "scorm file is not valid",
|
|
128
135
|
"show_errors": "show errors"
|
|
129
136
|
},
|
|
137
|
+
"review_this_skill": "Review this skill",
|
|
130
138
|
"review_skill_empty": "You have no skill to revise yet",
|
|
131
139
|
"review_skill_empty_description": "First you need to complete courses before you can review different skills.",
|
|
132
140
|
"close_button_ariaLabel": "Close review slide",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.32.
|
|
3
|
+
"version": "11.32.15-alpha.13+c89a54bac",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -177,5 +177,5 @@
|
|
|
177
177
|
"last 2 versions",
|
|
178
178
|
"IE 11"
|
|
179
179
|
],
|
|
180
|
-
"gitHead": "
|
|
180
|
+
"gitHead": "c89a54bac172a097fc2a0f29decd8dcfeea31b8e"
|
|
181
181
|
}
|