@coorpacademy/components 11.32.11 → 11.32.12-alpha.0

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.
Files changed (90) hide show
  1. package/es/atom/select/index.d.ts.map +1 -1
  2. package/es/atom/select/index.js +2 -1
  3. package/es/atom/select/index.js.map +1 -1
  4. package/es/atom/select/style.css +28 -0
  5. package/es/molecule/cm-popin/types.d.ts +1 -0
  6. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  7. package/es/organism/cards-grid/index.d.ts +1 -0
  8. package/es/organism/cards-grid/index.js +6 -1
  9. package/es/organism/cards-grid/index.js.map +1 -1
  10. package/es/organism/cards-grid/style.css +0 -1
  11. package/es/template/app-player/loading/index.d.ts +1 -0
  12. package/es/template/app-player/player/index.d.ts +2 -0
  13. package/es/template/app-player/player/slides/index.d.ts +1 -0
  14. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  15. package/es/template/app-player/popin-correction/index.d.ts +1 -0
  16. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  17. package/es/template/app-player/popin-end/index.d.ts +1 -0
  18. package/es/template/app-review/index.d.ts +1 -0
  19. package/es/template/app-review/index.d.ts.map +1 -1
  20. package/es/template/app-review/player/prop-types.d.ts +1 -0
  21. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  22. package/es/template/app-review/prop-types.d.ts +1 -0
  23. package/es/template/app-review/prop-types.d.ts.map +1 -1
  24. package/es/template/back-office/brand-update/index.d.ts +1 -0
  25. package/es/template/common/authors/index.d.ts +1 -0
  26. package/es/template/common/authors/index.d.ts.map +1 -1
  27. package/es/template/common/dashboard/index.d.ts +2 -0
  28. package/es/template/common/search-page/index.d.ts +2 -0
  29. package/es/template/external-course/index.d.ts +1 -0
  30. package/es/template/skill-detail/all-courses.css +89 -0
  31. package/es/template/skill-detail/all-courses.d.ts +77 -0
  32. package/es/template/skill-detail/all-courses.d.ts.map +1 -0
  33. package/es/template/skill-detail/all-courses.js +168 -0
  34. package/es/template/skill-detail/all-courses.js.map +1 -0
  35. package/es/template/skill-detail/continue-learning.css +21 -0
  36. package/es/template/skill-detail/continue-learning.d.ts +37 -0
  37. package/es/template/skill-detail/continue-learning.d.ts.map +1 -0
  38. package/es/template/skill-detail/continue-learning.js +40 -0
  39. package/es/template/skill-detail/continue-learning.js.map +1 -0
  40. package/es/template/skill-detail/index.d.ts +95 -0
  41. package/es/template/skill-detail/index.d.ts.map +1 -0
  42. package/es/template/skill-detail/index.js +219 -0
  43. package/es/template/skill-detail/index.js.map +1 -0
  44. package/es/template/skill-detail/style.css +163 -0
  45. package/lib/atom/select/index.d.ts.map +1 -1
  46. package/lib/atom/select/index.js +2 -1
  47. package/lib/atom/select/index.js.map +1 -1
  48. package/lib/atom/select/style.css +28 -0
  49. package/lib/molecule/cm-popin/types.d.ts +1 -0
  50. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  51. package/lib/organism/cards-grid/index.d.ts +1 -0
  52. package/lib/organism/cards-grid/index.js +6 -1
  53. package/lib/organism/cards-grid/index.js.map +1 -1
  54. package/lib/organism/cards-grid/style.css +0 -1
  55. package/lib/template/app-player/loading/index.d.ts +1 -0
  56. package/lib/template/app-player/player/index.d.ts +2 -0
  57. package/lib/template/app-player/player/slides/index.d.ts +1 -0
  58. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  59. package/lib/template/app-player/popin-correction/index.d.ts +1 -0
  60. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  61. package/lib/template/app-player/popin-end/index.d.ts +1 -0
  62. package/lib/template/app-review/index.d.ts +1 -0
  63. package/lib/template/app-review/index.d.ts.map +1 -1
  64. package/lib/template/app-review/player/prop-types.d.ts +1 -0
  65. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  66. package/lib/template/app-review/prop-types.d.ts +1 -0
  67. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  68. package/lib/template/back-office/brand-update/index.d.ts +1 -0
  69. package/lib/template/common/authors/index.d.ts +1 -0
  70. package/lib/template/common/authors/index.d.ts.map +1 -1
  71. package/lib/template/common/dashboard/index.d.ts +2 -0
  72. package/lib/template/common/search-page/index.d.ts +2 -0
  73. package/lib/template/external-course/index.d.ts +1 -0
  74. package/lib/template/skill-detail/all-courses.css +89 -0
  75. package/lib/template/skill-detail/all-courses.d.ts +77 -0
  76. package/lib/template/skill-detail/all-courses.d.ts.map +1 -0
  77. package/lib/template/skill-detail/all-courses.js +187 -0
  78. package/lib/template/skill-detail/all-courses.js.map +1 -0
  79. package/lib/template/skill-detail/continue-learning.css +21 -0
  80. package/lib/template/skill-detail/continue-learning.d.ts +37 -0
  81. package/lib/template/skill-detail/continue-learning.d.ts.map +1 -0
  82. package/lib/template/skill-detail/continue-learning.js +52 -0
  83. package/lib/template/skill-detail/continue-learning.js.map +1 -0
  84. package/lib/template/skill-detail/index.d.ts +95 -0
  85. package/lib/template/skill-detail/index.d.ts.map +1 -0
  86. package/lib/template/skill-detail/index.js +241 -0
  87. package/lib/template/skill-detail/index.js.map +1 -0
  88. package/lib/template/skill-detail/style.css +163 -0
  89. package/locales/en/global.json +7 -0
  90. package/package.json +2 -2
