@coorpacademy/components 11.9.2-alpha.1 → 11.9.2-alpha.4
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/avatar/index.js +0 -1
- package/es/atom/avatar/index.js.map +1 -1
- package/es/atom/avatar/style.css +1 -0
- package/es/atom/card-image-preview/index.d.ts.map +1 -1
- package/es/atom/card-image-preview/index.js +3 -1
- package/es/atom/card-image-preview/index.js.map +1 -1
- package/es/atom/difficulty-level/index.js +4 -8
- package/es/atom/difficulty-level/index.js.map +1 -1
- package/es/atom/difficulty-level/style.css +1 -0
- package/es/atom/input-html/index.js +6 -2
- package/es/atom/input-html/index.js.map +1 -1
- package/es/atom/life/index.js +9 -3
- package/es/atom/life/index.js.map +1 -1
- package/es/atom/resource-miniature/index.js +3 -1
- package/es/atom/resource-miniature/index.js.map +1 -1
- package/es/atom/review-presentation/index.d.ts.map +1 -1
- package/es/atom/review-presentation/index.js +62 -12
- package/es/atom/review-presentation/index.js.map +1 -1
- package/es/atom/review-presentation/style.css +67 -7
- package/es/molecule/audio/index.js +3 -1
- package/es/molecule/audio/index.js.map +1 -1
- package/es/molecule/battle-request/index.js +3 -1
- package/es/molecule/battle-request/index.js.map +1 -1
- package/es/molecule/brand-download-box/index.js +3 -1
- package/es/molecule/brand-download-box/index.js.map +1 -1
- package/es/molecule/brand-upload-box/index.js +3 -1
- package/es/molecule/brand-upload-box/index.js.map +1 -1
- package/es/molecule/card/favorite.js +6 -2
- package/es/molecule/card/favorite.js.map +1 -1
- package/es/molecule/card/index.d.ts.map +1 -1
- package/es/molecule/card/index.js +6 -2
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card/notification.js +3 -1
- package/es/molecule/card/notification.js.map +1 -1
- package/es/molecule/card-content/index.d.ts.map +1 -1
- package/es/molecule/card-content/index.js +1 -2
- package/es/molecule/card-content/index.js.map +1 -1
- package/es/molecule/card-content/style.css +1 -0
- package/es/molecule/dashboard/cards-list/index.js +9 -3
- package/es/molecule/dashboard/cards-list/index.js.map +1 -1
- package/es/molecule/discipline-partners/index.js +3 -1
- package/es/molecule/discipline-partners/index.js.map +1 -1
- package/es/molecule/drag-and-drop/overlay.js +3 -1
- package/es/molecule/drag-and-drop/overlay.js.map +1 -1
- package/es/molecule/drag-and-drop/upload-report.js +3 -1
- package/es/molecule/drag-and-drop/upload-report.js.map +1 -1
- package/es/molecule/filters/index.js +6 -2
- package/es/molecule/filters/index.js.map +1 -1
- package/es/molecule/pdf/index.js +3 -1
- package/es/molecule/pdf/index.js.map +1 -1
- package/es/molecule/resource-player/index.js +3 -1
- package/es/molecule/resource-player/index.js.map +1 -1
- package/es/molecule/search-form/index.js +3 -1
- package/es/molecule/search-form/index.js.map +1 -1
- package/es/molecule/select-multiple/index.js +6 -2
- package/es/molecule/select-multiple/index.js.map +1 -1
- package/es/molecule/setup-section/index.js +3 -1
- package/es/molecule/setup-section/index.js.map +1 -1
- package/es/molecule/table/index.js +6 -2
- package/es/molecule/table/index.js.map +1 -1
- package/es/molecule/titled-checkbox/index.js +1 -2
- package/es/molecule/titled-checkbox/index.js.map +1 -1
- package/es/molecule/titled-checkbox/style.css +1 -0
- package/es/organism/accordion/coorp-manager/part/index.d.ts.map +1 -1
- package/es/organism/accordion/coorp-manager/part/index.js +13 -6
- package/es/organism/accordion/coorp-manager/part/index.js.map +1 -1
- package/es/organism/accordion/coorp-manager/part/style.css +1 -0
- package/es/organism/accordion/part/index.js +7 -4
- package/es/organism/accordion/part/index.js.map +1 -1
- package/es/organism/accordion/part/style.css +1 -0
- package/es/organism/brand-form/index.js +3 -1
- package/es/organism/brand-form/index.js.map +1 -1
- package/es/organism/get-the-app/index.js +3 -1
- package/es/organism/get-the-app/index.js.map +1 -1
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +21 -7
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/slider/index.js +6 -2
- package/es/organism/slider/index.js.map +1 -1
- package/es/template/activity/engine-stars.css +33 -16
- package/es/template/activity/engine-stars.d.ts +17 -15
- package/es/template/activity/engine-stars.d.ts.map +1 -1
- package/es/template/activity/engine-stars.js +122 -129
- package/es/template/activity/engine-stars.js.map +1 -1
- package/es/template/activity/index.d.ts +0 -1
- package/es/template/activity/index.d.ts.map +1 -1
- package/es/template/activity/index.js +9 -18
- package/es/template/activity/index.js.map +1 -1
- package/es/template/activity/progression-item.js +13 -5
- package/es/template/activity/progression-item.js.map +1 -1
- package/es/template/activity/stars-summary.d.ts +0 -1
- package/es/template/activity/stars-summary.d.ts.map +1 -1
- package/es/template/activity/stars-summary.js +14 -13
- package/es/template/activity/stars-summary.js.map +1 -1
- package/es/template/app-player/player/slides/header/learner.css +1 -0
- package/es/template/app-player/player/slides/header/learner.js +1 -2
- package/es/template/app-player/player/slides/header/learner.js.map +1 -1
- package/es/template/app-player/player/slides/header/microlearning.css +1 -0
- package/es/template/app-player/player/slides/header/microlearning.js +1 -2
- package/es/template/app-player/player/slides/header/microlearning.js.map +1 -1
- package/es/template/app-player/popin-correction/index.js +4 -3
- package/es/template/app-player/popin-correction/index.js.map +1 -1
- package/es/template/app-player/popin-correction/style.css +1 -0
- package/es/template/app-player/popin-end/summary.js +3 -1
- package/es/template/app-player/popin-end/summary.js.map +1 -1
- package/es/template/app-player/popin-header/index.js +6 -3
- package/es/template/app-player/popin-header/index.js.map +1 -1
- package/es/template/app-player/popin-header/style.css +1 -0
- package/lib/atom/avatar/index.js +0 -1
- package/lib/atom/avatar/index.js.map +1 -1
- package/lib/atom/avatar/style.css +1 -0
- package/lib/atom/card-image-preview/index.d.ts.map +1 -1
- package/lib/atom/card-image-preview/index.js +3 -1
- package/lib/atom/card-image-preview/index.js.map +1 -1
- package/lib/atom/difficulty-level/index.js +4 -8
- package/lib/atom/difficulty-level/index.js.map +1 -1
- package/lib/atom/difficulty-level/style.css +1 -0
- package/lib/atom/input-html/index.js +6 -2
- package/lib/atom/input-html/index.js.map +1 -1
- package/lib/atom/life/index.js +9 -3
- package/lib/atom/life/index.js.map +1 -1
- package/lib/atom/resource-miniature/index.js +3 -1
- package/lib/atom/resource-miniature/index.js.map +1 -1
- package/lib/atom/review-presentation/index.d.ts.map +1 -1
- package/lib/atom/review-presentation/index.js +66 -13
- package/lib/atom/review-presentation/index.js.map +1 -1
- package/lib/atom/review-presentation/style.css +67 -7
- package/lib/molecule/audio/index.js +3 -1
- package/lib/molecule/audio/index.js.map +1 -1
- package/lib/molecule/battle-request/index.js +3 -1
- package/lib/molecule/battle-request/index.js.map +1 -1
- package/lib/molecule/brand-download-box/index.js +3 -1
- package/lib/molecule/brand-download-box/index.js.map +1 -1
- package/lib/molecule/brand-upload-box/index.js +3 -1
- package/lib/molecule/brand-upload-box/index.js.map +1 -1
- package/lib/molecule/card/favorite.js +6 -2
- package/lib/molecule/card/favorite.js.map +1 -1
- package/lib/molecule/card/index.d.ts.map +1 -1
- package/lib/molecule/card/index.js +6 -2
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card/notification.js +3 -1
- package/lib/molecule/card/notification.js.map +1 -1
- package/lib/molecule/card-content/index.d.ts.map +1 -1
- package/lib/molecule/card-content/index.js +1 -2
- package/lib/molecule/card-content/index.js.map +1 -1
- package/lib/molecule/card-content/style.css +1 -0
- package/lib/molecule/dashboard/cards-list/index.js +9 -3
- package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
- package/lib/molecule/discipline-partners/index.js +3 -1
- package/lib/molecule/discipline-partners/index.js.map +1 -1
- package/lib/molecule/drag-and-drop/overlay.js +3 -1
- package/lib/molecule/drag-and-drop/overlay.js.map +1 -1
- package/lib/molecule/drag-and-drop/upload-report.js +3 -1
- package/lib/molecule/drag-and-drop/upload-report.js.map +1 -1
- package/lib/molecule/filters/index.js +6 -2
- package/lib/molecule/filters/index.js.map +1 -1
- package/lib/molecule/pdf/index.js +3 -1
- package/lib/molecule/pdf/index.js.map +1 -1
- package/lib/molecule/resource-player/index.js +3 -1
- package/lib/molecule/resource-player/index.js.map +1 -1
- package/lib/molecule/search-form/index.js +3 -1
- package/lib/molecule/search-form/index.js.map +1 -1
- package/lib/molecule/select-multiple/index.js +6 -2
- package/lib/molecule/select-multiple/index.js.map +1 -1
- package/lib/molecule/setup-section/index.js +3 -1
- package/lib/molecule/setup-section/index.js.map +1 -1
- package/lib/molecule/table/index.js +6 -2
- package/lib/molecule/table/index.js.map +1 -1
- package/lib/molecule/titled-checkbox/index.js +1 -2
- package/lib/molecule/titled-checkbox/index.js.map +1 -1
- package/lib/molecule/titled-checkbox/style.css +1 -0
- package/lib/organism/accordion/coorp-manager/part/index.d.ts.map +1 -1
- package/lib/organism/accordion/coorp-manager/part/index.js +13 -6
- package/lib/organism/accordion/coorp-manager/part/index.js.map +1 -1
- package/lib/organism/accordion/coorp-manager/part/style.css +1 -0
- package/lib/organism/accordion/part/index.js +7 -4
- package/lib/organism/accordion/part/index.js.map +1 -1
- package/lib/organism/accordion/part/style.css +1 -0
- package/lib/organism/brand-form/index.js +3 -1
- package/lib/organism/brand-form/index.js.map +1 -1
- package/lib/organism/get-the-app/index.js +3 -1
- package/lib/organism/get-the-app/index.js.map +1 -1
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +21 -7
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/slider/index.js +6 -2
- package/lib/organism/slider/index.js.map +1 -1
- package/lib/template/activity/engine-stars.css +33 -16
- package/lib/template/activity/engine-stars.d.ts +17 -15
- package/lib/template/activity/engine-stars.d.ts.map +1 -1
- package/lib/template/activity/engine-stars.js +122 -135
- package/lib/template/activity/engine-stars.js.map +1 -1
- package/lib/template/activity/index.d.ts +0 -1
- package/lib/template/activity/index.d.ts.map +1 -1
- package/lib/template/activity/index.js +9 -21
- package/lib/template/activity/index.js.map +1 -1
- package/lib/template/activity/progression-item.js +13 -5
- package/lib/template/activity/progression-item.js.map +1 -1
- package/lib/template/activity/stars-summary.d.ts +0 -1
- package/lib/template/activity/stars-summary.d.ts.map +1 -1
- package/lib/template/activity/stars-summary.js +14 -13
- package/lib/template/activity/stars-summary.js.map +1 -1
- package/lib/template/app-player/player/slides/header/learner.css +1 -0
- package/lib/template/app-player/player/slides/header/learner.js +1 -2
- package/lib/template/app-player/player/slides/header/learner.js.map +1 -1
- package/lib/template/app-player/player/slides/header/microlearning.css +1 -0
- package/lib/template/app-player/player/slides/header/microlearning.js +1 -2
- package/lib/template/app-player/player/slides/header/microlearning.js.map +1 -1
- package/lib/template/app-player/popin-correction/index.js +4 -3
- package/lib/template/app-player/popin-correction/index.js.map +1 -1
- package/lib/template/app-player/popin-correction/style.css +1 -0
- package/lib/template/app-player/popin-end/summary.js +3 -1
- package/lib/template/app-player/popin-end/summary.js.map +1 -1
- package/lib/template/app-player/popin-header/index.js +6 -3
- package/lib/template/app-player/popin-header/index.js.map +1 -1
- package/lib/template/app-player/popin-header/style.css +1 -0
- package/locales/en/global.json +0 -1
- package/package.json +3 -4
- package/es/atom/tooltip/index.d.ts +0 -22
- package/es/atom/tooltip/index.d.ts.map +0 -1
- package/es/atom/tooltip/index.js +0 -117
- package/es/atom/tooltip/index.js.map +0 -1
- package/es/atom/tooltip/style.css +0 -96
- package/lib/atom/tooltip/index.d.ts +0 -22
- package/lib/atom/tooltip/index.d.ts.map +0 -1
- package/lib/atom/tooltip/index.js +0 -137
- package/lib/atom/tooltip/index.js.map +0 -1
- package/lib/atom/tooltip/style.css +0 -96
|
@@ -9,30 +9,22 @@ var _get2 = _interopRequireDefault(require("lodash/fp/get"));
|
|
|
9
9
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
|
|
12
|
-
var _react =
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _reactTooltip = _interopRequireDefault(require("react-tooltip"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
17
|
|
|
18
18
|
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
19
19
|
|
|
20
|
-
var _provider =
|
|
21
|
-
|
|
22
|
-
var _tooltip = _interopRequireWildcard(require("../../atom/tooltip"));
|
|
20
|
+
var _provider = _interopRequireDefault(require("../../atom/provider"));
|
|
23
21
|
|
|
24
22
|
var _link = _interopRequireDefault(require("../../atom/link"));
|
|
25
23
|
|
|
26
24
|
var _engineStars = _interopRequireDefault(require("./engine-stars.css"));
|
|
27
25
|
|
|
28
|
-
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); }
|
|
29
|
-
|
|
30
|
-
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; }
|
|
31
|
-
|
|
32
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
27
|
|
|
34
|
-
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); }
|
|
35
|
-
|
|
36
28
|
const ICONS = {
|
|
37
29
|
microlearning: _novaIcons.NovaCompositionCoorpacademyTimer,
|
|
38
30
|
learner: _novaIcons.NovaSolidContentContentBook1,
|
|
@@ -46,132 +38,131 @@ const ICONS = {
|
|
|
46
38
|
review: _novaIcons.NovaCompositionCoorpacademyRevision
|
|
47
39
|
};
|
|
48
40
|
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
handleContentMouseOver
|
|
56
|
-
}) => /*#__PURE__*/_react.default.createElement("p", {
|
|
57
|
-
className: _engineStars.default.toolTipContent,
|
|
58
|
-
onMouseOver: handleContentMouseOver,
|
|
59
|
-
"data-testid": "react-tooltip-content"
|
|
60
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, preMessage), /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
61
|
-
onClick: onClick,
|
|
62
|
-
style: {
|
|
63
|
-
color
|
|
41
|
+
const ToolTip = ({
|
|
42
|
+
toolTip,
|
|
43
|
+
id
|
|
44
|
+
}, context) => {
|
|
45
|
+
if (!toolTip) {
|
|
46
|
+
return null;
|
|
64
47
|
}
|
|
65
|
-
}, linkMessage), /*#__PURE__*/_react.default.createElement("span", null, endMessage));
|
|
66
|
-
|
|
67
|
-
ToolTipContent.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
68
|
-
preMessage: _propTypes.default.string,
|
|
69
|
-
linkMessage: _propTypes.default.string,
|
|
70
|
-
endMessage: _propTypes.default.string,
|
|
71
|
-
color: _propTypes.default.string,
|
|
72
|
-
onClick: _propTypes.default.func,
|
|
73
|
-
handleContentMouseOver: _propTypes.default.func
|
|
74
|
-
} : {};
|
|
75
48
|
|
|
76
|
-
const EngineStars = (props, legacyContext) => {
|
|
77
|
-
const skin = (0, _provider.GetSkinFromContext)(legacyContext);
|
|
78
|
-
const translate = (0, _provider.GetTranslateFromContext)(legacyContext);
|
|
79
49
|
const {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
onClick
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const [engineStarsContentId] = (0, _react.useState)(disabled ? (0, _uuid.v5)('engine-stars', _uuid.v5.URL) : undefined);
|
|
102
|
-
const [toolTipIsVisible, setToolTipIsVisible] = (0, _react.useState)(false);
|
|
103
|
-
const [mouseLeaveTimer, setMouseLeaveTimer] = (0, _react.useState)(undefined);
|
|
104
|
-
const buttonRef = (0, _react.useRef)(null);
|
|
105
|
-
const handleKeyPress = (0, _react.useCallback)(event => {
|
|
106
|
-
(0, _tooltip.toggleStateOnKeyPress)(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);
|
|
107
|
-
}, [toolTipIsVisible]);
|
|
108
|
-
const handleMouseOver = (0, _react.useCallback)(() => {
|
|
109
|
-
mouseLeaveTimer && clearTimeout(mouseLeaveTimer);
|
|
110
|
-
setToolTipIsVisible(true);
|
|
111
|
-
}, [mouseLeaveTimer]);
|
|
112
|
-
const handleContentMouseOver = (0, _react.useCallback)(() => {
|
|
113
|
-
mouseLeaveTimer &&
|
|
114
|
-
/* istanbul ignore next */
|
|
115
|
-
clearTimeout(mouseLeaveTimer);
|
|
116
|
-
}, [mouseLeaveTimer]);
|
|
117
|
-
const handleMouseLeave = (0, _react.useCallback)(() => {
|
|
118
|
-
setMouseLeaveTimer(setTimeout(() => setToolTipIsVisible(false), 500));
|
|
119
|
-
}, []);
|
|
120
|
-
const toolTipContentProps = (0, _react.useMemo)(() => toolTip ? {
|
|
121
|
-
preMessage: toolTip.preMessage,
|
|
122
|
-
linkMessage: toolTip.linkMessage,
|
|
123
|
-
endMessage: toolTip.endMessage,
|
|
124
|
-
color: primary,
|
|
125
|
-
onClick: toolTip.onClick
|
|
126
|
-
} : null, [primary, toolTip]);
|
|
127
|
-
const toolTipProps = {
|
|
128
|
-
closeToolTipInformationTextAriaLabel: translate('Press the escape key to close the information text')
|
|
129
|
-
};
|
|
130
|
-
const TooltipContent = (0, _react.useCallback)(_props => /*#__PURE__*/_react.default.createElement(ToolTipContent, _extends({}, _extends({}, toolTipContentProps, _props), {
|
|
131
|
-
handleContentMouseOver: handleContentMouseOver
|
|
132
|
-
})), [handleContentMouseOver, toolTipContentProps]);
|
|
133
|
-
return /*#__PURE__*/_react.default.createElement("button", {
|
|
134
|
-
ref: buttonRef,
|
|
135
|
-
"data-tip": disabled,
|
|
136
|
-
"data-engine": type,
|
|
137
|
-
"data-testid": `engine-stars-${type}` // eslint-disable-next-line no-nested-ternary
|
|
138
|
-
,
|
|
139
|
-
onClick: disabled ? handleKeyPress : active ? _noop2.default : handleClick,
|
|
140
|
-
"data-for": engineStarsContentId,
|
|
141
|
-
className: (0, _classnames.default)([_engineStars.default.engineStars, disabled ? _engineStars.default.disabled : '', active ? _engineStars.default.active : '', onClick !== _noop2.default ? _engineStars.default.clickable : null, className]),
|
|
142
|
-
type: "button",
|
|
143
|
-
"data-tooltip-place": "left",
|
|
144
|
-
onKeyDown: handleKeyPress,
|
|
145
|
-
onMouseLeave: handleMouseLeave,
|
|
146
|
-
onMouseOver: handleMouseOver
|
|
147
|
-
}, disabled ? /*#__PURE__*/_react.default.createElement(_tooltip.default, _extends({}, toolTipProps, {
|
|
148
|
-
anchorId: engineStarsContentId,
|
|
149
|
-
toolTipIsVisible: toolTipIsVisible,
|
|
150
|
-
TooltipContent: TooltipContent,
|
|
151
|
-
mouseLeaveTimer: mouseLeaveTimer
|
|
152
|
-
})) : null, /*#__PURE__*/_react.default.createElement("span", {
|
|
153
|
-
className: _engineStars.default.engineIcon,
|
|
154
|
-
style: {
|
|
155
|
-
backgroundColor: onClick === _noop2.default ? light : primary
|
|
156
|
-
}
|
|
157
|
-
}, /*#__PURE__*/_react.default.createElement(IconType, {
|
|
158
|
-
className: _engineStars.default.iconHeader,
|
|
159
|
-
width: "30"
|
|
160
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
161
|
-
className: _engineStars.default.score,
|
|
50
|
+
skin
|
|
51
|
+
} = context;
|
|
52
|
+
const {
|
|
53
|
+
preMessage,
|
|
54
|
+
endMessage,
|
|
55
|
+
linkMessage,
|
|
56
|
+
onClick
|
|
57
|
+
} = toolTip;
|
|
58
|
+
const primary = (0, _get2.default)('common.primary', skin);
|
|
59
|
+
const handleClick = onClick;
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement(_reactTooltip.default, {
|
|
61
|
+
id: id,
|
|
62
|
+
className: _engineStars.default.toolTip,
|
|
63
|
+
"data-event-off": "click",
|
|
64
|
+
place: "left",
|
|
65
|
+
effect: "solid",
|
|
66
|
+
delayHide: 500
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
68
|
+
className: _engineStars.default.toolTipContent
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, `${preMessage}`), /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
70
|
+
onClick: handleClick,
|
|
162
71
|
style: {
|
|
163
|
-
color:
|
|
72
|
+
color: primary
|
|
164
73
|
}
|
|
165
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
166
|
-
"data-name": "star-counter"
|
|
167
|
-
}, stars), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyStar, {
|
|
168
|
-
className: _engineStars.default.iconStar,
|
|
169
|
-
color: active ? primary : dark
|
|
170
|
-
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
171
|
-
className: _engineStars.default.scoreTitle
|
|
172
|
-
}, title));
|
|
74
|
+
}, `${linkMessage}`), /*#__PURE__*/_react.default.createElement("span", null, `${endMessage}`)));
|
|
173
75
|
};
|
|
174
76
|
|
|
77
|
+
ToolTip.contextTypes = {
|
|
78
|
+
skin: _provider.default.childContextTypes.skin
|
|
79
|
+
};
|
|
80
|
+
ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
81
|
+
toolTip: _propTypes.default.shape({
|
|
82
|
+
preMessage: _propTypes.default.string,
|
|
83
|
+
linkMessage: _propTypes.default.string,
|
|
84
|
+
endMessage: _propTypes.default.string,
|
|
85
|
+
onClick: _propTypes.default.func
|
|
86
|
+
}),
|
|
87
|
+
id: _propTypes.default.string.isRequired
|
|
88
|
+
} : {};
|
|
89
|
+
|
|
90
|
+
class EngineStars extends _react.default.Component {
|
|
91
|
+
constructor(props, context) {
|
|
92
|
+
super(props, context);
|
|
93
|
+
|
|
94
|
+
this.handleClick = e => {
|
|
95
|
+
e.stopPropagation();
|
|
96
|
+
e.preventDefault();
|
|
97
|
+
const {
|
|
98
|
+
onClick
|
|
99
|
+
} = this.props;
|
|
100
|
+
onClick && onClick(e);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
this.handleClick = this.handleClick.bind(this);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
render() {
|
|
107
|
+
const {
|
|
108
|
+
skin
|
|
109
|
+
} = this.context;
|
|
110
|
+
const {
|
|
111
|
+
disabled,
|
|
112
|
+
type,
|
|
113
|
+
stars,
|
|
114
|
+
title,
|
|
115
|
+
active = false,
|
|
116
|
+
onClick = _noop2.default,
|
|
117
|
+
toolTip = null
|
|
118
|
+
} = this.props;
|
|
119
|
+
const dark = (0, _get2.default)('common.dark', skin);
|
|
120
|
+
const light = (0, _get2.default)('common.light', skin);
|
|
121
|
+
const primary = (0, _get2.default)('common.primary', skin);
|
|
122
|
+
const IconType = ICONS[type];
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
124
|
+
"data-tip": disabled,
|
|
125
|
+
"data-engine": type,
|
|
126
|
+
onClick: disabled || active ? _noop2.default : this.handleClick,
|
|
127
|
+
"data-for": disabled && type,
|
|
128
|
+
className: (0, _classnames.default)([_engineStars.default.engineStars, disabled ? _engineStars.default.disabled : '', active ? _engineStars.default.active : '', onClick !== _noop2.default ? _engineStars.default.clickable : null])
|
|
129
|
+
}, /*#__PURE__*/_react.default.createElement(ToolTip, {
|
|
130
|
+
toolTip: toolTip,
|
|
131
|
+
id: type
|
|
132
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
133
|
+
className: _engineStars.default.engineIcon,
|
|
134
|
+
style: {
|
|
135
|
+
backgroundColor: onClick === _noop2.default ? light : primary
|
|
136
|
+
}
|
|
137
|
+
}, /*#__PURE__*/_react.default.createElement(IconType, {
|
|
138
|
+
className: _engineStars.default.iconHeader,
|
|
139
|
+
width: "30"
|
|
140
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
+
className: _engineStars.default.score,
|
|
142
|
+
style: {
|
|
143
|
+
color: active ? primary : dark
|
|
144
|
+
}
|
|
145
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
146
|
+
"data-name": "star-counter"
|
|
147
|
+
}, stars), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyStar, {
|
|
148
|
+
className: _engineStars.default.iconStar,
|
|
149
|
+
style: {
|
|
150
|
+
color: active ? {
|
|
151
|
+
primary
|
|
152
|
+
} : {
|
|
153
|
+
dark
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
157
|
+
className: _engineStars.default.scoreTitle
|
|
158
|
+
}, title));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
EngineStars.contextTypes = {
|
|
164
|
+
skin: _provider.default.childContextTypes.skin
|
|
165
|
+
};
|
|
175
166
|
EngineStars.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
176
167
|
type: _propTypes.default.string.isRequired,
|
|
177
168
|
stars: _propTypes.default.number.isRequired,
|
|
@@ -179,7 +170,6 @@ EngineStars.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
179
170
|
active: _propTypes.default.bool,
|
|
180
171
|
disabled: _propTypes.default.bool,
|
|
181
172
|
onClick: _propTypes.default.func,
|
|
182
|
-
className: _propTypes.default.string,
|
|
183
173
|
toolTip: _propTypes.default.shape({
|
|
184
174
|
preMessage: _propTypes.default.string,
|
|
185
175
|
linkMessage: _propTypes.default.string,
|
|
@@ -187,9 +177,6 @@ EngineStars.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
187
177
|
onClick: _propTypes.default.func
|
|
188
178
|
})
|
|
189
179
|
} : {};
|
|
190
|
-
EngineStars.contextTypes = {
|
|
191
|
-
skin: _provider.default.childContextTypes.skin
|
|
192
|
-
};
|
|
193
180
|
var _default = EngineStars;
|
|
194
181
|
exports.default = _default;
|
|
195
182
|
//# sourceMappingURL=engine-stars.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-stars.js","names":["ICONS","microlearning","TimerIcon","learner","LearnerIcon","battle","BoltIcon","certifications","CertificationIcon","bonus","BonusIcon","article","ArticleIcon","scorm","ScormIcon","video","VideoIcon","podcast","PodcastIcon","review","RevisionIcon","ToolTipContent","preMessage","linkMessage","endMessage","onClick","color","handleContentMouseOver","style","toolTipContent","propTypes","PropTypes","string","func","EngineStars","props","legacyContext","skin","GetSkinFromContext","translate","GetTranslateFromContext","toolTip","disabled","type","stars","title","active","className","handleClick","e","stopPropagation","preventDefault","dark","light","IconType","primary","engineStarsContentId","useState","uuidV5","URL","undefined","toolTipIsVisible","setToolTipIsVisible","mouseLeaveTimer","setMouseLeaveTimer","buttonRef","useRef","handleKeyPress","useCallback","event","toggleStateOnKeyPress","handleMouseOver","clearTimeout","handleMouseLeave","setTimeout","toolTipContentProps","useMemo","toolTipProps","closeToolTipInformationTextAriaLabel","TooltipContent","_props","classnames","engineStars","clickable","engineIcon","backgroundColor","iconHeader","score","iconStar","scoreTitle","isRequired","number","bool","shape","contextTypes","Provider","childContextTypes"],"sources":["../../../src/template/activity/engine-stars.js"],"sourcesContent":["import classnames from 'classnames';\nimport React, {useCallback, useMemo, useState, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, noop} from 'lodash/fp';\nimport {v5 as uuidV5} from 'uuid';\nimport {\n NovaCompositionCoorpacademyStar as StarIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon,\n NovaCompositionCoorpacademyBolt as BoltIcon,\n NovaSolidSchoolScienceGraduationHat as CertificationIcon,\n NovaSolidContentContentBook1 as LearnerIcon,\n NovaSolidVoteRewardsRewardsBadge1 as BonusIcon,\n NovaCompositionCoorpacademyScorm as ScormIcon,\n NovaCompositionCoorpacademyArticle as ArticleIcon,\n NovaCompositionCoorpacademyVideo as VideoIcon,\n NovaCompositionCoorpacademyMicrophone as PodcastIcon,\n NovaCompositionCoorpacademyRevision as RevisionIcon\n} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext, GetTranslateFromContext} from '../../atom/provider';\nimport ToolTip, {toggleStateOnKeyPress} from '../../atom/tooltip';\nimport Link from '../../atom/link';\nimport style from './engine-stars.css';\n\nconst ICONS = {\n microlearning: TimerIcon,\n learner: LearnerIcon,\n battle: BoltIcon,\n certifications: CertificationIcon,\n bonus: BonusIcon,\n article: ArticleIcon,\n scorm: ScormIcon,\n video: VideoIcon,\n podcast: PodcastIcon,\n review: RevisionIcon\n};\n\nconst ToolTipContent = ({\n preMessage,\n linkMessage,\n endMessage,\n onClick,\n color,\n handleContentMouseOver\n}) => (\n <p\n className={style.toolTipContent}\n onMouseOver={handleContentMouseOver}\n data-testid=\"react-tooltip-content\"\n >\n <span>{preMessage}</span>\n <Link\n onClick={onClick}\n style={{\n color\n }}\n >\n {linkMessage}\n </Link>\n <span>{endMessage}</span>\n </p>\n);\n\nToolTipContent.propTypes = {\n preMessage: PropTypes.string,\n linkMessage: PropTypes.string,\n endMessage: PropTypes.string,\n color: PropTypes.string,\n onClick: PropTypes.func,\n handleContentMouseOver: PropTypes.func\n};\n\nconst EngineStars = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const translate = GetTranslateFromContext(legacyContext);\n const {\n toolTip = null,\n disabled,\n type,\n stars,\n title,\n active = false,\n onClick = noop,\n className\n } = props;\n\n const handleClick = e => {\n e.stopPropagation();\n e.preventDefault();\n onClick(e);\n };\n const dark = get('common.dark', skin);\n const light = get('common.light', skin);\n const IconType = ICONS[type];\n\n const primary = get('common.primary', skin);\n\n // to replace by useId when React17 is bumped to React18\n const [engineStarsContentId] = useState(\n disabled ? uuidV5('engine-stars', uuidV5.URL) : undefined\n );\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState(undefined);\n const buttonRef = useRef(null);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);\n },\n [toolTipIsVisible]\n );\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleContentMouseOver = useCallback(() => {\n mouseLeaveTimer && /* istanbul ignore next */ clearTimeout(mouseLeaveTimer);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(setTimeout(() => setToolTipIsVisible(false), 500));\n }, []);\n\n const toolTipContentProps = useMemo(\n () =>\n toolTip\n ? {\n preMessage: toolTip.preMessage,\n linkMessage: toolTip.linkMessage,\n endMessage: toolTip.endMessage,\n color: primary,\n onClick: toolTip.onClick\n }\n : null,\n [primary, toolTip]\n );\n\n const toolTipProps = {\n closeToolTipInformationTextAriaLabel: translate(\n 'Press the escape key to close the information text'\n )\n };\n\n const TooltipContent = useCallback(\n _props => (\n <ToolTipContent\n {...{...toolTipContentProps, ..._props}}\n handleContentMouseOver={handleContentMouseOver}\n />\n ),\n [handleContentMouseOver, toolTipContentProps]\n );\n\n return (\n <button\n ref={buttonRef}\n data-tip={disabled}\n data-engine={type}\n data-testid={`engine-stars-${type}`}\n // eslint-disable-next-line no-nested-ternary\n onClick={disabled ? handleKeyPress : active ? noop : handleClick}\n data-for={engineStarsContentId}\n className={classnames([\n style.engineStars,\n disabled ? style.disabled : '',\n active ? style.active : '',\n onClick !== noop ? style.clickable : null,\n className\n ])}\n type=\"button\"\n data-tooltip-place=\"left\"\n onKeyDown={handleKeyPress}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n {disabled ? (\n <ToolTip\n {...toolTipProps}\n anchorId={engineStarsContentId}\n toolTipIsVisible={toolTipIsVisible}\n TooltipContent={TooltipContent}\n mouseLeaveTimer={mouseLeaveTimer}\n />\n ) : null}\n <span\n className={style.engineIcon}\n style={{\n backgroundColor: onClick === noop ? light : primary\n }}\n >\n <IconType className={style.iconHeader} width=\"30\" />\n </span>\n <div\n className={style.score}\n style={{\n color: active ? primary : dark\n }}\n >\n <p data-name=\"star-counter\">{stars}</p>\n <span>\n <StarIcon className={style.iconStar} color={active ? primary : dark} />\n </span>\n </div>\n <div className={style.scoreTitle}>{title}</div>\n </button>\n );\n};\n\nEngineStars.propTypes = {\n type: PropTypes.string.isRequired,\n stars: PropTypes.number.isRequired,\n title: PropTypes.string.isRequired,\n active: PropTypes.bool,\n disabled: PropTypes.bool,\n onClick: PropTypes.func,\n className: PropTypes.string,\n toolTip: PropTypes.shape({\n preMessage: PropTypes.string,\n linkMessage: PropTypes.string,\n endMessage: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nEngineStars.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default EngineStars;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AAaA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,KAAK,GAAG;EACZC,aAAa,EAAEC,2CADH;EAEZC,OAAO,EAAEC,uCAFG;EAGZC,MAAM,EAAEC,0CAHI;EAIZC,cAAc,EAAEC,8CAJJ;EAKZC,KAA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,CAAU6D,IAJI;EAKtBlD,QAAQ,EAAEX,kBAAA,CAAU6D,IALE;EAMtBnE,OAAO,EAAEM,kBAAA,CAAUE,IANG;EAOtBc,SAAS,EAAEhB,kBAAA,CAAUC,MAPC;EAQtBS,OAAO,EAAEV,kBAAA,CAAU8D,KAAV,CAAgB;IACvBvE,UAAU,EAAES,kBAAA,CAAUC,MADC;IAEvBT,WAAW,EAAEQ,kBAAA,CAAUC,MAFA;IAGvBR,UAAU,EAAEO,kBAAA,CAAUC,MAHC;IAIvBP,OAAO,EAAEM,kBAAA,CAAUE;EAJI,CAAhB;AARa,CAAxB;AAgBAC,WAAW,CAAC4D,YAAZ,GAA2B;EACzBzD,IAAI,EAAE0D,iBAAA,CAASC,iBAAT,CAA2B3D;AADR,CAA3B;eAIeH,W"}
|
|
1
|
+
{"version":3,"file":"engine-stars.js","names":["ICONS","microlearning","TimerIcon","learner","LearnerIcon","battle","BoltIcon","certifications","CertificationIcon","bonus","BonusIcon","article","ArticleIcon","scorm","ScormIcon","video","VideoIcon","podcast","PodcastIcon","review","RevisionIcon","ToolTip","toolTip","id","context","skin","preMessage","endMessage","linkMessage","onClick","primary","handleClick","style","toolTipContent","color","contextTypes","Provider","childContextTypes","propTypes","PropTypes","shape","string","func","isRequired","EngineStars","React","Component","constructor","props","e","stopPropagation","preventDefault","bind","render","disabled","type","stars","title","active","dark","light","IconType","classnames","engineStars","clickable","engineIcon","backgroundColor","iconHeader","score","iconStar","scoreTitle","number","bool"],"sources":["../../../src/template/activity/engine-stars.js"],"sourcesContent":["import classnames from 'classnames';\nimport React from 'react';\nimport ReactTooltip from 'react-tooltip';\nimport PropTypes from 'prop-types';\nimport {get, noop} from 'lodash/fp';\nimport {\n NovaCompositionCoorpacademyStar as StarIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon,\n NovaCompositionCoorpacademyBolt as BoltIcon,\n NovaSolidSchoolScienceGraduationHat as CertificationIcon,\n NovaSolidContentContentBook1 as LearnerIcon,\n NovaSolidVoteRewardsRewardsBadge1 as BonusIcon,\n NovaCompositionCoorpacademyScorm as ScormIcon,\n NovaCompositionCoorpacademyArticle as ArticleIcon,\n NovaCompositionCoorpacademyVideo as VideoIcon,\n NovaCompositionCoorpacademyMicrophone as PodcastIcon,\n NovaCompositionCoorpacademyRevision as RevisionIcon\n} from '@coorpacademy/nova-icons';\nimport Provider from '../../atom/provider';\nimport Link from '../../atom/link';\nimport style from './engine-stars.css';\n\nconst ICONS = {\n microlearning: TimerIcon,\n learner: LearnerIcon,\n battle: BoltIcon,\n certifications: CertificationIcon,\n bonus: BonusIcon,\n article: ArticleIcon,\n scorm: ScormIcon,\n video: VideoIcon,\n podcast: PodcastIcon,\n review: RevisionIcon\n};\n\nconst ToolTip = ({toolTip, id}, context) => {\n if (!toolTip) {\n return null;\n }\n\n const {skin} = context;\n const {preMessage, endMessage, linkMessage, onClick} = toolTip;\n const primary = get('common.primary', skin);\n\n const handleClick = onClick;\n\n return (\n <ReactTooltip\n id={id}\n className={style.toolTip}\n data-event-off=\"click\"\n place=\"left\"\n effect=\"solid\"\n delayHide={500}\n >\n <p className={style.toolTipContent}>\n <span>{`${preMessage}`}</span>\n <Link\n onClick={handleClick}\n style={{\n color: primary\n }}\n >\n {`${linkMessage}`}\n </Link>\n <span>{`${endMessage}`}</span>\n </p>\n </ReactTooltip>\n );\n};\n\nToolTip.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nToolTip.propTypes = {\n toolTip: PropTypes.shape({\n preMessage: PropTypes.string,\n linkMessage: PropTypes.string,\n endMessage: PropTypes.string,\n onClick: PropTypes.func\n }),\n id: PropTypes.string.isRequired\n};\n\nclass EngineStars extends React.Component {\n static propTypes = {\n type: PropTypes.string.isRequired,\n stars: PropTypes.number.isRequired,\n title: PropTypes.string.isRequired,\n active: PropTypes.bool,\n disabled: PropTypes.bool,\n onClick: PropTypes.func,\n toolTip: PropTypes.shape({\n preMessage: PropTypes.string,\n linkMessage: PropTypes.string,\n endMessage: PropTypes.string,\n onClick: PropTypes.func\n })\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props, context) {\n super(props, context);\n this.handleClick = this.handleClick.bind(this);\n }\n\n handleClick = e => {\n e.stopPropagation();\n e.preventDefault();\n const {onClick} = this.props;\n onClick && onClick(e);\n };\n\n render() {\n const {skin} = this.context;\n const {\n disabled,\n type,\n stars,\n title,\n active = false,\n onClick = noop,\n toolTip = null\n } = this.props;\n const dark = get('common.dark', skin);\n const light = get('common.light', skin);\n const primary = get('common.primary', skin);\n const IconType = ICONS[type];\n\n return (\n <div\n data-tip={disabled}\n data-engine={type}\n onClick={disabled || active ? noop : this.handleClick}\n data-for={disabled && type}\n className={classnames([\n style.engineStars,\n disabled ? style.disabled : '',\n active ? style.active : '',\n onClick !== noop ? style.clickable : null\n ])}\n >\n <ToolTip toolTip={toolTip} id={type} />\n\n <span\n className={style.engineIcon}\n style={{\n backgroundColor: onClick === noop ? light : primary\n }}\n >\n <IconType className={style.iconHeader} width=\"30\" />\n </span>\n <div\n className={style.score}\n style={{\n color: active ? primary : dark\n }}\n >\n <p data-name=\"star-counter\">{stars}</p>\n <span>\n <StarIcon className={style.iconStar} style={{color: active ? {primary} : {dark}}} />\n </span>\n </div>\n <div className={style.scoreTitle}>{title}</div>\n </div>\n );\n }\n}\n\nexport default EngineStars;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AAaA;;AACA;;AACA;;;;AAEA,MAAMA,KAAK,GAAG;EACZC,aAAa,EAAEC,2CADH;EAEZC,OAAO,EAAEC,uCAFG;EAGZC,MAAM,EAAEC,0CAHI;EAIZC,cAAc,EAAEC,8CAJJ;EAKZC,KAAK,EAAEC,4CALK;EAMZC,OAAO,EAAEC,6CANG;EAOZC,KAAK,EAAEC,2CAPK;EAQZC,KAAK,EAAEC,2CARK;EASZC,OAAO,EAAEC,gDATG;EAUZC,MAAM,EAAEC;AAVI,CAAd;;AAaA,MAAMC,OAAO,GAAG,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UG,IANF;EAOjBpB,OAAO,EAAEiB,kBAAA,CAAUC,KAAV,CAAgB;IACvBd,UAAU,EAAEa,kBAAA,CAAUE,MADC;IAEvBb,WAAW,EAAEW,kBAAA,CAAUE,MAFA;IAGvBd,UAAU,EAAEY,kBAAA,CAAUE,MAHC;IAIvBZ,OAAO,EAAEU,kBAAA,CAAUG;EAJI,CAAhB;AAPQ,C;eAuFNE,W"}
|
|
@@ -39,7 +39,6 @@ declare namespace Progression {
|
|
|
39
39
|
active: PropTypes.Requireable<boolean>;
|
|
40
40
|
disabled: PropTypes.Requireable<boolean>;
|
|
41
41
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
42
|
-
className: PropTypes.Requireable<string>;
|
|
43
42
|
toolTip: PropTypes.Requireable<PropTypes.InferProps<{
|
|
44
43
|
preMessage: PropTypes.Requireable<string>;
|
|
45
44
|
linkMessage: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/activity/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/activity/index.js"],"names":[],"mappings":";AAeA,0EAuGC"}
|
|
@@ -9,10 +9,6 @@ var _get = _interopRequireDefault(require("lodash/fp/get"));
|
|
|
9
9
|
|
|
10
10
|
var _isEmpty = _interopRequireDefault(require("lodash/fp/isEmpty"));
|
|
11
11
|
|
|
12
|
-
var _map = _interopRequireDefault(require("lodash/fp/map"));
|
|
13
|
-
|
|
14
|
-
var _noop = _interopRequireDefault(require("lodash/fp/noop"));
|
|
15
|
-
|
|
16
12
|
var _omit = _interopRequireDefault(require("lodash/fp/omit"));
|
|
17
13
|
|
|
18
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -43,10 +39,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
43
39
|
|
|
44
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
41
|
|
|
46
|
-
const mapWithIndex = _map.default.convert({
|
|
47
|
-
cap: false
|
|
48
|
-
});
|
|
49
|
-
|
|
50
42
|
const Progression = (props, legacyContext) => {
|
|
51
43
|
const {
|
|
52
44
|
mainTitle,
|
|
@@ -67,9 +59,9 @@ const Progression = (props, legacyContext) => {
|
|
|
67
59
|
e.stopPropagation();
|
|
68
60
|
e.preventDefault();
|
|
69
61
|
const {
|
|
70
|
-
onClick
|
|
62
|
+
onClick
|
|
71
63
|
} = recommendation;
|
|
72
|
-
onClick(e);
|
|
64
|
+
onClick && onClick(e);
|
|
73
65
|
}, [recommendation]);
|
|
74
66
|
const handleSelectTheme = (0, _react.useCallback)(e => {
|
|
75
67
|
themeFilterOnChange && themeFilterOnChange(e);
|
|
@@ -78,10 +70,10 @@ const Progression = (props, legacyContext) => {
|
|
|
78
70
|
const loader = loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
79
71
|
className: _style.default.loader
|
|
80
72
|
}, /*#__PURE__*/_react.default.createElement(_loader.default, null)) : null;
|
|
81
|
-
const allProgressions =
|
|
82
|
-
key:
|
|
73
|
+
const allProgressions = progressions.map(progression => /*#__PURE__*/_react.default.createElement(_progressionItem.default, _extends({}, (0, _omit.default)(['ref'], progression), {
|
|
74
|
+
key: progression.ref,
|
|
83
75
|
adaptiveAriaLabel: adaptiveAriaLabel
|
|
84
|
-
}))
|
|
76
|
+
})));
|
|
85
77
|
|
|
86
78
|
const coreProgression = /*#__PURE__*/_react.default.createElement("div", {
|
|
87
79
|
"data-name": "activityCore",
|
|
@@ -119,17 +111,13 @@ const Progression = (props, legacyContext) => {
|
|
|
119
111
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
120
112
|
className: _style.default.default
|
|
121
113
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
122
|
-
"data-name": "activity-header"
|
|
123
|
-
tabIndex: 0
|
|
114
|
+
"data-name": "activity-header"
|
|
124
115
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
-
className: _style.default.mainTitle
|
|
126
|
-
tabIndex: 0
|
|
116
|
+
className: _style.default.mainTitle
|
|
127
117
|
}, /*#__PURE__*/_react.default.createElement("span", null, mainTitle), " ", mainSubtitle), /*#__PURE__*/_react.default.createElement("div", {
|
|
128
|
-
className: _style.default.headerProgression
|
|
129
|
-
tabIndex: 0
|
|
118
|
+
className: _style.default.headerProgression
|
|
130
119
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
131
|
-
className: _style.default.wrapperCta
|
|
132
|
-
tabIndex: 0
|
|
120
|
+
className: _style.default.wrapperCta
|
|
133
121
|
}, themeSelect, recommendationSection), /*#__PURE__*/_react.default.createElement(_starsSummary.default, {
|
|
134
122
|
engines: engines,
|
|
135
123
|
total: total
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["Progression","props","legacyContext","mainTitle","mainSubtitle","recommendation","progressions","adaptiveAriaLabel","total","engines","themeFilter","loading","skin","GetSkinFromContext","onChange","themeFilterOnChange","handleClick","useCallback","e","stopPropagation","preventDefault","onClick","handleSelectTheme","primary","get","loader","style","allProgressions","map","progression","omit","ref","coreProgression","core","themeSelect","isEmpty","options","selectBorder","select","recommendationSection","recommendationWrapper","title","subtitle","classnames","course","innerHTML","__html","courseTitle","cta","backgroundColor","default","headerProgression","wrapperCta","wrapperProgression","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","isRequired","shape","label","stars","number","arrayOf","EngineStars","bool","ProgressionItem","Select","func"],"sources":["../../../src/template/activity/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport omit from 'lodash/fp/omit';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider, {GetSkinFromContext} from '../../atom/provider';\nimport Button from '../../atom/button';\nimport Select from '../../atom/select';\nimport Loader from '../../atom/loader';\nimport ProgressionItem from './progression-item';\nimport EngineStars from './engine-stars';\nimport StarsSummary from './stars-summary';\nimport style from './style.css';\n\nconst Progression = (props, legacyContext) => {\n const {\n mainTitle,\n mainSubtitle,\n recommendation = {},\n progressions = [],\n adaptiveAriaLabel,\n total,\n engines = [],\n themeFilter = {},\n loading\n } = props;\n const skin = GetSkinFromContext(legacyContext);\n const {onChange: themeFilterOnChange} = themeFilter;\n\n const handleClick = useCallback(\n e => {\n e.stopPropagation();\n e.preventDefault();\n const {onClick} = recommendation;\n onClick && onClick(e);\n },\n [recommendation]\n );\n\n const handleSelectTheme = useCallback(\n e => {\n themeFilterOnChange && themeFilterOnChange(e);\n },\n [themeFilterOnChange]\n );\n\n const primary = get('common.primary', skin);\n const loader = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : null;\n const allProgressions = progressions.map(progression => (\n <ProgressionItem\n {...omit(['ref'], progression)}\n key={progression.ref}\n adaptiveAriaLabel={adaptiveAriaLabel}\n />\n ));\n\n const coreProgression = (\n <div data-name=\"activityCore\" className={style.core}>\n {allProgressions}\n </div>\n );\n const themeSelect = !isEmpty(themeFilter.options) ? (\n <Select\n borderClassName={style.selectBorder}\n className={style.select}\n theme=\"thematiques\"\n options={themeFilter.options}\n onChange={handleSelectTheme}\n />\n ) : null;\n const recommendationSection = !isEmpty(recommendation) ? (\n <div className={style.recommendationWrapper}>\n <p className={style.recommendationSection}>{recommendation.title} </p>\n <p className={style.recommendationSection}>\n <span>{recommendation.subtitle} </span>\n <span\n className={classnames(style.course, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: recommendation.courseTitle}}\n />\n </p>\n <Button\n type=\"link\"\n onClick={handleClick}\n submitValue={recommendation.cta}\n style={{\n backgroundColor: primary\n }}\n className={style.cta}\n />\n </div>\n ) : null;\n\n return (\n <div className={style.default}>\n <div data-name=\"activity-header\">\n <div className={style.mainTitle}>\n <span>{mainTitle}</span> {mainSubtitle}\n </div>\n <div className={style.headerProgression}>\n <div className={style.wrapperCta}>\n {themeSelect}\n {recommendationSection}\n </div>\n <StarsSummary engines={engines} total={total} />\n </div>\n </div>\n <div className={style.wrapperProgression} data-name=\"activityList\">\n {coreProgression}\n {loader}\n </div>\n </div>\n );\n};\n\nProgression.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nProgression.propTypes = {\n mainTitle: PropTypes.string.isRequired,\n mainSubtitle: PropTypes.string.isRequired,\n adaptiveAriaLabel: PropTypes.string,\n total: PropTypes.shape({\n label: PropTypes.string.isRequired,\n stars: PropTypes.number.isRequired\n }).isRequired,\n engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes)),\n loading: PropTypes.bool.isRequired,\n progressions: PropTypes.arrayOf(\n PropTypes.shape({...ProgressionItem.propTypes, ref: PropTypes.string.isRequired})\n ),\n themeFilter: PropTypes.shape({\n options: Select.propTypes.options.isRequired,\n onChange: Select.propTypes.onChange\n }),\n recommendation: PropTypes.shape({\n cta: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string.isRequired,\n courseTitle: PropTypes.string.isRequired,\n onClick: PropTypes.func\n })\n};\n\nexport default Progression;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,WAAW,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EAC5C,MAAM;IACJC,SADI;IAEJC,YAFI;IAGJC,cAAc,GAAG,EAHb;IAIJC,YAAY,GAAG,EAJX;IAKJC,iBALI;IAMJC,KANI;IAOJC,OAAO,GAAG,EAPN;IAQJC,WAAW,GAAG,EARV;IASJC;EATI,IAUFV,KAVJ;EAWA,MAAMW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B,kBAAA,CAAUC,MAAV,CAAiBC,UAFM;IAG9BlB,QAAQ,EAAEgB,kBAAA,CAAUC,MAAV,CAAiBC,UAHG;IAI9Bb,WAAW,EAAEW,kBAAA,CAAUC,MAAV,CAAiBC,UAJA;IAK9BvC,OAAO,EAAEqC,kBAAA,CAAUY;EALW,CAAhB;AAjBM,CAAxB;eA0BetE,W"}
|
|
@@ -69,14 +69,16 @@ const ProgressionItem = (props, context) => {
|
|
|
69
69
|
backgroundColor: primary
|
|
70
70
|
}
|
|
71
71
|
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyAdaptive, {
|
|
72
|
-
|
|
72
|
+
style: {
|
|
73
|
+
color: white
|
|
74
|
+
},
|
|
73
75
|
height: 14,
|
|
74
76
|
"aria-label": adaptiveAriaLabel
|
|
75
77
|
})) : null;
|
|
76
78
|
const handleCTAClick = (0, _react.useMemo)(() => e => {
|
|
77
79
|
e.stopPropagation();
|
|
78
80
|
e.preventDefault();
|
|
79
|
-
onClick(e);
|
|
81
|
+
onClick && onClick(e);
|
|
80
82
|
}, [onClick]);
|
|
81
83
|
const link = disabled ? null : /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
82
84
|
style: {
|
|
@@ -87,7 +89,9 @@ const ProgressionItem = (props, context) => {
|
|
|
87
89
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
88
90
|
className: _progressionItem.default.cta
|
|
89
91
|
}, state, " ", /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowRight, {
|
|
90
|
-
|
|
92
|
+
style: {
|
|
93
|
+
color: primary
|
|
94
|
+
},
|
|
91
95
|
height: 12,
|
|
92
96
|
width: 20
|
|
93
97
|
})));
|
|
@@ -97,7 +101,9 @@ const ProgressionItem = (props, context) => {
|
|
|
97
101
|
className: _progressionItem.default.wrapperTitle
|
|
98
102
|
}, /*#__PURE__*/_react.default.createElement(IconType, {
|
|
99
103
|
className: _progressionItem.default.iconType,
|
|
100
|
-
|
|
104
|
+
style: {
|
|
105
|
+
color: dark
|
|
106
|
+
}
|
|
101
107
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
102
108
|
"data-name": "activityLabel",
|
|
103
109
|
className: _progressionItem.default.label,
|
|
@@ -118,7 +124,9 @@ const ProgressionItem = (props, context) => {
|
|
|
118
124
|
className: _progressionItem.default.smallStars
|
|
119
125
|
}, maxStars) : null, ' ', /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyStar, {
|
|
120
126
|
className: _progressionItem.default.iconStar,
|
|
121
|
-
|
|
127
|
+
style: {
|
|
128
|
+
color: primary
|
|
129
|
+
}
|
|
122
130
|
}))), /*#__PURE__*/_react.default.createElement(_progressBar.default, {
|
|
123
131
|
className: _progressionItem.default.completion,
|
|
124
132
|
value: completion * 100,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progression-item.js","names":["ICONS","chapter","TimerIcon","course","LearnerIcon","battle","BoltIcon","certification","CertificationIcon","article","ArticleIcon","scorm","ScormIcon","video","VideoIcon","podcast","PodcastIcon","review","RevisionIcon","ProgressionItem","props","context","skin","disabled","adaptive","completion","label","level","onClick","stars","maxStars","state","type","steps","adaptiveAriaLabel","dark","primary","white","IconType","adaptiveIcon","style","backgroundColor","handleCTAClick","useMemo","e","stopPropagation","preventDefault","link","
|
|
1
|
+
{"version":3,"file":"progression-item.js","names":["ICONS","chapter","TimerIcon","course","LearnerIcon","battle","BoltIcon","certification","CertificationIcon","article","ArticleIcon","scorm","ScormIcon","video","VideoIcon","podcast","PodcastIcon","review","RevisionIcon","ProgressionItem","props","context","skin","disabled","adaptive","completion","label","level","onClick","stars","maxStars","state","type","steps","adaptiveAriaLabel","dark","primary","white","IconType","adaptiveIcon","style","backgroundColor","color","handleCTAClick","useMemo","e","stopPropagation","preventDefault","link","cta","classnames","progressionItem","wrapperTitle","iconType","innerHTML","__html","smallStars","iconStar","borderRadius","propTypes","PropTypes","number","isRequired","bool","string","func","contextTypes","Provider","childContextTypes"],"sources":["../../../src/template/activity/progression-item.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, noop} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowRight as ArrowRightIcon,\n NovaCompositionCoorpacademyStar as StarIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon,\n NovaCompositionCoorpacademyBolt as BoltIcon,\n NovaSolidSchoolScienceGraduationHat as CertificationIcon,\n NovaCompositionCoorpacademyAdaptive as AdaptiveIcon,\n NovaSolidContentContentBook1 as LearnerIcon,\n NovaCompositionCoorpacademyScorm as ScormIcon,\n NovaCompositionCoorpacademyArticle as ArticleIcon,\n NovaCompositionCoorpacademyVideo as VideoIcon,\n NovaCompositionCoorpacademyMicrophone as PodcastIcon,\n NovaCompositionCoorpacademyRevision as RevisionIcon\n} from '@coorpacademy/nova-icons';\nimport Provider from '../../atom/provider';\nimport ProgressBar from '../../molecule/progress-bar';\nimport Link from '../../atom/link';\nimport style from './progression-item.css';\n\nconst ICONS = {\n chapter: TimerIcon,\n course: LearnerIcon,\n battle: BoltIcon,\n certification: CertificationIcon,\n article: ArticleIcon,\n scorm: ScormIcon,\n video: VideoIcon,\n podcast: PodcastIcon,\n review: RevisionIcon\n};\n\nconst ProgressionItem = (props, context) => {\n const {skin} = context;\n const {\n disabled = false,\n adaptive,\n completion,\n label,\n level,\n onClick = noop,\n stars,\n maxStars,\n state,\n type,\n steps = 0,\n adaptiveAriaLabel\n } = props;\n\n const dark = get('common.dark', skin);\n const primary = get('common.primary', skin);\n const white = get('common.white', skin);\n const IconType = ICONS[type];\n\n const adaptiveIcon = adaptive ? (\n <div\n className={style.adaptiveIcon}\n style={{\n backgroundColor: primary\n }}\n >\n <AdaptiveIcon style={{color: white}} height={14} aria-label={adaptiveAriaLabel} />\n </div>\n ) : null;\n\n const handleCTAClick = useMemo(\n () => e => {\n e.stopPropagation();\n e.preventDefault();\n onClick && onClick(e);\n },\n [onClick]\n );\n\n const link = disabled ? null : (\n <Link style={{color: primary}} onClick={handleCTAClick} data-progression-state={state}>\n <span className={style.cta}>\n {state} <ArrowRightIcon style={{color: primary}} height={12} width={20} />\n </span>\n </Link>\n );\n\n return (\n <div className={classnames(style.progressionItem, disabled ? style.disabled : '')}>\n <div className={style.wrapperTitle}>\n <IconType className={style.iconType} style={{color: dark}} />\n <div data-name=\"activityLabel\" className={style.label} title={label}>\n <div\n className={style.innerHTML}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: label}}\n />\n {adaptiveIcon}\n </div>\n\n <div\n data-name=\"activityStars\"\n className={style.stars}\n style={{\n color: primary\n }}\n >\n {stars}\n {maxStars ? ' /' : null}\n {maxStars ? <span className={style.smallStars}>{maxStars}</span> : null}{' '}\n <StarIcon className={style.iconStar} style={{color: primary}} />\n </div>\n </div>\n <ProgressBar\n className={style.completion}\n value={completion * 100}\n max={100}\n steps={steps}\n style={{backgroundColor: primary, borderRadius: 0}}\n />\n <div className={style.state}>\n {link}\n <span className={style.level}>{level}</span>\n </div>\n </div>\n );\n};\n\nProgressionItem.propTypes = {\n completion: PropTypes.number.isRequired,\n stars: PropTypes.number.isRequired,\n maxStars: PropTypes.number,\n steps: PropTypes.number,\n disabled: PropTypes.bool,\n label: PropTypes.string.isRequired,\n level: PropTypes.string.isRequired,\n state: PropTypes.string.isRequired,\n adaptiveAriaLabel: PropTypes.string,\n type: PropTypes.string.isRequired,\n adaptive: PropTypes.bool.isRequired,\n onClick: PropTypes.func\n};\n\nProgressionItem.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default ProgressionItem;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAcA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,KAAK,GAAG;EACZC,OAAO,EAAEC,2CADG;EAEZC,MAAM,EAAEC,uCAFI;EAGZC,MAAM,EAAEC,0CAHI;EAIZC,aAAa,EAAEC,8CAJH;EA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
|
13
13
|
active: PropTypes.Requireable<boolean>;
|
|
14
14
|
disabled: PropTypes.Requireable<boolean>;
|
|
15
15
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
16
|
-
className: PropTypes.Requireable<string>;
|
|
17
16
|
toolTip: PropTypes.Requireable<PropTypes.InferProps<{
|
|
18
17
|
preMessage: PropTypes.Requireable<string>;
|
|
19
18
|
linkMessage: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stars-summary.d.ts","sourceRoot":"","sources":["../../../src/template/activity/stars-summary.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"stars-summary.d.ts","sourceRoot":"","sources":["../../../src/template/activity/stars-summary.js"],"names":[],"mappings":";AA0DA,kFAiFC"}
|