@coorpacademy/components 11.6.1 → 11.7.3-alpha.29
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/README.md +3 -3
- package/es/atom/loader/index.native.d.ts +10 -0
- package/es/atom/loader/index.native.d.ts.map +1 -0
- package/es/atom/loader/index.native.js +192 -0
- package/es/atom/loader/index.native.js.map +1 -0
- package/es/atom/select/index.d.ts +18 -0
- package/es/atom/select/index.d.ts.map +1 -1
- package/es/atom/select/index.js +69 -15
- package/es/atom/select/index.js.map +1 -1
- package/es/molecule/answer/index.d.ts.map +1 -1
- package/es/molecule/answer/index.js +17 -12
- package/es/molecule/answer/index.js.map +1 -1
- package/es/molecule/brand-form-group/index.d.ts +18 -0
- package/es/molecule/empty-state-dashboard/index.d.ts +23 -0
- package/es/molecule/empty-state-dashboard/index.d.ts.map +1 -0
- package/es/molecule/empty-state-dashboard/index.js +31 -0
- package/es/molecule/empty-state-dashboard/index.js.map +1 -0
- package/es/molecule/empty-state-dashboard/style.css +55 -0
- package/es/molecule/empty-state-dashboard/types.d.ts +19 -0
- package/es/molecule/empty-state-dashboard/types.d.ts.map +1 -0
- package/es/molecule/empty-state-dashboard/types.js +19 -0
- package/es/molecule/empty-state-dashboard/types.js.map +1 -0
- package/es/molecule/filters/filters-wrapper.d.ts +1 -0
- package/es/molecule/filters/filters-wrapper.d.ts.map +1 -1
- package/es/molecule/filters/filters-wrapper.js +9 -5
- package/es/molecule/filters/filters-wrapper.js.map +1 -1
- package/es/molecule/filters/index.d.ts +10 -0
- package/es/molecule/filters/index.d.ts.map +1 -1
- package/es/molecule/filters/index.js +6 -3
- package/es/molecule/filters/index.js.map +1 -1
- package/es/molecule/questions/drop-down/index.d.ts +1 -0
- package/es/molecule/questions/drop-down/index.d.ts.map +1 -1
- package/es/molecule/questions/drop-down/index.js +9 -5
- package/es/molecule/questions/drop-down/index.js.map +1 -1
- package/es/molecule/questions/qcm/index.d.ts +1 -0
- package/es/molecule/questions/qcm/index.d.ts.map +1 -1
- package/es/molecule/questions/qcm/index.js +9 -5
- package/es/molecule/questions/qcm/index.js.map +1 -1
- package/es/molecule/questions/qcm-drag/index.d.ts +3 -1
- package/es/molecule/questions/qcm-drag/index.d.ts.map +1 -1
- package/es/molecule/questions/qcm-drag/index.js +9 -5
- package/es/molecule/questions/qcm-drag/index.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/index.d.ts +1 -0
- package/es/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
- package/es/molecule/questions/qcm-graphic/index.js +9 -5
- package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/es/molecule/questions/question-range/index.d.ts +1 -0
- package/es/molecule/questions/question-range/index.d.ts.map +1 -1
- package/es/molecule/questions/question-range/index.js +10 -6
- package/es/molecule/questions/question-range/index.js.map +1 -1
- package/es/molecule/questions/template/index.d.ts +6 -2
- package/es/molecule/questions/template/index.d.ts.map +1 -1
- package/es/molecule/questions/template/index.js +9 -5
- package/es/molecule/questions/template/index.js.map +1 -1
- package/es/molecule/setup-slide/index.d.ts +9 -0
- package/es/molecule/setup-slider/index.d.ts +9 -0
- package/es/organism/brand-form/index.d.ts +18 -0
- package/es/organism/list-item/index.d.ts +8 -6
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +16 -2
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +18 -0
- package/es/organism/list-items/index.d.ts +2 -0
- package/es/organism/list-items/index.js +5 -1
- package/es/organism/list-items/index.js.map +1 -1
- package/es/organism/user-preferences/index.d.ts +1 -0
- package/es/organism/user-preferences/index.d.ts.map +1 -1
- package/es/organism/user-preferences/index.js +9 -5
- package/es/organism/user-preferences/index.js.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +18 -0
- package/es/template/activity/index.d.ts +36 -40
- package/es/template/activity/index.d.ts.map +1 -1
- package/es/template/activity/index.js +89 -111
- package/es/template/activity/index.js.map +1 -1
- package/es/template/activity/stars-summary.d.ts +9 -18
- package/es/template/activity/stars-summary.d.ts.map +1 -1
- package/es/template/activity/stars-summary.js +94 -122
- package/es/template/activity/stars-summary.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +56 -0
- package/es/template/back-office/brand-update/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.js +12 -3
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/style.css +5 -1
- package/es/template/common/search-page/index.d.ts +11 -0
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +6 -3
- package/es/template/common/search-page/index.js.map +1 -1
- package/es/util/button-icons.d.ts +1 -0
- package/es/util/button-icons.d.ts.map +1 -1
- package/es/util/button-icons.js +3 -2
- package/es/util/button-icons.js.map +1 -1
- package/lib/atom/loader/index.native.d.ts +10 -0
- package/lib/atom/loader/index.native.d.ts.map +1 -0
- package/lib/atom/loader/index.native.js +205 -0
- package/lib/atom/loader/index.native.js.map +1 -0
- package/lib/atom/select/index.d.ts +18 -0
- package/lib/atom/select/index.d.ts.map +1 -1
- package/lib/atom/select/index.js +72 -14
- package/lib/atom/select/index.js.map +1 -1
- package/lib/molecule/answer/index.d.ts.map +1 -1
- package/lib/molecule/answer/index.js +18 -13
- package/lib/molecule/answer/index.js.map +1 -1
- package/lib/molecule/brand-form-group/index.d.ts +18 -0
- package/lib/molecule/empty-state-dashboard/index.d.ts +23 -0
- package/lib/molecule/empty-state-dashboard/index.d.ts.map +1 -0
- package/lib/molecule/empty-state-dashboard/index.js +42 -0
- package/lib/molecule/empty-state-dashboard/index.js.map +1 -0
- package/lib/molecule/empty-state-dashboard/style.css +55 -0
- package/lib/molecule/empty-state-dashboard/types.d.ts +19 -0
- package/lib/molecule/empty-state-dashboard/types.d.ts.map +1 -0
- package/lib/molecule/empty-state-dashboard/types.js +29 -0
- package/lib/molecule/empty-state-dashboard/types.js.map +1 -0
- package/lib/molecule/filters/filters-wrapper.d.ts +1 -0
- package/lib/molecule/filters/filters-wrapper.d.ts.map +1 -1
- package/lib/molecule/filters/filters-wrapper.js +9 -5
- package/lib/molecule/filters/filters-wrapper.js.map +1 -1
- package/lib/molecule/filters/index.d.ts +10 -0
- package/lib/molecule/filters/index.d.ts.map +1 -1
- package/lib/molecule/filters/index.js +6 -3
- package/lib/molecule/filters/index.js.map +1 -1
- package/lib/molecule/questions/drop-down/index.d.ts +1 -0
- package/lib/molecule/questions/drop-down/index.d.ts.map +1 -1
- package/lib/molecule/questions/drop-down/index.js +9 -5
- package/lib/molecule/questions/drop-down/index.js.map +1 -1
- package/lib/molecule/questions/qcm/index.d.ts +1 -0
- package/lib/molecule/questions/qcm/index.d.ts.map +1 -1
- package/lib/molecule/questions/qcm/index.js +9 -5
- package/lib/molecule/questions/qcm/index.js.map +1 -1
- package/lib/molecule/questions/qcm-drag/index.d.ts +3 -1
- package/lib/molecule/questions/qcm-drag/index.d.ts.map +1 -1
- package/lib/molecule/questions/qcm-drag/index.js +9 -5
- package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/index.d.ts +1 -0
- package/lib/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
- package/lib/molecule/questions/qcm-graphic/index.js +9 -5
- package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/lib/molecule/questions/question-range/index.d.ts +1 -0
- package/lib/molecule/questions/question-range/index.d.ts.map +1 -1
- package/lib/molecule/questions/question-range/index.js +10 -6
- package/lib/molecule/questions/question-range/index.js.map +1 -1
- package/lib/molecule/questions/template/index.d.ts +6 -2
- package/lib/molecule/questions/template/index.d.ts.map +1 -1
- package/lib/molecule/questions/template/index.js +9 -5
- package/lib/molecule/questions/template/index.js.map +1 -1
- package/lib/molecule/setup-slide/index.d.ts +9 -0
- package/lib/molecule/setup-slider/index.d.ts +9 -0
- package/lib/organism/brand-form/index.d.ts +18 -0
- package/lib/organism/list-item/index.d.ts +8 -6
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +16 -2
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +18 -0
- package/lib/organism/list-items/index.d.ts +2 -0
- package/lib/organism/list-items/index.js +5 -1
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/organism/user-preferences/index.d.ts +1 -0
- package/lib/organism/user-preferences/index.d.ts.map +1 -1
- package/lib/organism/user-preferences/index.js +9 -5
- package/lib/organism/user-preferences/index.js.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +18 -0
- package/lib/template/activity/index.d.ts +36 -40
- package/lib/template/activity/index.d.ts.map +1 -1
- package/lib/template/activity/index.js +95 -110
- package/lib/template/activity/index.js.map +1 -1
- package/lib/template/activity/stars-summary.d.ts +9 -18
- package/lib/template/activity/stars-summary.d.ts.map +1 -1
- package/lib/template/activity/stars-summary.js +90 -119
- package/lib/template/activity/stars-summary.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +56 -0
- package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.js +13 -3
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/style.css +5 -1
- package/lib/template/common/search-page/index.d.ts +11 -0
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +6 -3
- package/lib/template/common/search-page/index.js.map +1 -1
- package/lib/util/button-icons.d.ts +1 -0
- package/lib/util/button-icons.d.ts.map +1 -1
- package/lib/util/button-icons.js +2 -1
- package/lib/util/button-icons.js.map +1 -1
- package/locales/bs/global.json +8 -1
- package/locales/cs/global.json +9 -1
- package/locales/de/global.json +9 -1
- package/locales/en/global.json +1 -1
- package/locales/es/global.json +9 -1
- package/locales/et/global.json +9 -1
- package/locales/fr/global.json +1 -1
- package/locales/hr/global.json +9 -1
- package/locales/hu/global.json +9 -1
- package/locales/hy/global.json +0 -1
- package/locales/it/global.json +9 -1
- package/locales/ja/global.json +9 -1
- package/locales/ko/global.json +9 -1
- package/locales/nl/global.json +9 -1
- package/locales/pl/global.json +9 -1
- package/locales/pt/global.json +9 -1
- package/locales/ro/global.json +9 -1
- package/locales/ru/global.json +1 -1
- package/locales/sk/global.json +9 -1
- package/locales/tl/global.json +9 -1
- package/locales/tr/global.json +9 -1
- package/locales/uk/global.json +9 -1
- package/locales/vi/global.json +9 -1
- package/locales/zh/global.json +9 -1
- package/locales/zh_TW/global.json +9 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAQA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAQA,mDAqCC"}
|
|
@@ -20,16 +20,20 @@ var _style = _interopRequireDefault(require("./style.css"));
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
22
|
const ListItem = props => {
|
|
23
|
+
let isPublished = false;
|
|
23
24
|
const {
|
|
24
25
|
bulletPointMenuButton,
|
|
25
26
|
buttonLink,
|
|
26
27
|
tags,
|
|
27
|
-
title
|
|
28
|
+
title,
|
|
29
|
+
order,
|
|
30
|
+
'aria-label': ariaLabel
|
|
28
31
|
} = props;
|
|
29
32
|
|
|
30
33
|
const tagsView = _map2.default.convert({
|
|
31
34
|
cap: false
|
|
32
35
|
})((tag, index) => {
|
|
36
|
+
isPublished = tag.type === 'published';
|
|
33
37
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
38
|
key: index,
|
|
35
39
|
className: _style.default.tag
|
|
@@ -38,7 +42,15 @@ const ListItem = props => {
|
|
|
38
42
|
|
|
39
43
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
40
44
|
className: _style.default.wrapper
|
|
45
|
+
}, isPublished ? /*#__PURE__*/_react.default.createElement("div", {
|
|
46
|
+
className: _style.default.orderWrapper
|
|
41
47
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
48
|
+
className: _style.default.order,
|
|
49
|
+
"aria-label": ariaLabel
|
|
50
|
+
}, order + 1), /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
+
className: _style.default.title,
|
|
52
|
+
title: title
|
|
53
|
+
}, title)) : /*#__PURE__*/_react.default.createElement("div", {
|
|
42
54
|
className: _style.default.title,
|
|
43
55
|
title: title
|
|
44
56
|
}, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -75,7 +87,9 @@ ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
75
87
|
label: _propTypes.default.string,
|
|
76
88
|
type: _propTypes.default.oneOf(['published', 'draft', 'archived', 'revised', 'default'])
|
|
77
89
|
})),
|
|
78
|
-
title: _propTypes.default.string.isRequired
|
|
90
|
+
title: _propTypes.default.string.isRequired,
|
|
91
|
+
order: _propTypes.default.number,
|
|
92
|
+
'aria-label': _propTypes.default.string
|
|
79
93
|
} : {};
|
|
80
94
|
var _default = ListItem;
|
|
81
95
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ListItem","props","bulletPointMenuButton","buttonLink","tags","title","tagsView","convert","cap","tag","index","style","wrapper","settings","edit","propTypes","PropTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","
|
|
1
|
+
{"version":3,"file":"index.js","names":["ListItem","props","isPublished","bulletPointMenuButton","buttonLink","tags","title","order","ariaLabel","tagsView","convert","cap","tag","index","type","style","wrapper","orderWrapper","settings","edit","propTypes","PropTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","onClick","func","dataName","icon","position","oneOf","isRequired","number"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport style from './style.css';\n\nconst ListItem = props => {\n let isPublished = false;\n const {bulletPointMenuButton, buttonLink, tags, title, order, 'aria-label': ariaLabel} = props;\n\n const tagsView = map.convert({cap: false})((tag, index) => {\n isPublished = tag.type === 'published';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n return (\n <div className={style.wrapper}>\n {isPublished ? (\n <div className={style.orderWrapper}>\n <div className={style.order} aria-label={ariaLabel}>\n {order + 1}\n </div>\n <div className={style.title} title={title}>\n {title}\n </div>\n </div>\n ) : (\n <div className={style.title} title={title}>\n {title}\n </div>\n )}\n <div className={style.settings}>\n {tagsView}\n <div className={style.edit}>\n <ButtonLink {...buttonLink} />\n </div>\n <BulletPointMenuButton {...bulletPointMenuButton} />\n </div>\n </div>\n );\n};\n\nListItem.propTypes = {\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])\n })\n ),\n title: PropTypes.string.isRequired,\n order: PropTypes.number,\n 'aria-label': PropTypes.string\n};\n\nexport default ListItem;\n"],"mappings":"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"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@value xtraLightGrey from colors;
|
|
5
5
|
@value cm_grey_900 from colors;
|
|
6
6
|
@value primaryAdd1 from colors;
|
|
7
|
+
@value cm_grey_400 from colors;
|
|
7
8
|
|
|
8
9
|
.wrapper {
|
|
9
10
|
align-items: center;
|
|
@@ -51,3 +52,20 @@
|
|
|
51
52
|
margin: 0 16px 0 0;
|
|
52
53
|
min-width: 93px;
|
|
53
54
|
}
|
|
55
|
+
|
|
56
|
+
.order {
|
|
57
|
+
width: 6px;
|
|
58
|
+
height: 20px;
|
|
59
|
+
font-family: 'Gilroy';
|
|
60
|
+
font-style: normal;
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
line-height: 20px;
|
|
64
|
+
color: cm_grey_400;
|
|
65
|
+
margin: 0 16px 0 0;
|
|
66
|
+
}
|
|
67
|
+
.orderWrapper {
|
|
68
|
+
align-items: center;
|
|
69
|
+
display: flex;
|
|
70
|
+
width: 100%;
|
|
71
|
+
}
|
|
@@ -56,6 +56,8 @@ declare namespace ListItems {
|
|
|
56
56
|
type: PropTypes.Requireable<string>;
|
|
57
57
|
}> | null | undefined)[]>;
|
|
58
58
|
title: PropTypes.Validator<string>;
|
|
59
|
+
order: PropTypes.Requireable<number>;
|
|
60
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
59
61
|
}> | null | undefined)[]>;
|
|
60
62
|
title: PropTypes.Requireable<string>;
|
|
61
63
|
};
|
|
@@ -17,6 +17,8 @@ var _style = _interopRequireDefault(require("./style.css"));
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
+
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); }
|
|
21
|
+
|
|
20
22
|
const ListItems = ({
|
|
21
23
|
title,
|
|
22
24
|
buttonLink,
|
|
@@ -27,7 +29,9 @@ const ListItems = ({
|
|
|
27
29
|
key: item.id,
|
|
28
30
|
className: _style.default.item,
|
|
29
31
|
"data-name": `content-${index}`
|
|
30
|
-
}, /*#__PURE__*/_react.default.createElement(_listItem.default, item
|
|
32
|
+
}, /*#__PURE__*/_react.default.createElement(_listItem.default, _extends({}, item, {
|
|
33
|
+
order: index
|
|
34
|
+
}))));
|
|
31
35
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
32
36
|
className: _style.default.header
|
|
33
37
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ListItems","title","buttonLink","items","ariaLabel","itemsView","map","item","index","id","style","header","buttonCreate","list","propTypes","PropTypes","string","shape","ButtonLink","arrayOf","ListItem"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel}) => {\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} />\n </li>\n ));\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string\n};\n\nexport default ListItems;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA
|
|
1
|
+
{"version":3,"file":"index.js","names":["ListItems","title","buttonLink","items","ariaLabel","itemsView","map","item","index","id","style","header","buttonCreate","list","propTypes","PropTypes","string","shape","ButtonLink","arrayOf","ListItem"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel}) => {\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={index} />\n </li>\n ));\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string\n};\n\nexport default ListItems;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;EAACC,KAAD;EAAQC,UAAR;EAAoBC,KAApB;EAA2B,cAAcC;AAAzC,CAAD,KAAyD;EACzE,MAAMC,SAAS,GAAGF,KAAK,CAACG,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,kBAC1B;IAAI,GAAG,EAAED,IAAI,CAACE,EAAd;IAAkB,SAAS,EAAEC,cAAA,CAAMH,IAAnC;IAAyC,aAAY,WAAUC,KAAM;EAArE,gBACE,6BAAC,iBAAD,eAAcD,IAAd;IAAoB,KAAK,EAAEC;EAA3B,GADF,CADgB,CAAlB;EAMA,oBACE,uDACE;IAAK,SAAS,EAAEE,cAAA,CAAMC;EAAtB,gBACE;IAAK,SAAS,EAAED,cAAA,CAAMT;EAAtB,gBACE,6BAAC,cAAD;IAAO,KAAK,EAAEA,KAAd;IAAqB,IAAI,EAAE,YAA3B;IAAyC,aAAW;EAApD,EADF,CADF,eAIE;IAAK,SAAS,EAAES,cAAA,CAAME;EAAtB,gBACE,6BAAC,mBAAD,EAAgBV,UAAhB,CADF,CAJF,CADF,eASE;IAAI,SAAS,EAAEQ,cAAA,CAAMG,IAArB;IAA2B,cAAYT,SAAvC;IAAkD,aAAW;EAA7D,GACGC,SADH,CATF,CADF;AAeD,CAtBD;;AAwBAL,SAAS,CAACc,SAAV,2CAAsB;EACpB,cAAcC,kBAAA,CAAUC,MADJ;EAEpBd,UAAU,EAAEa,kBAAA,CAAUE,KAAV,CAAgBC,mBAAA,CAAWJ,SAA3B,CAFQ;EAGpBX,KAAK,EAAEY,kBAAA,CAAUI,OAAV,CAAkBJ,kBAAA,CAAUE,KAAV,CAAgBG,iBAAA,CAASN,SAAzB,CAAlB,CAHa;EAIpBb,KAAK,EAAEc,kBAAA,CAAUC;AAJG,CAAtB;eAOehB,S"}
|
|
@@ -19,6 +19,7 @@ declare namespace UserPreferences {
|
|
|
19
19
|
requiredSelection: PropTypes.Requireable<boolean>;
|
|
20
20
|
}> | null | undefined)[]>;
|
|
21
21
|
const moreInfoAriaLabel: PropTypes.Requireable<string>;
|
|
22
|
+
const groupAriaLabel: PropTypes.Requireable<string>;
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/user-preferences/index.js"],"names":[],"mappings":";AAoCA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/user-preferences/index.js"],"names":[],"mappings":";AAoCA,0DAeC"}
|
|
@@ -59,19 +59,23 @@ Settings.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, _input
|
|
|
59
59
|
const UserPreferences = props => {
|
|
60
60
|
const {
|
|
61
61
|
preferences = [],
|
|
62
|
-
moreInfoAriaLabel
|
|
62
|
+
moreInfoAriaLabel,
|
|
63
|
+
groupAriaLabel
|
|
63
64
|
} = props;
|
|
64
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
-
className: _style.default.preferences
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement("form", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: _style.default.preferences,
|
|
67
|
+
role: "group",
|
|
68
|
+
"aria-label": groupAriaLabel
|
|
66
69
|
}, (0, _map2.default)(settings => /*#__PURE__*/_react.default.createElement(Settings, _extends({}, settings, {
|
|
67
70
|
key: settings.label,
|
|
68
71
|
moreInfoAriaLabel: moreInfoAriaLabel
|
|
69
|
-
})), preferences));
|
|
72
|
+
})), preferences)));
|
|
70
73
|
};
|
|
71
74
|
|
|
72
75
|
UserPreferences.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
73
76
|
preferences: _propTypes.default.arrayOf(_propTypes.default.shape(Settings.propTypes)),
|
|
74
|
-
moreInfoAriaLabel: _propTypes.default.string
|
|
77
|
+
moreInfoAriaLabel: _propTypes.default.string,
|
|
78
|
+
groupAriaLabel: _propTypes.default.string
|
|
75
79
|
} : {};
|
|
76
80
|
var _default = UserPreferences;
|
|
77
81
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Settings","props","label","description","moreInfoAriaLabel","settings","style","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","InputSwitch","PropTypes","string","isRequired","UserPreferences","preferences","arrayOf","shape"],"sources":["../../../src/organism/user-preferences/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, isEmpty} from 'lodash/fp';\nimport {NovaCompositionCoorpacademyInformationIcon as InfoIcon} from '@coorpacademy/nova-icons';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst Settings = props => {\n const {label, description, moreInfoAriaLabel, ...settings} = props;\n return (\n <div className={style.settings}>\n <InputSwitch {...settings} />\n <span className={style.label}>{label}</span>\n {isEmpty(description) ? null : (\n <div className={style.infoIconWrapper}>\n <InfoIcon\n height={16}\n width={16}\n className={style.infoIcon}\n aria-label={moreInfoAriaLabel}\n />\n <div className={style.showToolTip}>\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n </div>\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n ...InputSwitch.propTypes,\n label: PropTypes.string.isRequired,\n description: PropTypes.string\n};\n\nconst UserPreferences = props => {\n const {preferences = [], moreInfoAriaLabel} = props;\n\n return (\n <div className={style.preferences}>\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["Settings","props","label","description","moreInfoAriaLabel","settings","style","infoIconWrapper","infoIcon","showToolTip","descriptionLabel","propTypes","InputSwitch","PropTypes","string","isRequired","UserPreferences","preferences","groupAriaLabel","arrayOf","shape"],"sources":["../../../src/organism/user-preferences/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, isEmpty} from 'lodash/fp';\nimport {NovaCompositionCoorpacademyInformationIcon as InfoIcon} from '@coorpacademy/nova-icons';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst Settings = props => {\n const {label, description, moreInfoAriaLabel, ...settings} = props;\n return (\n <div className={style.settings}>\n <InputSwitch {...settings} />\n <span className={style.label}>{label}</span>\n {isEmpty(description) ? null : (\n <div className={style.infoIconWrapper}>\n <InfoIcon\n height={16}\n width={16}\n className={style.infoIcon}\n aria-label={moreInfoAriaLabel}\n />\n <div className={style.showToolTip}>\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n </div>\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n ...InputSwitch.propTypes,\n label: PropTypes.string.isRequired,\n description: PropTypes.string\n};\n\nconst UserPreferences = props => {\n const {preferences = [], moreInfoAriaLabel, groupAriaLabel} = props;\n\n return (\n <form>\n <div className={style.preferences} role=\"group\" aria-label={groupAriaLabel}>\n {map(\n settings => (\n <Settings {...settings} key={settings.label} moreInfoAriaLabel={moreInfoAriaLabel} />\n ),\n preferences\n )}\n </div>\n </form>\n );\n};\n\nUserPreferences.propTypes = {\n preferences: PropTypes.arrayOf(PropTypes.shape(Settings.propTypes)),\n moreInfoAriaLabel: PropTypes.string,\n groupAriaLabel: PropTypes.string\n};\n\nexport default UserPreferences;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,KAAD;IAAQC,WAAR;IAAqBC;EAArB,IAAuDH,KAA7D;EAAA,MAAiDI,QAAjD,iCAA6DJ,KAA7D;;EACA,oBACE;IAAK,SAAS,EAAEK,cAAA,CAAMD;EAAtB,gBACE,6BAAC,oBAAD,EAAiBA,QAAjB,CADF,eAEE;IAAM,SAAS,EAAEC,cAAA,CAAMJ;EAAvB,GAA+BA,KAA/B,CAFF,EAGG,uBAAQC,WAAR,IAAuB,IAAvB,gBACC;IAAK,SAAS,EAAEG,cAAA,CAAMC;EAAtB,gBACE,6BAAC,qDAAD;IACE,MAAM,EAAE,EADV;IAEE,KAAK,EAAE,EAFT;IAGE,SAAS,EAAED,cAAA,CAAME,QAHnB;IAIE,cAAYJ;EAJd,EADF,eAOE;IAAK,SAAS,EAAEE,cAAA,CAAMG;EAAtB,gBACE;IAAK,SAAS,EAAEH,cAAA,CAAMI;EAAtB,GAAyCP,WAAzC,CADF,CAPF,CAJJ,CADF;AAmBD,CArBD;;AAuBAH,QAAQ,CAACW,SAAT,wDACKC,oBAAA,CAAYD,SADjB;EAEET,KAAK,EAAEW,kBAAA,CAAUC,MAAV,CAAiBC,UAF1B;EAGEZ,WAAW,EAAEU,kBAAA,CAAUC;AAHzB;;AAMA,MAAME,eAAe,GAAGf,KAAK,IAAI;EAC/B,MAAM;IAACgB,WAAW,GAAG,EAAf;IAAmBb,iBAAnB;IAAsCc;EAAtC,IAAwDjB,KAA9D;EAEA,oBACE,wDACE;IAAK,SAAS,EAAEK,cAAA,CAAMW,WAAtB;IAAmC,IAAI,EAAC,OAAxC;IAAgD,cAAYC;EAA5D,GACG,mBACCb,QAAQ,iBACN,6BAAC,QAAD,eAAcA,QAAd;IAAwB,GAAG,EAAEA,QAAQ,CAACH,KAAtC;IAA6C,iBAAiB,EAAEE;EAAhE,GAFH,EAICa,WAJD,CADH,CADF,CADF;AAYD,CAfD;;AAiBAD,eAAe,CAACL,SAAhB,2CAA4B;EAC1BM,WAAW,EAAEJ,kBAAA,CAAUM,OAAV,CAAkBN,kBAAA,CAAUO,KAAV,CAAgBpB,QAAQ,CAACW,SAAzB,CAAlB,CADa;EAE1BP,iBAAiB,EAAES,kBAAA,CAAUC,MAFH;EAG1BI,cAAc,EAAEL,kBAAA,CAAUC;AAHA,CAA5B;eAMeE,e"}
|
|
@@ -143,6 +143,15 @@ declare namespace WizardContents {
|
|
|
143
143
|
selected: PropTypes.Requireable<boolean>;
|
|
144
144
|
validOption: PropTypes.Requireable<boolean>;
|
|
145
145
|
}> | null | undefined)[]>;
|
|
146
|
+
optgroups: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
147
|
+
label: PropTypes.Validator<string>;
|
|
148
|
+
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
149
|
+
name: PropTypes.Validator<string>;
|
|
150
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
151
|
+
selected: PropTypes.Requireable<boolean>;
|
|
152
|
+
validOption: PropTypes.Requireable<boolean>;
|
|
153
|
+
}> | null | undefined)[]>;
|
|
154
|
+
}> | null | undefined)[]>;
|
|
146
155
|
modified: PropTypes.Requireable<boolean>;
|
|
147
156
|
error: PropTypes.Requireable<boolean>;
|
|
148
157
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -247,6 +256,15 @@ declare namespace WizardContents {
|
|
|
247
256
|
selected: PropTypes.Requireable<boolean>;
|
|
248
257
|
validOption: PropTypes.Requireable<boolean>;
|
|
249
258
|
}> | null | undefined)[]>;
|
|
259
|
+
optgroups: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
260
|
+
label: PropTypes.Validator<string>;
|
|
261
|
+
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
262
|
+
name: PropTypes.Validator<string>;
|
|
263
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
264
|
+
selected: PropTypes.Requireable<boolean>;
|
|
265
|
+
validOption: PropTypes.Requireable<boolean>;
|
|
266
|
+
}> | null | undefined)[]>;
|
|
267
|
+
}> | null | undefined)[]>;
|
|
250
268
|
modified: PropTypes.Requireable<boolean>;
|
|
251
269
|
error: PropTypes.Requireable<boolean>;
|
|
252
270
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
export default Progression;
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
declare function Progression(props: any, legacyContext: any): JSX.Element;
|
|
3
|
+
declare namespace Progression {
|
|
4
|
+
namespace contextTypes {
|
|
5
|
+
const skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
|
+
common: PropTypes.Requireable<{
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
}>;
|
|
9
|
+
images: PropTypes.Requireable<PropTypes.InferProps<{
|
|
10
|
+
'logo-mobile': PropTypes.Requireable<any>;
|
|
11
|
+
logo: PropTypes.Requireable<any>;
|
|
12
|
+
'logo-email': PropTypes.Requireable<any>;
|
|
13
|
+
login: PropTypes.Requireable<any>;
|
|
14
|
+
}>>;
|
|
15
|
+
icons: PropTypes.Requireable<{
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
}>;
|
|
18
|
+
mod: PropTypes.Requireable<{
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
}>;
|
|
21
|
+
courses: PropTypes.Requireable<any[]>;
|
|
22
|
+
texts: PropTypes.Requireable<{
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
}>;
|
|
25
|
+
}>>;
|
|
26
|
+
}
|
|
27
|
+
namespace propTypes {
|
|
28
|
+
const mainTitle: PropTypes.Validator<string>;
|
|
29
|
+
const mainSubtitle: PropTypes.Validator<string>;
|
|
30
|
+
const adaptiveAriaLabel: PropTypes.Requireable<string>;
|
|
31
|
+
const total: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
8
32
|
label: PropTypes.Validator<string>;
|
|
9
33
|
stars: PropTypes.Validator<number>;
|
|
10
34
|
}>>>;
|
|
11
|
-
engines: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
35
|
+
const engines: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
12
36
|
type: PropTypes.Validator<string>;
|
|
13
37
|
stars: PropTypes.Validator<number>;
|
|
14
38
|
title: PropTypes.Validator<string>;
|
|
@@ -22,8 +46,8 @@ declare class Progression extends React.Component<any, any, any> {
|
|
|
22
46
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
23
47
|
}>>;
|
|
24
48
|
}> | null | undefined)[]>;
|
|
25
|
-
loading: PropTypes.Validator<boolean>;
|
|
26
|
-
progressions: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
49
|
+
const loading: PropTypes.Validator<boolean>;
|
|
50
|
+
const progressions: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
27
51
|
ref: PropTypes.Validator<string>;
|
|
28
52
|
completion: PropTypes.Validator<number>;
|
|
29
53
|
stars: PropTypes.Validator<number>;
|
|
@@ -38,7 +62,7 @@ declare class Progression extends React.Component<any, any, any> {
|
|
|
38
62
|
adaptive: PropTypes.Validator<boolean>;
|
|
39
63
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
64
|
}> | null | undefined)[]>;
|
|
41
|
-
themeFilter: PropTypes.Requireable<PropTypes.InferProps<{
|
|
65
|
+
const themeFilter: PropTypes.Requireable<PropTypes.InferProps<{
|
|
42
66
|
options: PropTypes.Validator<(PropTypes.InferProps<{
|
|
43
67
|
name: PropTypes.Validator<string>;
|
|
44
68
|
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
@@ -47,42 +71,14 @@ declare class Progression extends React.Component<any, any, any> {
|
|
|
47
71
|
}> | null | undefined)[]>;
|
|
48
72
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
49
73
|
}>>;
|
|
50
|
-
recommendation: PropTypes.Requireable<PropTypes.InferProps<{
|
|
74
|
+
const recommendation: PropTypes.Requireable<PropTypes.InferProps<{
|
|
51
75
|
cta: PropTypes.Validator<string>;
|
|
52
76
|
title: PropTypes.Validator<string>;
|
|
53
77
|
subtitle: PropTypes.Validator<string>;
|
|
54
78
|
courseTitle: PropTypes.Validator<string>;
|
|
55
79
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
56
80
|
}>>;
|
|
57
|
-
}
|
|
58
|
-
static contextTypes: {
|
|
59
|
-
skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
60
|
-
common: PropTypes.Requireable<{
|
|
61
|
-
[x: string]: any;
|
|
62
|
-
}>;
|
|
63
|
-
images: PropTypes.Requireable<PropTypes.InferProps<{
|
|
64
|
-
'logo-mobile': PropTypes.Requireable<any>;
|
|
65
|
-
logo: PropTypes.Requireable<any>;
|
|
66
|
-
'logo-email': PropTypes.Requireable<any>;
|
|
67
|
-
login: PropTypes.Requireable<any>;
|
|
68
|
-
}>>;
|
|
69
|
-
icons: PropTypes.Requireable<{
|
|
70
|
-
[x: string]: any;
|
|
71
|
-
}>;
|
|
72
|
-
mod: PropTypes.Requireable<{
|
|
73
|
-
[x: string]: any;
|
|
74
|
-
}>;
|
|
75
|
-
courses: PropTypes.Requireable<any[]>;
|
|
76
|
-
texts: PropTypes.Requireable<{
|
|
77
|
-
[x: string]: any;
|
|
78
|
-
}>;
|
|
79
|
-
}>>;
|
|
80
|
-
};
|
|
81
|
-
constructor(props: any, context: any);
|
|
82
|
-
handleClick: (e: any) => void;
|
|
83
|
-
handleSelectTheme: (e: any) => void;
|
|
84
|
-
render(): JSX.Element;
|
|
81
|
+
}
|
|
85
82
|
}
|
|
86
|
-
import React from "react";
|
|
87
83
|
import PropTypes from "prop-types";
|
|
88
84
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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"}
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _get = _interopRequireDefault(require("lodash/fp/get"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _isEmpty = _interopRequireDefault(require("lodash/fp/isEmpty"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _omit = _interopRequireDefault(require("lodash/fp/omit"));
|
|
13
13
|
|
|
14
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
15
|
|
|
16
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
17
|
|
|
18
|
-
var _provider =
|
|
18
|
+
var _provider = _interopRequireWildcard(require("../../atom/provider"));
|
|
19
19
|
|
|
20
20
|
var _button = _interopRequireDefault(require("../../atom/button"));
|
|
21
21
|
|
|
@@ -33,114 +33,99 @@ var _style = _interopRequireDefault(require("./style.css"));
|
|
|
33
33
|
|
|
34
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
35
|
|
|
36
|
+
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); }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
36
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); }
|
|
37
41
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
onChange
|
|
58
|
-
}
|
|
59
|
-
} = this.props;
|
|
60
|
-
onChange && onChange(e);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
this.handleClick = this.handleClick.bind(this);
|
|
64
|
-
this.handleSelectTheme = this.handleSelectTheme.bind(this);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
render() {
|
|
42
|
+
const Progression = (props, legacyContext) => {
|
|
43
|
+
const {
|
|
44
|
+
mainTitle,
|
|
45
|
+
mainSubtitle,
|
|
46
|
+
recommendation = {},
|
|
47
|
+
progressions = [],
|
|
48
|
+
adaptiveAriaLabel,
|
|
49
|
+
total,
|
|
50
|
+
engines = [],
|
|
51
|
+
themeFilter = {},
|
|
52
|
+
loading
|
|
53
|
+
} = props;
|
|
54
|
+
const skin = (0, _provider.GetSkinFromContext)(legacyContext);
|
|
55
|
+
const {
|
|
56
|
+
onChange: themeFilterOnChange
|
|
57
|
+
} = themeFilter;
|
|
58
|
+
const handleClick = (0, _react.useCallback)(e => {
|
|
59
|
+
e.stopPropagation();
|
|
60
|
+
e.preventDefault();
|
|
68
61
|
const {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
total: total
|
|
137
|
-
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
-
className: _style.default.wrapperProgression,
|
|
139
|
-
"data-name": "activityList"
|
|
140
|
-
}, coreProgression, loader));
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
}
|
|
62
|
+
onClick
|
|
63
|
+
} = recommendation;
|
|
64
|
+
onClick && onClick(e);
|
|
65
|
+
}, [recommendation]);
|
|
66
|
+
const handleSelectTheme = (0, _react.useCallback)(e => {
|
|
67
|
+
themeFilterOnChange && themeFilterOnChange(e);
|
|
68
|
+
}, [themeFilterOnChange]);
|
|
69
|
+
const primary = (0, _get.default)('common.primary', skin);
|
|
70
|
+
const loader = loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
+
className: _style.default.loader
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_loader.default, null)) : null;
|
|
73
|
+
const allProgressions = progressions.map(progression => /*#__PURE__*/_react.default.createElement(_progressionItem.default, _extends({}, (0, _omit.default)(['ref'], progression), {
|
|
74
|
+
key: progression.ref,
|
|
75
|
+
adaptiveAriaLabel: adaptiveAriaLabel
|
|
76
|
+
})));
|
|
77
|
+
|
|
78
|
+
const coreProgression = /*#__PURE__*/_react.default.createElement("div", {
|
|
79
|
+
"data-name": "activityCore",
|
|
80
|
+
className: _style.default.core
|
|
81
|
+
}, allProgressions);
|
|
82
|
+
|
|
83
|
+
const themeSelect = !(0, _isEmpty.default)(themeFilter.options) ? /*#__PURE__*/_react.default.createElement(_select.default, {
|
|
84
|
+
borderClassName: _style.default.selectBorder,
|
|
85
|
+
className: _style.default.select,
|
|
86
|
+
theme: "thematiques",
|
|
87
|
+
options: themeFilter.options,
|
|
88
|
+
onChange: handleSelectTheme
|
|
89
|
+
}) : null;
|
|
90
|
+
const recommendationSection = !(0, _isEmpty.default)(recommendation) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
91
|
+
className: _style.default.recommendationWrapper
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
93
|
+
className: _style.default.recommendationSection
|
|
94
|
+
}, recommendation.title, " "), /*#__PURE__*/_react.default.createElement("p", {
|
|
95
|
+
className: _style.default.recommendationSection
|
|
96
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, recommendation.subtitle, " "), /*#__PURE__*/_react.default.createElement("span", {
|
|
97
|
+
className: (0, _classnames.default)(_style.default.course, _style.default.innerHTML) // eslint-disable-next-line react/no-danger
|
|
98
|
+
,
|
|
99
|
+
dangerouslySetInnerHTML: {
|
|
100
|
+
__html: recommendation.courseTitle
|
|
101
|
+
}
|
|
102
|
+
})), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
103
|
+
type: "link",
|
|
104
|
+
onClick: handleClick,
|
|
105
|
+
submitValue: recommendation.cta,
|
|
106
|
+
style: {
|
|
107
|
+
backgroundColor: primary
|
|
108
|
+
},
|
|
109
|
+
className: _style.default.cta
|
|
110
|
+
})) : null;
|
|
111
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
112
|
+
className: _style.default.default
|
|
113
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
114
|
+
"data-name": "activity-header"
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
116
|
+
className: _style.default.mainTitle
|
|
117
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, mainTitle), " ", mainSubtitle), /*#__PURE__*/_react.default.createElement("div", {
|
|
118
|
+
className: _style.default.headerProgression
|
|
119
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
120
|
+
className: _style.default.wrapperCta
|
|
121
|
+
}, themeSelect, recommendationSection), /*#__PURE__*/_react.default.createElement(_starsSummary.default, {
|
|
122
|
+
engines: engines,
|
|
123
|
+
total: total
|
|
124
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
+
className: _style.default.wrapperProgression,
|
|
126
|
+
"data-name": "activityList"
|
|
127
|
+
}, coreProgression, loader));
|
|
128
|
+
};
|
|
144
129
|
|
|
145
130
|
Progression.contextTypes = {
|
|
146
131
|
skin: _provider.default.childContextTypes.skin
|