@@ -0,0 +1,168 @@
1
+ import _get from "lodash/fp/get";
2
+
3
+ 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); }
4
+
5
+ import React, { useState, useCallback } from 'react';
6
+ import PropTypes from 'prop-types';
7
+ import Provider from '../../atom/provider';
8
+ import Select, { SelectOptionPropTypes } from '../../atom/select';
9
+ import ButtonLink from '../../atom/button-link';
10
+ import SearchForm from '../../molecule/search-form';
11
+ import CardsGrid from '../../organism/cards-grid';
12
+ import searchValueIncluded from '../../util/search-value-included';
13
+ import InputSwitch from '../../atom/input-switch';
14
+ import style from './all-courses.css';
15
+
16
+ const FilterButton = (props, context) => {
17
+ const {
18
+ selected,
19
+ filter,
20
+ onClick
21
+ } = props;
22
+ const {
23
+ skin
24
+ } = context;
25
+
26
+ const primarySkinColor = _get('common.primary', skin);
27
+
28
+ const buttonProps = {
29
+ customStyle: {
30
+ backgroundColor: selected ? primarySkinColor : '#E1E1E3',
31
+ color: selected ? '#FFFFFF' : '#515161',
32
+ transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',
33
+ width: 'fit-content'
34
+ },
35
+ label: filter,
36
+ onClick,
37
+ 'data-name': 'filter-type-course-button'
38
+ };
39
+ return /*#__PURE__*/React.createElement(ButtonLink, buttonProps);
40
+ };
41
+
42
+ FilterButton.contextTypes = {
43
+ skin: Provider.childContextTypes.skin,
44
+ translate: Provider.childContextTypes.translate
45
+ };
46
+ FilterButton.propTypes = process.env.NODE_ENV !== "production" ? {
47
+ selected: PropTypes.bool,
48
+ filter: PropTypes.string,
49
+ onClick: PropTypes.func
50
+ } : {};
51
+
52
+ const AllCourses = (props, context) => {
53
+ const {
54
+ skillIncludedCourses,
55
+ filters,
56
+ sorting
57
+ } = props;
58
+ const {
59
+ options,
60
+ onChange
61
+ } = filters;
62
+ const {
63
+ list
64
+ } = skillIncludedCourses;
65
+ const {
66
+ translate
67
+ } = context;
68
+ const [showCompleted, setShowCompleted] = useState(true);
69
+ const [searchValue, setSearchValue] = useState('');
70
+ const [searchResults, setSearchResults] = useState(list.sort((a, b) => {
71
+ const progressA = a.progress ?? 0;
72
+ const progressB = b.progress ?? 0;
73
+ return progressB - progressA;
74
+ }));
75
+ const sortView = sorting !== undefined ? /*#__PURE__*/React.createElement("div", {
76
+ "data-name": "choice"
77
+ }, /*#__PURE__*/React.createElement(Select, _extends({}, sorting, {
78
+ "aria-label": "All courses sort"
79
+ }))) : null;
80
+ const handleSearch = useCallback(value => {
81
+ setSearchValue(value);
82
+ setSearchResults(list.filter(skill => searchValueIncluded(skill.title, value)));
83
+ }, [list, setSearchValue, setSearchResults]);
84
+ const handleSearchReset = useCallback(() => {
85
+ setSearchValue('');
86
+ setSearchResults(list);
87
+ }, [list, setSearchValue, setSearchResults]);
88
+ const handleShowCompletedToggle = useCallback(() => {
89
+ const tempShowCompleted = !showCompleted;
90
+ setShowCompleted(tempShowCompleted);
91
+
92
+ if (tempShowCompleted) {
93
+ setSearchResults(list);
94
+ handleSearchReset();
95
+ } else {
96
+ setSearchResults(searchResults.filter(skill => skill.progress === 0));
97
+ }
98
+ }, [searchResults, showCompleted, setShowCompleted]);
99
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
100
+ className: style.continueLearningWrapper
101
+ }, /*#__PURE__*/React.createElement("span", {
102
+ className: style.continueLearningTitle
103
+ }, translate('all_courses')), /*#__PURE__*/React.createElement("span", {
104
+ className: style.continueLearningNumber
105
+ }, skillIncludedCourses.list.length)), /*#__PURE__*/React.createElement("div", {
106
+ className: style.searchAndSortSection
107
+ }, /*#__PURE__*/React.createElement("div", {
108
+ className: style.searchWrapper
109
+ }, /*#__PURE__*/React.createElement(SearchForm, {
110
+ search: {
111
+ placeholder: translate('search_place_holder'),
112
+ value: searchValue,
113
+ onChange: handleSearch
114
+ },
115
+ onReset: handleSearchReset
116
+ })), /*#__PURE__*/React.createElement("div", {
117
+ className: style.sortSection
118
+ }, /*#__PURE__*/React.createElement(InputSwitch, {
119
+ type: "switch",
120
+ title: translate('show_completed'),
121
+ value: showCompleted,
122
+ onChange: handleShowCompletedToggle
123
+ }), /*#__PURE__*/React.createElement("div", {
124
+ className: style.sortWrapper
125
+ }, translate('sort_by'), sortView))), /*#__PURE__*/React.createElement("div", {
126
+ className: style.filterWrapper
127
+ }, options.length > 2 ? options.map((filter, index) => {
128
+ const {
129
+ name,
130
+ value,
131
+ selected
132
+ } = filter;
133
+
134
+ function handleChange() {
135
+ onChange(value);
136
+ handleSearchReset();
137
+ }
138
+
139
+ return /*#__PURE__*/React.createElement("div", {
140
+ key: index,
141
+ className: style.filterButtonWrapper
142
+ }, /*#__PURE__*/React.createElement(FilterButton, {
143
+ selected: selected,
144
+ filter: name,
145
+ onClick: handleChange
146
+ }), value === 'ALL' ? /*#__PURE__*/React.createElement("div", {
147
+ className: style.divider
148
+ }) : null);
149
+ }) : null), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardsGrid, {
150
+ list: searchResults,
151
+ justifyContent: "left"
152
+ })));
153
+ };
154
+
155
+ AllCourses.contextTypes = {
156
+ skin: Provider.childContextTypes.skin,
157
+ translate: Provider.childContextTypes.translate
158
+ };
159
+ AllCourses.propTypes = process.env.NODE_ENV !== "production" ? {
160
+ skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),
161
+ filters: PropTypes.shape({
162
+ onChange: PropTypes.func,
163
+ options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))
164
+ }),
165
+ sorting: PropTypes.shape(Select.propTypes)
166
+ } : {};
167
+ export default AllCourses;
168
+ //# sourceMappingURL=all-courses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"all-courses.js","names":["React","useState","useCallback","PropTypes","Provider","Select","SelectOptionPropTypes","ButtonLink","SearchForm","CardsGrid","searchValueIncluded","InputSwitch","style","FilterButton","props","context","selected","filter","onClick","skin","primarySkinColor","buttonProps","customStyle","backgroundColor","color","transition","width","label","contextTypes","childContextTypes","translate","propTypes","bool","string","func","AllCourses","skillIncludedCourses","filters","sorting","options","onChange","list","showCompleted","setShowCompleted","searchValue","setSearchValue","searchResults","setSearchResults","sort","a","b","progressA","progress","progressB","sortView","undefined","handleSearch","value","skill","title","handleSearchReset","handleShowCompletedToggle","tempShowCompleted","continueLearningWrapper","continueLearningTitle","continueLearningNumber","length","searchAndSortSection","searchWrapper","placeholder","sortSection","sortWrapper","filterWrapper","map","index","name","handleChange","filterButtonWrapper","divider","shape","arrayOf"],"sources":["../../../src/template/skill-detail/all-courses.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport SearchForm from '../../molecule/search-form';\nimport CardsGrid from '../../organism/cards-grid';\nimport searchValueIncluded from '../../util/search-value-included';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './all-courses.css';\n\nconst FilterButton = (props, context) => {\n const {selected, filter, onClick} = props;\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const buttonProps = {\n customStyle: {\n backgroundColor: selected ? primarySkinColor : '#E1E1E3',\n color: selected ? '#FFFFFF' : '#515161',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n },\n label: filter,\n onClick,\n 'data-name': 'filter-type-course-button'\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nFilterButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nFilterButton.propTypes = {\n selected: PropTypes.bool,\n filter: PropTypes.string,\n onClick: PropTypes.func\n};\n\nconst AllCourses = (props, context) => {\n const {skillIncludedCourses, filters, sorting} = props;\n const {options, onChange} = filters;\n const {list} = skillIncludedCourses;\n const {translate} = context;\n const [showCompleted, setShowCompleted] = useState(true);\n const [searchValue, setSearchValue] = useState('');\n const [searchResults, setSearchResults] = useState(\n list.sort((a, b) => {\n const progressA = a.progress ?? 0;\n const progressB = b.progress ?? 0;\n return progressB - progressA;\n })\n );\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\">\n <Select {...sorting} aria-label=\"All courses sort\" />\n </div>\n ) : null;\n\n const handleSearch = useCallback(\n value => {\n setSearchValue(value);\n setSearchResults(list.filter(skill => searchValueIncluded(skill.title, value)));\n },\n [list, setSearchValue, setSearchResults]\n );\n\n const handleSearchReset = useCallback(() => {\n setSearchValue('');\n setSearchResults(list);\n }, [list, setSearchValue, setSearchResults]);\n\n const handleShowCompletedToggle = useCallback(() => {\n const tempShowCompleted = !showCompleted;\n setShowCompleted(tempShowCompleted);\n if (tempShowCompleted) {\n setSearchResults(list);\n handleSearchReset();\n } else {\n setSearchResults(searchResults.filter(skill => skill.progress === 0));\n }\n }, [searchResults, showCompleted, setShowCompleted]);\n\n return (\n <>\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('all_courses')}</span>\n <span className={style.continueLearningNumber}>{skillIncludedCourses.list.length}</span>\n </div>\n <div className={style.searchAndSortSection}>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_place_holder'),\n value: searchValue,\n onChange: handleSearch\n }}\n onReset={handleSearchReset}\n />\n </div>\n <div className={style.sortSection}>\n <InputSwitch\n type=\"switch\"\n title={translate('show_completed')}\n value={showCompleted}\n onChange={handleShowCompletedToggle}\n />\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n </div>\n </div>\n <div className={style.filterWrapper}>\n {options.length > 2\n ? options.map((filter, index) => {\n const {name, value, selected} = filter;\n\n function handleChange() {\n onChange(value);\n handleSearchReset();\n }\n return (\n <div key={index} className={style.filterButtonWrapper}>\n <FilterButton selected={selected} filter={name} onClick={handleChange} />\n {value === 'ALL' ? <div className={style.divider} /> : null}\n </div>\n );\n })\n : null}\n </div>\n <div>\n <CardsGrid list={searchResults} justifyContent=\"left\" />\n </div>\n </>\n );\n};\n\nAllCourses.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nAllCourses.propTypes = {\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes)\n};\n\nexport default AllCourses;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,O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;EAFc,CAAhB,CAFY;EAMrBgC,OAAO,EAAEnC,SAAS,CAAC4E,KAAV,CAAgB1E,MAAM,CAAC0B,SAAvB;AANY,CAAvB;AASA,eAAeI,UAAf"}
@@ -0,0 +1,21 @@
1
+ .continueLearningWrapper {
2
+ margin-top: 40px;
3
+ margin-bottom: 16px;
4
+ }
5
+
6
+ .continueLearningTitle {
7
+ font-size: 16px;
8
+ font-weight: 600;
9
+ line-height: 22px;
10
+ }
11
+
12
+ .continueLearningNumber {
13
+ border-radius: 50%;
14
+ background-color: #EAEAEB;
15
+ color: #515161;
16
+ padding: 2px 4px;
17
+ margin-left: 8px;
18
+ font-size: 10px;
19
+ font-weight: 600;
20
+ line-height: 12px;
21
+ }
@@ -0,0 +1,37 @@
1
+ export default ContinueLearning;
2
+ declare function ContinueLearning(props: any, context: any): JSX.Element | null;
3
+ declare namespace ContinueLearning {
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
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
27
+ }
28
+ namespace propTypes {
29
+ const ongoingCourses: PropTypes.Requireable<PropTypes.InferProps<{
30
+ list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
31
+ justifyContent: PropTypes.Requireable<string>;
32
+ loading: PropTypes.Requireable<boolean>;
33
+ }>>;
34
+ }
35
+ }
36
+ import PropTypes from "prop-types";
37
+ //# sourceMappingURL=continue-learning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"continue-learning.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/continue-learning.js"],"names":[],"mappings":";AAMA,gFAmBC"}
@@ -0,0 +1,40 @@
1
+ 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); }
2
+
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import Provider from '../../atom/provider';
6
+ import CardsGrid from '../../organism/cards-grid';
7
+ import style from './continue-learning.css';
8
+
9
+ const ContinueLearning = (props, context) => {
10
+ const {
11
+ ongoingCourses
12
+ } = props;
13
+ const {
14
+ translate
15
+ } = context;
16
+
17
+ if (ongoingCourses.list.length === 0) {
18
+ return null;
19
+ }
20
+
21
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
22
+ className: style.continueLearningWrapper
23
+ }, /*#__PURE__*/React.createElement("span", {
24
+ className: style.continueLearningTitle
25
+ }, translate('continue_learning')), /*#__PURE__*/React.createElement("span", {
26
+ className: style.continueLearningNumber
27
+ }, ongoingCourses.list.length)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardsGrid, _extends({}, ongoingCourses, {
28
+ justifyContent: "left"
29
+ }))));
30
+ };
31
+
32
+ ContinueLearning.contextTypes = {
33
+ skin: Provider.childContextTypes.skin,
34
+ translate: Provider.childContextTypes.translate
35
+ };
36
+ ContinueLearning.propTypes = process.env.NODE_ENV !== "production" ? {
37
+ ongoingCourses: PropTypes.shape(CardsGrid.propTypes)
38
+ } : {};
39
+ export default ContinueLearning;
40
+ //# sourceMappingURL=continue-learning.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"continue-learning.js","names":["React","PropTypes","Provider","CardsGrid","style","ContinueLearning","props","context","ongoingCourses","translate","list","length","continueLearningWrapper","continueLearningTitle","continueLearningNumber","contextTypes","skin","childContextTypes","propTypes","shape"],"sources":["../../../src/template/skill-detail/continue-learning.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Provider from '../../atom/provider';\nimport CardsGrid from '../../organism/cards-grid';\nimport style from './continue-learning.css';\n\nconst ContinueLearning = (props, context) => {\n const {ongoingCourses} = props;\n const {translate} = context;\n\n if (ongoingCourses.list.length === 0) {\n return null;\n }\n\n return (\n <>\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('continue_learning')}</span>\n <span className={style.continueLearningNumber}>{ongoingCourses.list.length}</span>\n </div>\n <div>\n <CardsGrid {...ongoingCourses} justifyContent=\"left\" />\n </div>\n </>\n );\n};\n\nContinueLearning.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearning.propTypes = {\n ongoingCourses: PropTypes.shape(CardsGrid.propTypes)\n};\n\nexport default ContinueLearning;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,SAAP,MAAsB,2BAAtB;AACA,OAAOC,KAAP,MAAkB,yBAAlB;;AAEA,MAAMC,gBAAgB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC3C,MAAM;IAACC;EAAD,IAAmBF,KAAzB;EACA,MAAM;IAACG;EAAD,IAAcF,OAApB;;EAEA,IAAIC,cAAc,CAACE,IAAf,CAAoBC,MAApB,KAA+B,CAAnC,EAAsC;IACpC,OAAO,IAAP;EACD;;EAED,oBACE,uDACE;IAAK,SAAS,EAAEP,KAAK,CAACQ;EAAtB,gBACE;IAAM,SAAS,EAAER,KAAK,CAACS;EAAvB,GAA+CJ,SAAS,CAAC,mBAAD,CAAxD,CADF,eAEE;IAAM,SAAS,EAAEL,KAAK,CAACU;EAAvB,GAAgDN,cAAc,CAACE,IAAf,CAAoBC,MAApE,CAFF,CADF,eAKE,8CACE,oBAAC,SAAD,eAAeH,cAAf;IAA+B,cAAc,EAAC;EAA9C,GADF,CALF,CADF;AAWD,CAnBD;;AAqBAH,gBAAgB,CAACU,YAAjB,GAAgC;EAC9BC,IAAI,EAAEd,QAAQ,CAACe,iBAAT,CAA2BD,IADH;EAE9BP,SAAS,EAAEP,QAAQ,CAACe,iBAAT,CAA2BR;AAFR,CAAhC;AAKAJ,gBAAgB,CAACa,SAAjB,2CAA6B;EAC3BV,cAAc,EAAEP,SAAS,CAACkB,KAAV,CAAgBhB,SAAS,CAACe,SAA1B;AADW,CAA7B;AAIA,eAAeb,gBAAf"}
@@ -0,0 +1,95 @@
1
+ export default SkillDetail;
2
+ declare function SkillDetail(props: any, context: any): JSX.Element;
3
+ declare namespace SkillDetail {
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
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
27
+ }
28
+ namespace propTypes {
29
+ const title: PropTypes.Validator<string>;
30
+ const description: PropTypes.Requireable<string>;
31
+ const metrics: PropTypes.Requireable<PropTypes.InferProps<{
32
+ score: PropTypes.Requireable<number>;
33
+ content: PropTypes.Requireable<number>;
34
+ questionsToReview: PropTypes.Requireable<number>;
35
+ contentCompleted: PropTypes.Requireable<number>;
36
+ }>>;
37
+ const focused: PropTypes.Requireable<boolean>;
38
+ const availableForReview: PropTypes.Requireable<boolean>;
39
+ const ongoingCourses: PropTypes.Requireable<PropTypes.InferProps<{
40
+ list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
41
+ justifyContent: PropTypes.Requireable<string>;
42
+ loading: PropTypes.Requireable<boolean>;
43
+ }>>;
44
+ const skillIncludedCourses: PropTypes.Requireable<PropTypes.InferProps<{
45
+ list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
46
+ justifyContent: PropTypes.Requireable<string>;
47
+ loading: PropTypes.Requireable<boolean>;
48
+ }>>;
49
+ const filters: PropTypes.Requireable<PropTypes.InferProps<{
50
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
51
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
52
+ name: PropTypes.Validator<string>;
53
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
54
+ selected: PropTypes.Requireable<boolean>;
55
+ validOption: PropTypes.Requireable<boolean>;
56
+ }> | null | undefined)[]>;
57
+ }>>;
58
+ const sorting: PropTypes.Requireable<PropTypes.InferProps<{
59
+ title: PropTypes.Requireable<string>;
60
+ name: PropTypes.Requireable<string>;
61
+ className: PropTypes.Requireable<string>;
62
+ borderClassName: PropTypes.Requireable<string>;
63
+ disabled: PropTypes.Requireable<boolean>;
64
+ multiple: PropTypes.Requireable<boolean>;
65
+ description: PropTypes.Requireable<string>;
66
+ required: PropTypes.Requireable<boolean>;
67
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
68
+ theme: PropTypes.Requireable<string>;
69
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
70
+ name: PropTypes.Validator<string>;
71
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
72
+ selected: PropTypes.Requireable<boolean>;
73
+ validOption: PropTypes.Requireable<boolean>;
74
+ }> | null | undefined)[]>;
75
+ optgroups: PropTypes.Requireable<(PropTypes.InferProps<{
76
+ label: PropTypes.Validator<string>;
77
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
78
+ name: PropTypes.Validator<string>;
79
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
80
+ selected: PropTypes.Requireable<boolean>;
81
+ validOption: PropTypes.Requireable<boolean>;
82
+ }> | null | undefined)[]>;
83
+ }> | null | undefined)[]>;
84
+ modified: PropTypes.Requireable<boolean>;
85
+ error: PropTypes.Requireable<boolean>;
86
+ 'aria-label': PropTypes.Requireable<string>;
87
+ 'aria-labelledby': PropTypes.Requireable<string>;
88
+ }>>;
89
+ const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
90
+ const onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
91
+ const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
92
+ }
93
+ }
94
+ import PropTypes from "prop-types";
95
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":";AA2DA,oEAuJC"}
@@ -0,0 +1,219 @@
1
+ import _get from "lodash/fp/get";
2
+ import React, { useCallback, useState } from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import { convert } from 'css-color-function';
5
+ import classnames from 'classnames';
6
+ import Provider from '../../atom/provider';
7
+ import Select, { SelectOptionPropTypes } from '../../atom/select';
8
+ import ButtonLink from '../../atom/button-link';
9
+ import Icon from '../../atom/icon';
10
+ import CardsGrid from '../../organism/cards-grid';
11
+ import style from './style.css';
12
+ import AllCourses from './all-courses';
13
+ import ContinueLearning from './continue-learning';
14
+
15
+ const ContinueLearningButton = (props, context) => {
16
+ const [hovered, setHovered] = useState(false);
17
+ const {
18
+ onClick
19
+ } = props;
20
+ const {
21
+ skin,
22
+ translate
23
+ } = context;
24
+
25
+ const primarySkinColor = _get('common.primary', skin);
26
+
27
+ const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);
28
+ const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);
29
+ return /*#__PURE__*/React.createElement("div", {
30
+ onMouseOver: handleMouseOver,
31
+ onMouseLeave: handleMouseLeave
32
+ }, /*#__PURE__*/React.createElement(ButtonLink, {
33
+ label: translate('continue_learning'),
34
+ type: "primary",
35
+ customStyle: {
36
+ width: 'fit-content',
37
+ borderRadius: '12px',
38
+ backgroundColor: hovered ? convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`) : primarySkinColor
39
+ },
40
+ icon: {
41
+ position: 'left',
42
+ faIcon: {
43
+ name: 'play',
44
+ color: '#FFFFFF',
45
+ size: 16
46
+ }
47
+ },
48
+ onClick: onClick
49
+ }));
50
+ };
51
+
52
+ ContinueLearningButton.contextTypes = {
53
+ skin: Provider.childContextTypes.skin,
54
+ translate: Provider.childContextTypes.translate
55
+ };
56
+ ContinueLearningButton.propTypes = process.env.NODE_ENV !== "production" ? {
57
+ onClick: PropTypes.func
58
+ } : {};
59
+
60
+ const SkillDetail = (props, context) => {
61
+ const {
62
+ title,
63
+ description,
64
+ metrics,
65
+ focused,
66
+ availableForReview,
67
+ ongoingCourses,
68
+ skillIncludedCourses,
69
+ filters,
70
+ sorting,
71
+ onBackClick,
72
+ onReviewClick,
73
+ onContinueLearningClick
74
+ } = props;
75
+ const {
76
+ score,
77
+ content,
78
+ questionsToReview,
79
+ contentCompleted = 0
80
+ } = metrics;
81
+ const {
82
+ translate
83
+ } = context;
84
+ const [showMore, setShowMore] = useState(false);
85
+ const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);
86
+ const Description = useCallback(() => {
87
+ return /*#__PURE__*/React.createElement("div", {
88
+ className: classnames(style.description, !showMore && style.truncate)
89
+ }, description);
90
+ });
91
+ const ProgressBar = useCallback(() => {
92
+ if (score === undefined) return null;
93
+ const progressBarColor = '#3EC483';
94
+ const inlineProgressValueStyle = {
95
+ backgroundColor: progressBarColor,
96
+ width: `${score}%`
97
+ };
98
+ return /*#__PURE__*/React.createElement("div", {
99
+ className: style.progressBarWrapper
100
+ }, /*#__PURE__*/React.createElement("div", {
101
+ "data-name": "progress",
102
+ className: style.progress,
103
+ style: inlineProgressValueStyle,
104
+ role: "progressbar"
105
+ }));
106
+ }, [score]);
107
+ return /*#__PURE__*/React.createElement("div", {
108
+ className: style.backgroundContainer
109
+ }, /*#__PURE__*/React.createElement("div", {
110
+ className: style.container
111
+ }, /*#__PURE__*/React.createElement("div", {
112
+ className: style.backButtonWrapper,
113
+ onClick: onBackClick
114
+ }, /*#__PURE__*/React.createElement(Icon, {
115
+ iconName: "arrow-left",
116
+ size: {
117
+ faSize: 14,
118
+ wrapperSize: 14
119
+ }
120
+ })), /*#__PURE__*/React.createElement("div", {
121
+ className: style.ctaContainer
122
+ }, /*#__PURE__*/React.createElement("div", null, focused ? /*#__PURE__*/React.createElement("div", {
123
+ className: style.skillFocusBadge
124
+ }, /*#__PURE__*/React.createElement(Icon, {
125
+ iconName: "bullseye-arrow",
126
+ backgroundColor: "#DDD1FF",
127
+ size: {
128
+ faSize: 10,
129
+ wrapperSize: 16
130
+ }
131
+ }), translate('skill_focus')) : null, /*#__PURE__*/React.createElement("div", {
132
+ className: style.title
133
+ }, title), description ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Description, null), description.length >= 226 ? /*#__PURE__*/React.createElement("div", {
134
+ className: style.showMoreWrapper,
135
+ onClick: handleShowMore
136
+ }, showMore ? translate('Show less') : translate('Show more'), /*#__PURE__*/React.createElement(Icon, {
137
+ iconName: showMore ? 'chevron-up' : 'chevron-down',
138
+ size: {
139
+ faSize: 14,
140
+ wrapperSize: 16
141
+ }
142
+ })) : null) : null), /*#__PURE__*/React.createElement("div", {
143
+ className: style.ctaWrapper
144
+ }, /*#__PURE__*/React.createElement(ButtonLink, {
145
+ type: "secondary",
146
+ onClick: onReviewClick,
147
+ label: translate('review_this_skill'),
148
+ disabled: !availableForReview,
149
+ customStyle: {
150
+ width: 'fit-content',
151
+ borderRadius: '12px'
152
+ }
153
+ }), /*#__PURE__*/React.createElement(ContinueLearningButton, {
154
+ onClick: onContinueLearningClick
155
+ }))), /*#__PURE__*/React.createElement("div", {
156
+ className: style.progressInformationsWrapper
157
+ }, /*#__PURE__*/React.createElement("div", {
158
+ className: style.progressTitle
159
+ }, translate('your_progress')), /*#__PURE__*/React.createElement("div", {
160
+ className: style.skillCoursesAndQuestionsWrapper
161
+ }, content ? /*#__PURE__*/React.createElement("div", {
162
+ className: style.skillInformation,
163
+ "data-name": "skill-courses"
164
+ }, /*#__PURE__*/React.createElement("span", {
165
+ className: style.skillInformationNumber
166
+ }, content), ' ', translate('courses')) : null, questionsToReview ? /*#__PURE__*/React.createElement("div", {
167
+ className: style.skillInformation,
168
+ "data-name": "skill-questions"
169
+ }, /*#__PURE__*/React.createElement("span", {
170
+ className: style.skillInformationNumber
171
+ }, questionsToReview), "\xA0", translate('questions')) : null), /*#__PURE__*/React.createElement(ProgressBar, null), /*#__PURE__*/React.createElement("div", {
172
+ className: style.progressInformations
173
+ }, content && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
174
+ className: style.progressInformation,
175
+ "data-name": "skill-completed-courses"
176
+ }, /*#__PURE__*/React.createElement("span", {
177
+ className: style.progressInformationNumber
178
+ }, contentCompleted), ` ${translate('courses_completed')}`), /*#__PURE__*/React.createElement("div", {
179
+ className: style.progressInformation,
180
+ "data-name": "completed-percentage"
181
+ }, /*#__PURE__*/React.createElement("span", {
182
+ className: style.progressInformationNumber
183
+ }, score, "%"))))), /*#__PURE__*/React.createElement(ContinueLearning, {
184
+ ongoingCourses: ongoingCourses
185
+ }), /*#__PURE__*/React.createElement(AllCourses, {
186
+ skillIncludedCourses: skillIncludedCourses,
187
+ filters: filters,
188
+ sorting: sorting
189
+ })));
190
+ };
191
+
192
+ SkillDetail.contextTypes = {
193
+ skin: Provider.childContextTypes.skin,
194
+ translate: Provider.childContextTypes.translate
195
+ };
196
+ SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
197
+ title: PropTypes.string.isRequired,
198
+ description: PropTypes.string,
199
+ metrics: PropTypes.shape({
200
+ score: PropTypes.number,
201
+ content: PropTypes.number,
202
+ questionsToReview: PropTypes.number,
203
+ contentCompleted: PropTypes.number
204
+ }),
205
+ focused: PropTypes.bool,
206
+ availableForReview: PropTypes.bool,
207
+ ongoingCourses: PropTypes.shape(CardsGrid.propTypes),
208
+ skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),
209
+ filters: PropTypes.shape({
210
+ onChange: PropTypes.func,
211
+ options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))
212
+ }),
213
+ sorting: PropTypes.shape(Select.propTypes),
214
+ onBackClick: PropTypes.func,
215
+ onReviewClick: PropTypes.func,
216
+ onContinueLearningClick: PropTypes.func
217
+ } : {};
218
+ export default SkillDetail;
219
+ //# sourceMappingURL=index.js.map