@coorpacademy/components 10.3.31 → 10.3.32-alpha.14

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 (57) hide show
  1. package/es/atom/input-switch/test/fixtures.js +10 -0
  2. package/es/atom/input-switch/test/fixtures.js.map +1 -1
  3. package/es/atom/loader/test/fixtures.js +2 -0
  4. package/es/atom/loader/test/fixtures.js.map +1 -1
  5. package/es/molecule/card/customer.css +61 -3
  6. package/es/molecule/card/customer.js +17 -5
  7. package/es/molecule/card/customer.js.map +1 -1
  8. package/es/molecule/card/index.js +25 -12
  9. package/es/molecule/card/index.js.map +1 -1
  10. package/es/molecule/card/style.css +86 -24
  11. package/es/molecule/card/test/fixtures/coorpmanager.js +18 -0
  12. package/es/molecule/card/test/fixtures/coorpmanager.js.map +1 -0
  13. package/es/molecule/card/test/fixtures.js +2 -0
  14. package/es/molecule/card/test/fixtures.js.map +1 -1
  15. package/es/molecule/card-content/index.js +33 -18
  16. package/es/molecule/card-content/index.js.map +1 -1
  17. package/es/molecule/card-content/style.css +56 -0
  18. package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
  19. package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  20. package/es/molecule/search/test/fixtures.js +15 -0
  21. package/es/molecule/search/test/fixtures.js.map +1 -0
  22. package/es/molecule/vertical-tabs/test/fixtures.js +2 -0
  23. package/es/molecule/vertical-tabs/test/fixtures.js.map +1 -1
  24. package/es/organism/course-selection/test/fixtures/default.js +29 -7
  25. package/es/organism/course-selection/test/fixtures/default.js.map +1 -1
  26. package/es/organism/course-selection/test/fixtures.js +2 -0
  27. package/es/organism/course-selection/test/fixtures.js.map +1 -1
  28. package/es/organism/wizard-contents/style.css +1 -1
  29. package/lib/atom/input-switch/test/fixtures.js +15 -0
  30. package/lib/atom/input-switch/test/fixtures.js.map +1 -1
  31. package/lib/atom/loader/test/fixtures.js +3 -0
  32. package/lib/atom/loader/test/fixtures.js.map +1 -1
  33. package/lib/molecule/card/customer.css +61 -3
  34. package/lib/molecule/card/customer.js +22 -6
  35. package/lib/molecule/card/customer.js.map +1 -1
  36. package/lib/molecule/card/index.js +29 -13
  37. package/lib/molecule/card/index.js.map +1 -1
  38. package/lib/molecule/card/style.css +86 -24
  39. package/lib/molecule/card/test/fixtures/coorpmanager.js +28 -0
  40. package/lib/molecule/card/test/fixtures/coorpmanager.js.map +1 -0
  41. package/lib/molecule/card/test/fixtures.js +3 -0
  42. package/lib/molecule/card/test/fixtures.js.map +1 -1
  43. package/lib/molecule/card-content/index.js +36 -19
  44. package/lib/molecule/card-content/index.js.map +1 -1
  45. package/lib/molecule/card-content/style.css +56 -0
  46. package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
  47. package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  48. package/lib/molecule/search/test/fixtures.js +25 -0
  49. package/lib/molecule/search/test/fixtures.js.map +1 -0
  50. package/lib/molecule/vertical-tabs/test/fixtures.js +3 -0
  51. package/lib/molecule/vertical-tabs/test/fixtures.js.map +1 -1
  52. package/lib/organism/course-selection/test/fixtures/default.js +30 -7
  53. package/lib/organism/course-selection/test/fixtures/default.js.map +1 -1
  54. package/lib/organism/course-selection/test/fixtures.js +3 -0
  55. package/lib/organism/course-selection/test/fixtures.js.map +1 -1
  56. package/lib/organism/wizard-contents/style.css +1 -1
  57. package/package.json +2 -2
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = exports.MODES = void 0;
4
+ exports.default = exports.THEMES = exports.MODES = void 0;
5
+
6
+ var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
5
7
 
6
8
  var _isNil2 = _interopRequireDefault(require("lodash/fp/isNil"));
7
9
 
@@ -30,11 +32,17 @@ const MODES = {
30
32
  CARD: 'card'
31
33
  };
32
34
  exports.MODES = MODES;
35
+ const THEMES = {
36
+ default: null,
37
+ coorpmanager: _style2.default.coorpmanager
38
+ };
39
+ exports.THEMES = THEMES;
33
40
 
34
41
  const ContentTypeInfo = ({
35
42
  mode,
36
43
  type,
37
- externalContent
44
+ externalContent,
45
+ theme
38
46
  }, context) => {
39
47
  const {
40
48
  translate
@@ -46,12 +54,11 @@ const ContentTypeInfo = ({
46
54
 
47
55
  if (type === 'chapter') {
48
56
  return /*#__PURE__*/_react.default.createElement("div", {
49
- className: _style2.default.microLearningIcon
57
+ className: (0, _classnames.default)(THEMES[theme], _style2.default.microLearningIcon)
50
58
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyTimer, {
51
- height: 40,
52
- width: 40
59
+ className: _style2.default.timerIcon
53
60
  }), /*#__PURE__*/_react.default.createElement("span", {
54
- className: _style2.default.microLearninglabel
61
+ className: (0, _classnames.default)(THEMES[theme], _style2.default.microLearninglabel)
55
62
  }, "5' learning"));
56
63
  }
57
64
 
@@ -75,16 +82,18 @@ ContentTypeInfo.contextTypes = {
75
82
  ContentTypeInfo.propTypes = process.env.NODE_ENV !== "production" ? {
76
83
  externalContent: _propTypes.default.bool,
77
84
  type: _propTypes.default.string,
78
- mode: _propTypes.default.string
85
+ mode: _propTypes.default.string,
86
+ theme: _propTypes.default.oneOf((0, _keys2.default)(THEMES))
79
87
  } : {};
80
88
 
81
89
  const CardTitle = ({
82
90
  title,
83
91
  empty,
84
- courseContent
92
+ courseContent,
93
+ theme
85
94
  }) => {
86
95
  return /*#__PURE__*/_react.default.createElement("div", {
87
- className: (0, _classnames.default)(_style2.default.title, _style.innerHTML, courseContent ? _style2.default.lightTitle : _style2.default.darkTitle, empty ? _style2.default.empty : null),
96
+ className: (0, _classnames.default)(THEMES[theme], _style2.default.title, _style.innerHTML, courseContent ? _style2.default.lightTitle : _style2.default.darkTitle, empty ? _style2.default.empty : null),
88
97
  "data-name": "title",
89
98
  title: title // eslint-disable-next-line react/no-danger
90
99
  ,
@@ -97,14 +106,16 @@ const CardTitle = ({
97
106
  CardTitle.propTypes = process.env.NODE_ENV !== "production" ? {
98
107
  title: _propTypes.default.string,
99
108
  empty: _propTypes.default.bool,
100
- courseContent: _propTypes.default.bool
109
+ courseContent: _propTypes.default.bool,
110
+ theme: _propTypes.default.oneOf((0, _keys2.default)(THEMES))
101
111
  } : {};
102
112
 
103
113
  const AuthorName = ({
104
114
  author,
105
115
  empty,
106
116
  courseContent,
107
- certifiedAuthor
117
+ certifiedAuthor,
118
+ theme
108
119
  }) => {
109
120
  const checkIcon = certifiedAuthor ? /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidStatusCheckCircle2, {
110
121
  className: (0, _classnames.default)(_style2.default.authorIcon, courseContent ? _style2.default.iconShadow : null),
@@ -113,7 +124,7 @@ const AuthorName = ({
113
124
  return /*#__PURE__*/_react.default.createElement("div", {
114
125
  "data-name": "author",
115
126
  title: author,
116
- className: (0, _classnames.default)(_style2.default.author, courseContent ? _style2.default.lightTitle : _style2.default.darkAuthorTitle, empty ? _style2.default.empty : null)
127
+ className: (0, _classnames.default)(THEMES[theme], _style2.default.author, courseContent ? _style2.default.lightTitle : _style2.default.darkAuthorTitle, empty ? _style2.default.empty : null)
117
128
  }, /*#__PURE__*/_react.default.createElement("span", null, author), checkIcon);
118
129
  };
119
130
 
@@ -121,7 +132,8 @@ AuthorName.propTypes = process.env.NODE_ENV !== "production" ? {
121
132
  author: _propTypes.default.string,
122
133
  empty: _propTypes.default.bool,
123
134
  courseContent: _propTypes.default.bool,
124
- certifiedAuthor: _propTypes.default.bool
135
+ certifiedAuthor: _propTypes.default.bool,
136
+ theme: _propTypes.default.oneOf((0, _keys2.default)(THEMES))
125
137
  } : {};
126
138
 
127
139
  const ContentInfo = ({
@@ -135,7 +147,8 @@ const ContentInfo = ({
135
147
  title,
136
148
  type,
137
149
  badgeCategory,
138
- badgeLabel
150
+ badgeLabel,
151
+ theme = 'default'
139
152
  }) => {
140
153
  const progressBarColor = '#3EC483';
141
154
  const inlineProgressValueStyle = {
@@ -159,11 +172,12 @@ const ContentInfo = ({
159
172
  })) : null;
160
173
  return /*#__PURE__*/_react.default.createElement("div", {
161
174
  "data-name": "info",
162
- className: (0, _classnames.default)(_style2.default.infoWrapper, mode === MODES.HERO ? _style2.default.hero : _style2.default.card, disabled ? _style2.default.progressBarDisabled : null, externalContent ? _style2.default.externalContent : null)
175
+ className: (0, _classnames.default)(THEMES[theme], _style2.default.infoWrapper, mode === MODES.HERO ? _style2.default.hero : _style2.default.card, disabled ? _style2.default.progressBarDisabled : null, externalContent ? _style2.default.externalContent : null)
163
176
  }, /*#__PURE__*/_react.default.createElement(ContentTypeInfo, {
164
177
  mode: mode,
165
178
  type: type,
166
- externalContent: externalContent
179
+ externalContent: externalContent,
180
+ theme: theme
167
181
  }), /*#__PURE__*/_react.default.createElement("div", {
168
182
  className: (0, _classnames.default)(_style2.default.cardInfo, chapterContent ? _style2.default.microLearningCardInfo : null)
169
183
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -174,12 +188,14 @@ const ContentInfo = ({
174
188
  }) : null), /*#__PURE__*/_react.default.createElement(CardTitle, {
175
189
  title: title,
176
190
  empty: empty,
177
- courseContent: courseContent
191
+ courseContent: courseContent,
192
+ theme: theme
178
193
  }), /*#__PURE__*/_react.default.createElement(AuthorName, {
179
194
  author: author,
180
195
  empty: empty,
181
196
  courseContent: courseContent,
182
- certifiedAuthor: certifiedAuthor
197
+ certifiedAuthor: certifiedAuthor,
198
+ theme: theme
183
199
  })), progressBar);
184
200
  };
185
201
 
@@ -197,7 +213,8 @@ ContentInfo.propTypes = process.env.NODE_ENV !== "production" ? {
197
213
  type: _propTypes.default.string,
198
214
  mode: _propTypes.default.string,
199
215
  badgeCategory: _contentBadge.default.propTypes.category,
200
- badgeLabel: _contentBadge.default.propTypes.label
216
+ badgeLabel: _contentBadge.default.propTypes.label,
217
+ theme: _propTypes.default.oneOf((0, _keys2.default)(THEMES))
201
218
  } : {};
202
219
  var _default = ContentInfo;
203
220
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/card-content/index.js"],"names":["MODES","HERO","CARD","ContentTypeInfo","mode","type","externalContent","context","translate","style","microLearningIcon","microLearninglabel","EXTERNAL_CONTENT_ICONS","textColor","color","contentTypeInfo","contextTypes","skin","Provider","childContextTypes","propTypes","PropTypes","bool","string","CardTitle","title","empty","courseContent","innerHTML","lightTitle","darkTitle","__html","AuthorName","author","certifiedAuthor","checkIcon","authorIcon","iconShadow","darkAuthorTitle","ContentInfo","adaptiv","disabled","progress","badgeCategory","badgeLabel","progressBarColor","inlineProgressValueStyle","backgroundColor","width","chapterContent","progressBar","progressWrapper","hideProgressBar","adaptiveIcon","infoWrapper","hero","card","progressBarDisabled","cardInfo","microLearningCardInfo","iconWrapper","number","ContentBadge","category","label"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;;;AAEO,MAAMA,KAAK,GAAG;AACnBC,EAAAA,IAAI,EAAE,MADa;AAEnBC,EAAAA,IAAI,EAAE;AAFa,CAAd;;;AAKP,MAAMC,eAAe,GAAG,CAAC;AAACC,EAAAA,IAAD;AAAOC,EAAAA,IAAP;AAAaC,EAAAA;AAAb,CAAD,EAAgCC,OAAhC,KAA4C;AAClE,QAAM;AAACC,IAAAA;AAAD,MAAcD,OAApB;;AACA,MAAIH,IAAI,KAAKJ,KAAK,CAACE,IAAnB,EAAyB;AACvB,WAAO,IAAP;AACD;;AAED,MAAIG,IAAI,KAAK,SAAb,EAAwB;AACtB,wBACE;AAAK,MAAA,SAAS,EAAEI,gBAAMC;AAAtB,oBACE,6BAAC,2CAAD;AAAW,MAAA,MAAM,EAAE,EAAnB;AAAuB,MAAA,KAAK,EAAE;AAA9B,MADF,eAEE;AAAM,MAAA,SAAS,EAAED,gBAAME;AAAvB,OAA4C,aAA5C,CAFF,CADF;AAMD;;AACD,MAAIL,eAAe,IAAIM,wCAAuBP,IAAvB,CAAvB,EAAqD;AACnD,UAAMQ,SAAS,GAAGD,wCAAuBP,IAAvB,EAA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AAUC,IALK;AAMtBoB,EAAAA,QAAQ,EAAErB,mBAAUwC,MANE;AAOtBpC,EAAAA,KAAK,EAAEJ,mBAAUE,MAPK;AAQtBlB,EAAAA,IAAI,EAAEgB,mBAAUE,MARM;AAStBnB,EAAAA,IAAI,EAAEiB,mBAAUE,MATM;AAUtBoB,EAAAA,aAAa,EAAEmB,sBAAa1C,SAAb,CAAuB2C,QAVhB;AAWtBnB,EAAAA,UAAU,EAAEkB,sBAAa1C,SAAb,CAAuB4C;AAXb,CAAxB;eAcezB,W","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isNil} from 'lodash/fp';\nimport {\n NovaCompositionCoorpacademyAdaptive as AdaptivIcon,\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport ContentBadge from '../../atom/content-badge';\nimport {innerHTML} from '../../atom/label/style.css';\nimport style from './style.css';\n\nexport const MODES = {\n HERO: 'hero',\n CARD: 'card'\n};\n\nconst ContentTypeInfo = ({mode, type, externalContent}, context) => {\n const {translate} = context;\n if (mode !== MODES.CARD) {\n return null;\n }\n\n if (type === 'chapter') {\n return (\n <div className={style.microLearningIcon}>\n <TimerIcon height={40} width={40} />\n <span className={style.microLearninglabel}>{\"5' learning\"}</span>\n </div>\n );\n }\n if (externalContent && EXTERNAL_CONTENT_ICONS[type]) {\n const textColor = EXTERNAL_CONTENT_ICONS[type].color;\n\n return (\n <div className={style.contentTypeInfo} style={{color: textColor}}>\n {type === 'scorm' ? translate('external_content_scorm') : ''}\n {type === 'video' ? translate('external_content_video') : ''}\n {type === 'article' ? translate('external_content_article') : ''}\n {type === 'podcast' ? translate('external_content_podcast') : ''}\n </div>\n );\n }\n\n return null;\n};\n\nContentTypeInfo.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContentTypeInfo.propTypes = {\n externalContent: PropTypes.bool,\n type: PropTypes.string,\n mode: PropTypes.string\n};\n\nconst CardTitle = ({title, empty, courseContent}) => {\n return (\n <div\n className={classnames(\n style.title,\n innerHTML,\n courseContent ? style.lightTitle : style.darkTitle,\n empty ? style.empty : null\n )}\n data-name=\"title\"\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n );\n};\n\nCardTitle.propTypes = {\n title: PropTypes.string,\n empty: PropTypes.bool,\n courseContent: PropTypes.bool\n};\n\nconst AuthorName = ({author, empty, courseContent, certifiedAuthor}) => {\n const checkIcon = certifiedAuthor ? (\n <CheckIcon\n className={classnames(style.authorIcon, courseContent ? style.iconShadow : null)}\n color=\"inherit\"\n />\n ) : null;\n\n return (\n <div\n data-name=\"author\"\n title={author}\n className={classnames(\n style.author,\n courseContent ? style.lightTitle : style.darkAuthorTitle,\n empty ? style.empty : null\n )}\n >\n <span>{author}</span>\n {checkIcon}\n </div>\n );\n};\n\nAuthorName.propTypes = {\n author: PropTypes.string,\n empty: PropTypes.bool,\n courseContent: PropTypes.bool,\n certifiedAuthor: PropTypes.bool\n};\n\nconst ContentInfo = ({\n adaptiv,\n author,\n certifiedAuthor = false,\n disabled = false,\n empty = false,\n mode = MODES.CARD,\n progress,\n title,\n type,\n badgeCategory,\n badgeLabel\n}) => {\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${progress * 100}%`\n };\n const externalContent = isExternalContent(type);\n const courseContent = type === 'course';\n const chapterContent = type === 'chapter';\n\n const progressBar =\n mode === MODES.HERO || (!empty && !disabled) ? (\n <div className={!isNil(progress) ? style.progressWrapper : style.hideProgressBar}>\n {!disabled ? (\n <div data-name=\"progress\" className={style.progress} style={inlineProgressValueStyle} />\n ) : null}\n </div>\n ) : null;\n\n const adaptiveIcon = adaptiv ? (\n <div className={classnames(style.adaptiveIcon, courseContent ? style.iconShadow : null)}>\n <AdaptivIcon height={25} />\n </div>\n ) : null;\n\n return (\n <div\n data-name=\"info\"\n className={classnames(\n style.infoWrapper,\n mode === MODES.HERO ? style.hero : style.card,\n disabled ? style.progressBarDisabled : null,\n externalContent ? style.externalContent : null\n )}\n >\n <ContentTypeInfo mode={mode} type={type} externalContent={externalContent} />\n <div\n className={classnames(style.cardInfo, chapterContent ? style.microLearningCardInfo : null)}\n >\n <div className={style.iconWrapper}>\n {adaptiveIcon}\n {!empty && badgeLabel && badgeCategory && courseContent ? (\n <ContentBadge category={badgeCategory} label={badgeLabel} />\n ) : null}\n </div>\n <CardTitle title={title} empty={empty} courseContent={courseContent} />\n <AuthorName\n author={author}\n empty={empty}\n courseContent={courseContent}\n certifiedAuthor={certifiedAuthor}\n />\n </div>\n {progressBar}\n </div>\n );\n};\n\nContentInfo.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nContentInfo.propTypes = {\n adaptiv: PropTypes.bool,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n disabled: PropTypes.bool,\n empty: PropTypes.bool,\n progress: PropTypes.number,\n title: PropTypes.string,\n type: PropTypes.string,\n mode: PropTypes.string,\n badgeCategory: ContentBadge.propTypes.category,\n badgeLabel: ContentBadge.propTypes.label\n};\n\nexport default ContentInfo;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/card-content/index.js"],"names":["MODES","HERO","CARD","THEMES","default","coorpmanager","style","ContentTypeInfo","mode","type","externalContent","theme","context","translate","microLearningIcon","timerIcon","microLearninglabel","EXTERNAL_CONTENT_ICONS","textColor","color","contentTypeInfo","contextTypes","skin","Provider","childContextTypes","propTypes","PropTypes","bool","string","oneOf","CardTitle","title","empty","courseContent","innerHTML","lightTitle","darkTitle","__html","AuthorName","author","certifiedAuthor","checkIcon","authorIcon","iconShadow","darkAuthorTitle","ContentInfo","adaptiv","disabled","progress","badgeCategory","badgeLabel","progressBarColor","inlineProgressValueStyle","backgroundColor","width","chapterContent","progressBar","progressWrapper","hideProgressBar","adaptiveIcon","infoWrapper","hero","card","progressBarDisabled","cardInfo","microLearningCardInfo","iconWrapper","number","ContentBadge","category","label"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;;;AAEO,MAAMA,KAAK,GAAG;AACnBC,EAAAA,IAAI,EAAE,MADa;AAEnBC,EAAAA,IAAI,EAAE;AAFa,CAAd;;AAKA,MAAMC,MAAM,GAAG;AACpBC,EAAAA,OAAO,EAAE,IADW;AAEpBC,EAAAA,YAAY,EAAEC,gBAAMD;AAFA,CAAf;;;AAKP,MAAME,eAAe,GAAG,CAAC;AAACC,EAAAA,IAAD;AAAOC,EAAAA,IAAP;AAAaC,EAAAA,eAAb;AAA8BC,EAAAA;AAA9B,CAAD,EAAuCC,OAAvC,KAAmD;AACzE,QAAM;AAACC,IAAAA;AAAD,MAAcD,OAApB;;AACA,MAAIJ,IAAI,KAAKR,KAAK,CAACE,IAAnB,EAAyB;AACvB,WAAO,IAAP;AACD;;AAED,MAAIO,IAAI,KAAK,SAAb,EAAwB;AACtB,wBACE;AAAK,MAAA,SAAS,EAAE,yBAAWN,MAAM,CAACQ,KAAD,CAAjB,EAA0BL,gBAAMQ,iBAAhC;AAAhB,oBACE,6BAAC,2CAAD;AAAW,MAAA,SAAS,EAAER,gBAAMS;AAA5B,MADF,eAEE;AAAM,MAAA,SAAS,EAAE,yBAAWZ,MAAM,CAACQ,KAAD,CAAjB,EAA0BL,gBAAMU,kBAAhC;AAAjB,OAAuE,aAAvE,CAFF,CADF;AAMD;;AACD,MAAIN,eAAe,IAAIO,wCAAuBR,IAAvB,CAAvB,EAAqD;AACnD,UAAMS,SAAS,GAAGD,wCAAuBR,IAAvB,EAA6BU,KAA/C;AAEA,wBACE;AAAK,MAAA,SAAS,EAAEb,gBAAMc,eAAtB;AAAuC,MAAA,KAAK,EAAE;AAACD,QAAAA,KAAK,EAAED;AAAR;AAA9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,EAAE7B;AALT,IAVF,CAXF,EA6BG6C,WA7BH,CADF;AAiCD,CAvED;;AAyEAX,WAAW,CAACxB,YAAZ,GAA2B;AACzBC,EAAAA,IAAI,EAAEC,kBAASC,iBAAT,CAA2BF;AADR,CAA3B;AAIAuB,WAAW,CAACpB,SAAZ,2CAAwB;AACtBqB,EAAAA,OAAO,EAAEpB,mBAAUC,IADG;AAEtBY,EAAAA,MAAM,EAAEb,mBAAUE,MAFI;AAGtBY,EAAAA,eAAe,EAAEd,mBAAUC,IAHL;AAItBoB,EAAAA,QAAQ,EAAErB,mBAAUC,IAJE;AAKtBK,EAAAA,KAAK,EAAEN,mBAAUC,IALK;AAMtBqB,EAAAA,QAAQ,EAAEtB,mBAAUyC,MANE;AAOtBpC,EAAAA,KAAK,EAAEL,mBAAUE,MAPK;AAQtBnB,EAAAA,IAAI,EAAEiB,mBAAUE,MARM;AAStBpB,EAAAA,IAAI,EAAEkB,mBAAUE,MATM;AAUtBqB,EAAAA,aAAa,EAAEmB,sBAAa3C,SAAb,CAAuB4C,QAVhB;AAWtBnB,EAAAA,UAAU,EAAEkB,sBAAa3C,SAAb,CAAuB6C,KAXb;AAYtB3D,EAAAA,KAAK,EAAEe,mBAAUG,KAAV,CAAgB,oBAAK1B,MAAL,CAAhB;AAZe,CAAxB;eAee0C,W","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isNil, keys} from 'lodash/fp';\nimport {\n NovaCompositionCoorpacademyAdaptive as AdaptivIcon,\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport ContentBadge from '../../atom/content-badge';\nimport {innerHTML} from '../../atom/label/style.css';\nimport style from './style.css';\n\nexport const MODES = {\n HERO: 'hero',\n CARD: 'card'\n};\n\nexport const THEMES = {\n default: null,\n coorpmanager: style.coorpmanager\n};\n\nconst ContentTypeInfo = ({mode, type, externalContent, theme}, context) => {\n const {translate} = context;\n if (mode !== MODES.CARD) {\n return null;\n }\n\n if (type === 'chapter') {\n return (\n <div className={classnames(THEMES[theme], style.microLearningIcon)}>\n <TimerIcon className={style.timerIcon} />\n <span className={classnames(THEMES[theme], style.microLearninglabel)}>{\"5' learning\"}</span>\n </div>\n );\n }\n if (externalContent && EXTERNAL_CONTENT_ICONS[type]) {\n const textColor = EXTERNAL_CONTENT_ICONS[type].color;\n\n return (\n <div className={style.contentTypeInfo} style={{color: textColor}}>\n {type === 'scorm' ? translate('external_content_scorm') : ''}\n {type === 'video' ? translate('external_content_video') : ''}\n {type === 'article' ? translate('external_content_article') : ''}\n {type === 'podcast' ? translate('external_content_podcast') : ''}\n </div>\n );\n }\n\n return null;\n};\n\nContentTypeInfo.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContentTypeInfo.propTypes = {\n externalContent: PropTypes.bool,\n type: PropTypes.string,\n mode: PropTypes.string,\n theme: PropTypes.oneOf(keys(THEMES))\n};\n\nconst CardTitle = ({title, empty, courseContent, theme}) => {\n return (\n <div\n className={classnames(\n THEMES[theme],\n style.title,\n innerHTML,\n courseContent ? style.lightTitle : style.darkTitle,\n empty ? style.empty : null\n )}\n data-name=\"title\"\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n );\n};\n\nCardTitle.propTypes = {\n title: PropTypes.string,\n empty: PropTypes.bool,\n courseContent: PropTypes.bool,\n theme: PropTypes.oneOf(keys(THEMES))\n};\n\nconst AuthorName = ({author, empty, courseContent, certifiedAuthor, theme}) => {\n const checkIcon = certifiedAuthor ? (\n <CheckIcon\n className={classnames(style.authorIcon, courseContent ? style.iconShadow : null)}\n color=\"inherit\"\n />\n ) : null;\n\n return (\n <div\n data-name=\"author\"\n title={author}\n className={classnames(\n THEMES[theme],\n style.author,\n courseContent ? style.lightTitle : style.darkAuthorTitle,\n empty ? style.empty : null\n )}\n >\n <span>{author}</span>\n {checkIcon}\n </div>\n );\n};\n\nAuthorName.propTypes = {\n author: PropTypes.string,\n empty: PropTypes.bool,\n courseContent: PropTypes.bool,\n certifiedAuthor: PropTypes.bool,\n theme: PropTypes.oneOf(keys(THEMES))\n};\n\nconst ContentInfo = ({\n adaptiv,\n author,\n certifiedAuthor = false,\n disabled = false,\n empty = false,\n mode = MODES.CARD,\n progress,\n title,\n type,\n badgeCategory,\n badgeLabel,\n theme = 'default'\n}) => {\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${progress * 100}%`\n };\n const externalContent = isExternalContent(type);\n const courseContent = type === 'course';\n const chapterContent = type === 'chapter';\n\n const progressBar =\n mode === MODES.HERO || (!empty && !disabled) ? (\n <div className={!isNil(progress) ? style.progressWrapper : style.hideProgressBar}>\n {!disabled ? (\n <div data-name=\"progress\" className={style.progress} style={inlineProgressValueStyle} />\n ) : null}\n </div>\n ) : null;\n\n const adaptiveIcon = adaptiv ? (\n <div className={classnames(style.adaptiveIcon, courseContent ? style.iconShadow : null)}>\n <AdaptivIcon height={25} />\n </div>\n ) : null;\n\n return (\n <div\n data-name=\"info\"\n className={classnames(\n THEMES[theme],\n style.infoWrapper,\n mode === MODES.HERO ? style.hero : style.card,\n disabled ? style.progressBarDisabled : null,\n externalContent ? style.externalContent : null\n )}\n >\n <ContentTypeInfo mode={mode} type={type} externalContent={externalContent} theme={theme} />\n <div\n className={classnames(style.cardInfo, chapterContent ? style.microLearningCardInfo : null)}\n >\n <div className={style.iconWrapper}>\n {adaptiveIcon}\n {!empty && badgeLabel && badgeCategory && courseContent ? (\n <ContentBadge category={badgeCategory} label={badgeLabel} />\n ) : null}\n </div>\n <CardTitle title={title} empty={empty} courseContent={courseContent} theme={theme} />\n <AuthorName\n author={author}\n empty={empty}\n courseContent={courseContent}\n certifiedAuthor={certifiedAuthor}\n theme={theme}\n />\n </div>\n {progressBar}\n </div>\n );\n};\n\nContentInfo.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nContentInfo.propTypes = {\n adaptiv: PropTypes.bool,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n disabled: PropTypes.bool,\n empty: PropTypes.bool,\n progress: PropTypes.number,\n title: PropTypes.string,\n type: PropTypes.string,\n mode: PropTypes.string,\n badgeCategory: ContentBadge.propTypes.category,\n badgeLabel: ContentBadge.propTypes.label,\n theme: PropTypes.oneOf(keys(THEMES))\n};\n\nexport default ContentInfo;\n"],"file":"index.js"}
@@ -21,6 +21,23 @@
21
21
  margin-top: 53px;
22
22
  }
23
23
 
24
+ .coorpmanager .microLearningIcon {
25
+ display: flex;
26
+ flex-direction: column;
27
+ align-self: center;
28
+ margin-top: 35px;
29
+ }
30
+
31
+ .timerIcon {
32
+ height: 40px;
33
+ width: 40px;
34
+ }
35
+
36
+ .coorpmanager .timerIcon {
37
+ height: 30px;
38
+ width: 30px;
39
+ }
40
+
24
41
  .microLearningIcon svg {
25
42
  background:white;
26
43
  border-radius: 50%;
@@ -38,6 +55,10 @@
38
55
  text-transform: uppercase;
39
56
  }
40
57
 
58
+ .coorpmanager.microLearninglabel {
59
+ font-size: 6px;
60
+ }
61
+
41
62
  .infoWrapper {
42
63
  display: flex;
43
64
  flex-direction: column;
@@ -58,6 +79,11 @@
58
79
  user-select: none;
59
80
  }
60
81
 
82
+ .coorpmanager.title {
83
+ font-size: 12px;
84
+ font-weight: bold;
85
+ }
86
+
61
87
  .lightTitle {
62
88
  color: white;
63
89
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5);
@@ -85,6 +111,10 @@
85
111
  user-select: none;
86
112
  }
87
113
 
114
+ .coorpmanager .author {
115
+ font-size: 8px;
116
+ }
117
+
88
118
  .hero .title {
89
119
  text-align: center;
90
120
  color: white;
@@ -97,6 +127,18 @@
97
127
  margin-top: 5px;
98
128
  }
99
129
 
130
+ .card .coorpmanager.author {
131
+ margin-top: 0px;
132
+ }
133
+
134
+ .microLearningCardInfo .coorpmanager.author {
135
+ margin-top: 5px;
136
+ }
137
+
138
+ .externalContent .coorpmanager.author {
139
+ margin-top: 5px;
140
+ }
141
+
100
142
  .hero .author {
101
143
  margin-top: 9px;
102
144
  margin-bottom: 24px;
@@ -179,6 +221,11 @@
179
221
  background: light;
180
222
  }
181
223
 
224
+ .coorpmanager .progressWrapper {
225
+ height: 2px;
226
+ margin: 11px auto;
227
+ }
228
+
182
229
  .card .progressWrapper {
183
230
  width: 150px;
184
231
  }
@@ -193,12 +240,21 @@
193
240
  font-weight: 700;
194
241
  }
195
242
 
243
+ .coorpmanager.externalContent .contentTypeInfo {
244
+ font-size: 6px;
245
+ }
246
+
196
247
  .externalContent .cardInfo {
197
248
  flex-grow: 2;
198
249
  max-height: 115px;
199
250
  overflow: hidden;
200
251
  }
201
252
 
253
+ .coorpmanager.externalContent .cardInfo {
254
+ flex-grow: 2;
255
+ max-height: 79px;
256
+ }
257
+
202
258
  @media mobile {
203
259
  .author {
204
260
  font-size: 12px;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ var _ava = _interopRequireDefault(require("ava"));
4
+
5
+ var _forEach = _interopRequireDefault(require("lodash/forEach"));
6
+
7
+ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
8
+
9
+ var _ = _interopRequireDefault(require(".."));
10
+
11
+ var _default = _interopRequireDefault(require("./fixtures/default"));
12
+
13
+ var _loading = _interopRequireDefault(require("./fixtures/loading"));
14
+
15
+ var _videoTranslate = _interopRequireDefault(require("./fixtures/video-translate"));
16
+
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+
19
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {
20
+ t.pass();
21
+ (0, _forEach.default)(_.default.propTypes, (value, key) => {
22
+ t.not(value, undefined, `PropType for "Molecule.MoleculeCockpitPopin.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
23
+ });
24
+ });
25
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin › Default › should be rendered', _renderComponent.default, _.default, _default.default);
26
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
27
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', _renderComponent.default, _.default, _videoTranslate.default);
28
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/molecule/cockpit-popin/test/fixtures.js"],"names":["t","pass","MoleculeCockpitPopin","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureVideoTranslate"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,+DAAL,EAAsEA,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAqBC,SAA7B,EAAwC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,gEAAL,EAAuEG,wBAAvE,EAA6FN,SAA7F,EAAmHO,gBAAnH;AACA,kBAAK,gEAAL,EAAuED,wBAAvE,EAA6FN,SAA7F,EAAmHQ,gBAAnH;AACA,kBAAK,uEAAL,EAA8EF,wBAA9E,EAAoGN,SAApG,EAA0HS,uBAA1H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCockpitPopin from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureVideoTranslate from './fixtures/video-translate';\n\ntest('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCockpitPopin.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCockpitPopin.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCockpitPopin › Default › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureDefault);\ntest('Molecule › MoleculeCockpitPopin › Loading › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureLoading);\ntest('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureVideoTranslate);\n"],"file":"fixtures.js"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ var _ava = _interopRequireDefault(require("ava"));
4
+
5
+ var _forEach = _interopRequireDefault(require("lodash/forEach"));
6
+
7
+ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
8
+
9
+ var _ = _interopRequireDefault(require(".."));
10
+
11
+ var _default = _interopRequireDefault(require("./fixtures/default"));
12
+
13
+ var _withValue = _interopRequireDefault(require("./fixtures/with-value"));
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+
17
+ (0, _ava.default)('Molecule › MoleculeSearch > should have valid propTypes', t => {
18
+ t.pass();
19
+ (0, _forEach.default)(_.default.propTypes, (value, key) => {
20
+ t.not(value, undefined, `PropType for "Molecule.MoleculeSearch.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
21
+ });
22
+ });
23
+ (0, _ava.default)('Molecule › MoleculeSearch › Default › should be rendered', _renderComponent.default, _.default, _default.default);
24
+ (0, _ava.default)('Molecule › MoleculeSearch › WithValue › should be rendered', _renderComponent.default, _.default, _withValue.default);
25
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/molecule/search/test/fixtures.js"],"names":["t","pass","MoleculeSearch","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureWithValue"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,yDAAL,EAAgEA,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAeC,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,mDAAkDF,GAAI,mEAA/E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,0DAAL,EAAiEG,wBAAjE,EAAuFN,SAAvF,EAAuGO,gBAAvG;AACA,kBAAK,4DAAL,EAAmED,wBAAnE,EAAyFN,SAAzF,EAAyGQ,kBAAzG","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeSearch from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithValue from './fixtures/with-value';\n\ntest('Molecule › MoleculeSearch > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeSearch.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeSearch.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeSearch › Default › should be rendered', renderComponentMacro, MoleculeSearch, fixtureDefault);\ntest('Molecule › MoleculeSearch › WithValue › should be rendered', renderComponentMacro, MoleculeSearch, fixtureWithValue);\n"],"file":"fixtures.js"}
@@ -10,6 +10,8 @@ var _ = _interopRequireDefault(require(".."));
10
10
 
11
11
  var _default = _interopRequireDefault(require("./fixtures/default"));
12
12
 
13
+ var _withMultipleErrors = _interopRequireDefault(require("./fixtures/with-multiple-errors"));
14
+
13
15
  var _withSelectedItem = _interopRequireDefault(require("./fixtures/with-selected-item"));
14
16
 
15
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -21,5 +23,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
21
23
  });
22
24
  });
23
25
  (0, _ava.default)('Molecule › MoleculeVerticalTabs › Default › should be rendered', _renderComponent.default, _.default, _default.default);
26
+ (0, _ava.default)('Molecule › MoleculeVerticalTabs › WithMultipleErrors › should be rendered', _renderComponent.default, _.default, _withMultipleErrors.default);
24
27
  (0, _ava.default)('Molecule › MoleculeVerticalTabs › WithSelectedItem › should be rendered', _renderComponent.default, _.default, _withSelectedItem.default);
25
28
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/vertical-tabs/test/fixtures.js"],"names":["t","pass","MoleculeVerticalTabs","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureWithSelectedItem"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,+DAAL,EAAsEA,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAqBC,SAA7B,EAAwC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,gEAAL,EAAuEG,wBAAvE,EAA6FN,SAA7F,EAAmHO,gBAAnH;AACA,kBAAK,yEAAL,EAAgFD,wBAAhF,EAAsGN,SAAtG,EAA4HQ,yBAA5H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeVerticalTabs from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithSelectedItem from './fixtures/with-selected-item';\n\ntest('Molecule › MoleculeVerticalTabs > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeVerticalTabs.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeVerticalTabs.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeVerticalTabs › Default › should be rendered', renderComponentMacro, MoleculeVerticalTabs, fixtureDefault);\ntest('Molecule › MoleculeVerticalTabs › WithSelectedItem › should be rendered', renderComponentMacro, MoleculeVerticalTabs, fixtureWithSelectedItem);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/vertical-tabs/test/fixtures.js"],"names":["t","pass","MoleculeVerticalTabs","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureWithMultipleErrors","fixtureWithSelectedItem"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,+DAAL,EAAsEA,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAqBC,SAA7B,EAAwC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,gEAAL,EAAuEG,wBAAvE,EAA6FN,SAA7F,EAAmHO,gBAAnH;AACA,kBAAK,2EAAL,EAAkFD,wBAAlF,EAAwGN,SAAxG,EAA8HQ,2BAA9H;AACA,kBAAK,yEAAL,EAAgFF,wBAAhF,EAAsGN,SAAtG,EAA4HS,yBAA5H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeVerticalTabs from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithMultipleErrors from './fixtures/with-multiple-errors';\nimport fixtureWithSelectedItem from './fixtures/with-selected-item';\n\ntest('Molecule › MoleculeVerticalTabs > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeVerticalTabs.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeVerticalTabs.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeVerticalTabs › Default › should be rendered', renderComponentMacro, MoleculeVerticalTabs, fixtureDefault);\ntest('Molecule › MoleculeVerticalTabs › WithMultipleErrors › should be rendered', renderComponentMacro, MoleculeVerticalTabs, fixtureWithMultipleErrors);\ntest('Molecule › MoleculeVerticalTabs › WithSelectedItem › should be rendered', renderComponentMacro, MoleculeVerticalTabs, fixtureWithSelectedItem);\n"],"file":"fixtures.js"}
@@ -13,6 +13,8 @@ var _scorm = _interopRequireDefault(require("../../../../molecule/card/test/fixt
13
13
 
14
14
  var _externalContent = _interopRequireDefault(require("../../../../molecule/card/test/fixtures/external-content"));
15
15
 
16
+ var _freerun = _interopRequireDefault(require("../../../../molecule/card/test/fixtures/freerun"));
17
+
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
19
 
18
20
  function _extends() { _extends = Object.assign || 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); }
@@ -54,19 +56,40 @@ var _default = {
54
56
  multiple: false
55
57
  },
56
58
  'courses-selection-aria-label': 'Courses results',
57
- courses: [_selectableTrue.default.props, _selectableFalse.default.props, _extends(_extends({}, _article.default.props), {}, {
58
- isSelected: false
59
- }), _selectableTrue.default.props, _extends(_extends({}, _scorm.default.props), {}, {
60
- isSelected: true
59
+ courses: [_extends(_extends({}, _selectableTrue.default.props), {}, {
60
+ theme: 'coorpmanager',
61
+ progress: undefined
61
62
  }), _extends(_extends({}, _selectableFalse.default.props), {}, {
63
+ theme: 'coorpmanager',
64
+ progress: undefined
65
+ }), _extends(_extends({}, _article.default.props), {}, {
62
66
  isSelected: false,
63
- title: 'Standard course'
67
+ theme: 'coorpmanager',
68
+ progress: undefined
69
+ }), _extends(_extends({}, _freerun.default.props), {}, {
70
+ theme: 'coorpmanager',
71
+ progress: undefined,
72
+ isSelected: false,
73
+ favorite: false
74
+ }), _extends(_extends({}, _scorm.default.props), {}, {
75
+ isSelected: true,
76
+ theme: 'coorpmanager',
77
+ progress: undefined
78
+ }), _extends(_extends({}, _selectableFalse.default.props), {}, {
79
+ isSelected: false,
80
+ title: 'Standard course',
81
+ theme: 'coorpmanager',
82
+ progress: undefined
64
83
  }), _extends(_extends({}, _externalContent.default.props), {}, {
65
84
  isSelected: false,
66
- title: 'External course'
85
+ title: 'External course',
86
+ theme: 'coorpmanager',
87
+ progress: undefined
67
88
  }), _extends(_extends({}, _scorm.default.props), {}, {
68
89
  isSelected: false,
69
- title: 'Scorm course'
90
+ title: 'Scorm course',
91
+ theme: 'coorpmanager',
92
+ progress: undefined
70
93
  })],
71
94
  switchButton: {
72
95
  type: 'switch',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/default.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","isLoading","contentTypeFilter","type","theme","size","options","name","selected","multiple","courses","SelectedCard","UnSelectedCard","Article","isSelected","Scorm","ExternalContent","switchButton","titlePosition"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQLK,IAAAA,SAAS,EAAE,KARN;AASLC,IAAAA,iBAAiB,EAAE;AACjBC,MAAAA,IAAI,EAAE,gBADW;AAEjBT,MAAAA,KAAK,EAAE,cAFU;AAGjBC,MAAAA,WAAW,EAAE,cAHI;AAIjBE,MAAAA,WAAW,EAAE,0BAJI;AAKjBO,MAAAA,KAAK,EAAE,cALU;AAMjBC,MAAAA,IAAI,EAAE,SANW;AAOjBC,MAAAA,OAAO,EAAE,CACP;AACE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EAAE,OALH;AAMZd,MAAAA,KAAK,EAAE;AANK;AAnDT;AADM,C","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n isLoading: false,\n contentTypeFilter: {\n type: 'selectMultiple',\n title: 'Content type',\n placeholder: 'Content type',\n description: 'This filters the courses',\n theme: 'coorpmanager',\n size: 'default',\n options: [\n {\n name: 'Course',\n value: 'course',\n selected: true\n },\n {\n name: \"5' learning\",\n value: 'chapter',\n selected: false\n },\n {\n name: 'Interactive slides',\n value: 'scorm',\n selected: false\n },\n {\n name: 'Video',\n value: 'video',\n selected: false\n }\n ],\n multiple: false\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false},\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n {...UnSelectedCard.props, isSelected: false, title: 'Standard course'},\n {...ExternalContent.props, isSelected: false, title: 'External course'},\n {...Scorm.props, isSelected: false, title: 'Scorm course'}\n ],\n switchButton: {\n type: 'switch',\n title: 'Show selected courses only',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"default.js"}
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/default.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","isLoading","contentTypeFilter","type","theme","size","options","name","selected","multiple","courses","SelectedCard","progress","undefined","UnSelectedCard","Article","isSelected","Chaptercard","favorite","Scorm","ExternalContent","switchButton","titlePosition"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;A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E,OALH;AAMZlB,MAAAA,KAAK,EAAE;AANK;AA3ET;AADM,C","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\nimport Chaptercard from '../../../../molecule/card/test/fixtures/freerun';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n isLoading: false,\n contentTypeFilter: {\n type: 'selectMultiple',\n title: 'Content type',\n placeholder: 'Content type',\n description: 'This filters the courses',\n theme: 'coorpmanager',\n size: 'default',\n options: [\n {\n name: 'Course',\n value: 'course',\n selected: true\n },\n {\n name: \"5' learning\",\n value: 'chapter',\n selected: false\n },\n {\n name: 'Interactive slides',\n value: 'scorm',\n selected: false\n },\n {\n name: 'Video',\n value: 'video',\n selected: false\n }\n ],\n multiple: false\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n {...SelectedCard.props, theme: 'coorpmanager', progress: undefined},\n {...UnSelectedCard.props, theme: 'coorpmanager', progress: undefined},\n {...Article.props, isSelected: false, theme: 'coorpmanager', progress: undefined},\n {\n ...Chaptercard.props,\n theme: 'coorpmanager',\n progress: undefined,\n isSelected: false,\n favorite: false\n },\n {...Scorm.props, isSelected: true, theme: 'coorpmanager', progress: undefined},\n {\n ...UnSelectedCard.props,\n isSelected: false,\n title: 'Standard course',\n theme: 'coorpmanager',\n progress: undefined\n },\n {\n ...ExternalContent.props,\n isSelected: false,\n title: 'External course',\n theme: 'coorpmanager',\n progress: undefined\n },\n {\n ...Scorm.props,\n isSelected: false,\n title: 'Scorm course',\n theme: 'coorpmanager',\n progress: undefined\n }\n ],\n switchButton: {\n type: 'switch',\n title: 'Show selected courses only',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"default.js"}
@@ -16,6 +16,8 @@ var _filtered = _interopRequireDefault(require("./fixtures/filtered"));
16
16
 
17
17
  var _sortedSelected = _interopRequireDefault(require("./fixtures/sorted-selected"));
18
18
 
19
+ var _switchActivated = _interopRequireDefault(require("./fixtures/switch-activated"));
20
+
19
21
  var _unsortedSelected = _interopRequireDefault(require("./fixtures/unsorted-selected"));
20
22
 
21
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -30,5 +32,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
30
32
  (0, _ava.default)('Organism › OrganismCourseSelection › Empty › should be rendered', _renderComponent.default, _.default, _empty.default);
31
33
  (0, _ava.default)('Organism › OrganismCourseSelection › Filtered › should be rendered', _renderComponent.default, _.default, _filtered.default);
32
34
  (0, _ava.default)('Organism › OrganismCourseSelection › SortedSelected › should be rendered', _renderComponent.default, _.default, _sortedSelected.default);
35
+ (0, _ava.default)('Organism › OrganismCourseSelection › SwitchActivated › should be rendered', _renderComponent.default, _.default, _switchActivated.default);
33
36
  (0, _ava.default)('Organism › OrganismCourseSelection › UnsortedSelected › should be rendered', _renderComponent.default, _.default, _unsortedSelected.default);
34
37
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/organism/course-selection/test/fixtures.js"],"names":["t","pass","OrganismCourseSelection","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureEmpty","fixtureFiltered","fixtureSortedSelected","fixtureUnsortedSelected"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,kEAAL,EAAyEA,CAAC,IAAI;AAC5EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAwBC,SAAhC,EAA2C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACzDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,4DAA2DF,GAAI,mEAAxF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,mEAAL,EAA0EG,wBAA1E,EAAgGN,SAAhG,EAAyHO,gBAAzH;AACA,kBAAK,iEAAL,EAAwED,wBAAxE,EAA8FN,SAA9F,EAAuHQ,cAAvH;AACA,kBAAK,oEAAL,EAA2EF,wBAA3E,EAAiGN,SAAjG,EAA0HS,iBAA1H;AACA,kBAAK,0EAAL,EAAiFH,wBAAjF,EAAuGN,SAAvG,EAAgIU,uBAAhI;AACA,kBAAK,4EAAL,EAAmFJ,wBAAnF,EAAyGN,SAAzG,EAAkIW,yBAAlI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismCourseSelection from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureFiltered from './fixtures/filtered';\nimport fixtureSortedSelected from './fixtures/sorted-selected';\nimport fixtureUnsortedSelected from './fixtures/unsorted-selected';\n\ntest('Organism › OrganismCourseSelection > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismCourseSelection.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismCourseSelection.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismCourseSelection › Default › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureDefault);\ntest('Organism › OrganismCourseSelection › Empty › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureEmpty);\ntest('Organism › OrganismCourseSelection › Filtered › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureFiltered);\ntest('Organism › OrganismCourseSelection › SortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSortedSelected);\ntest('Organism › OrganismCourseSelection › UnsortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureUnsortedSelected);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/organism/course-selection/test/fixtures.js"],"names":["t","pass","OrganismCourseSelection","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureEmpty","fixtureFiltered","fixtureSortedSelected","fixtureSwitchActivated","fixtureUnsortedSelected"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,kEAAL,EAAyEA,CAAC,IAAI;AAC5EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAwBC,SAAhC,EAA2C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACzDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,4DAA2DF,GAAI,mEAAxF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,mEAAL,EAA0EG,wBAA1E,EAAgGN,SAAhG,EAAyHO,gBAAzH;AACA,kBAAK,iEAAL,EAAwED,wBAAxE,EAA8FN,SAA9F,EAAuHQ,cAAvH;AACA,kBAAK,oEAAL,EAA2EF,wBAA3E,EAAiGN,SAAjG,EAA0HS,iBAA1H;AACA,kBAAK,0EAAL,EAAiFH,wBAAjF,EAAuGN,SAAvG,EAAgIU,uBAAhI;AACA,kBAAK,2EAAL,EAAkFJ,wBAAlF,EAAwGN,SAAxG,EAAiIW,wBAAjI;AACA,kBAAK,4EAAL,EAAmFL,wBAAnF,EAAyGN,SAAzG,EAAkIY,yBAAlI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismCourseSelection from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureFiltered from './fixtures/filtered';\nimport fixtureSortedSelected from './fixtures/sorted-selected';\nimport fixtureSwitchActivated from './fixtures/switch-activated';\nimport fixtureUnsortedSelected from './fixtures/unsorted-selected';\n\ntest('Organism › OrganismCourseSelection > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismCourseSelection.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismCourseSelection.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismCourseSelection › Default › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureDefault);\ntest('Organism › OrganismCourseSelection › Empty › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureEmpty);\ntest('Organism › OrganismCourseSelection › Filtered › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureFiltered);\ntest('Organism › OrganismCourseSelection › SortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSortedSelected);\ntest('Organism › OrganismCourseSelection › SwitchActivated › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSwitchActivated);\ntest('Organism › OrganismCourseSelection › UnsortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureUnsortedSelected);\n"],"file":"fixtures.js"}
@@ -15,7 +15,7 @@
15
15
  display: block;
16
16
  overflow: hidden;
17
17
  box-sizing: border-box;
18
- width: 68%;
18
+ width: calc(100% - 320px);
19
19
  position: relative;
20
20
  }
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coorpacademy/components",
3
- "version": "10.3.31",
3
+ "version": "10.3.32-alpha.14+cbcb8a56e",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -119,5 +119,5 @@
119
119
  "webpack-hot-middleware": "^2.25.0"
120
120
  },
121
121
  "author": "CoorpAcademy",
122
- "gitHead": "66a4b8484be05c6bbeb5cb06a72aa4a0405bdf3c"
122
+ "gitHead": "cbcb8a56e4c74d0523c3ffd037e060c945b69a08"
123
123
  }