@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.
- package/es/atom/input-switch/test/fixtures.js +10 -0
- package/es/atom/input-switch/test/fixtures.js.map +1 -1
- package/es/atom/loader/test/fixtures.js +2 -0
- package/es/atom/loader/test/fixtures.js.map +1 -1
- package/es/molecule/card/customer.css +61 -3
- package/es/molecule/card/customer.js +17 -5
- package/es/molecule/card/customer.js.map +1 -1
- package/es/molecule/card/index.js +25 -12
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card/style.css +86 -24
- package/es/molecule/card/test/fixtures/coorpmanager.js +18 -0
- package/es/molecule/card/test/fixtures/coorpmanager.js.map +1 -0
- package/es/molecule/card/test/fixtures.js +2 -0
- package/es/molecule/card/test/fixtures.js.map +1 -1
- package/es/molecule/card-content/index.js +33 -18
- package/es/molecule/card-content/index.js.map +1 -1
- package/es/molecule/card-content/style.css +56 -0
- package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
- package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/es/molecule/search/test/fixtures.js +15 -0
- package/es/molecule/search/test/fixtures.js.map +1 -0
- package/es/molecule/vertical-tabs/test/fixtures.js +2 -0
- package/es/molecule/vertical-tabs/test/fixtures.js.map +1 -1
- package/es/organism/course-selection/test/fixtures/default.js +29 -7
- package/es/organism/course-selection/test/fixtures/default.js.map +1 -1
- package/es/organism/course-selection/test/fixtures.js +2 -0
- package/es/organism/course-selection/test/fixtures.js.map +1 -1
- package/es/organism/wizard-contents/style.css +1 -1
- package/lib/atom/input-switch/test/fixtures.js +15 -0
- package/lib/atom/input-switch/test/fixtures.js.map +1 -1
- package/lib/atom/loader/test/fixtures.js +3 -0
- package/lib/atom/loader/test/fixtures.js.map +1 -1
- package/lib/molecule/card/customer.css +61 -3
- package/lib/molecule/card/customer.js +22 -6
- package/lib/molecule/card/customer.js.map +1 -1
- package/lib/molecule/card/index.js +29 -13
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card/style.css +86 -24
- package/lib/molecule/card/test/fixtures/coorpmanager.js +28 -0
- package/lib/molecule/card/test/fixtures/coorpmanager.js.map +1 -0
- package/lib/molecule/card/test/fixtures.js +3 -0
- package/lib/molecule/card/test/fixtures.js.map +1 -1
- package/lib/molecule/card-content/index.js +36 -19
- package/lib/molecule/card-content/index.js.map +1 -1
- package/lib/molecule/card-content/style.css +56 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/search/test/fixtures.js +25 -0
- package/lib/molecule/search/test/fixtures.js.map +1 -0
- package/lib/molecule/vertical-tabs/test/fixtures.js +3 -0
- package/lib/molecule/vertical-tabs/test/fixtures.js.map +1 -1
- package/lib/organism/course-selection/test/fixtures/default.js +30 -7
- package/lib/organism/course-selection/test/fixtures/default.js.map +1 -1
- package/lib/organism/course-selection/test/fixtures.js +3 -0
- package/lib/organism/course-selection/test/fixtures.js.map +1 -1
- package/lib/organism/wizard-contents/style.css +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/card/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCard","fixtureAdaptivAndDisabled","fixtureAdaptiv","fixtureArabic","fixtureArticle","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureExternalContent","fixtureFavorite","fixtureFreerunAndDisabled","fixtureFreerun","fixturePodcast","fixtureScorm","fixtureSelectableFalse","fixtureSelectableTrue","fixtureVideo","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,YAAP,MAAyB,IAAzB;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AACA,OAAOC,YAAP,MAAyB,kBAAzB;
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/card/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCard","fixtureAdaptivAndDisabled","fixtureAdaptiv","fixtureArabic","fixtureArticle","fixtureCoorpmanager","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureExternalContent","fixtureFavorite","fixtureFreerunAndDisabled","fixtureFreerun","fixturePodcast","fixtureScorm","fixtureSelectableFalse","fixtureSelectableTrue","fixtureVideo","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,YAAP,MAAyB,IAAzB;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,mBAAP,MAAgC,yBAAhC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAA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7F,CAAJ;AACAX,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,YAAzF,EAAuGS,sBAAvG,CAAJ;AACAZ,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,YAAlF,EAAgGU,eAAhG,CAAJ;AACAb,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,YAA5F,EAA0GW,yBAA1G,CAAJ;AACAd,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,YAAjF,EAA+FY,cAA/F,CAAJ;AACAf,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,YAAjF,EAA+Fa,cAA/F,CAAJ;AACAhB,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,YAA/E,EAA6Fc,YAA7F,CAAJ;AACAjB,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,YAAzF,EAAuGe,sBAAvG,CAAJ;AACAlB,IAAI,CAAC,+DAAD,EAAkEE,oBAAlE,EAAwFC,YAAxF,EAAsGgB,qBAAtG,CAAJ;AACAnB,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,YAA/E,EAA6FiB,YAA7F,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCard from '..';\nimport fixtureAdaptivAndDisabled from './fixtures/adaptiv-and-disabled';\nimport fixtureAdaptiv from './fixtures/adaptiv';\nimport fixtureArabic from './fixtures/arabic';\nimport fixtureArticle from './fixtures/article';\nimport fixtureCoorpmanager from './fixtures/coorpmanager';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureExternalContent from './fixtures/external-content';\nimport fixtureFavorite from './fixtures/favorite';\nimport fixtureFreerunAndDisabled from './fixtures/freerun-and-disabled';\nimport fixtureFreerun from './fixtures/freerun';\nimport fixturePodcast from './fixtures/podcast';\nimport fixtureScorm from './fixtures/scorm';\nimport fixtureSelectableFalse from './fixtures/selectable-false';\nimport fixtureSelectableTrue from './fixtures/selectable-true';\nimport fixtureVideo from './fixtures/video';\n\ntest('Molecule › MoleculeCard > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCard.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCard.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCard › AdaptivAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptivAndDisabled);\ntest('Molecule › MoleculeCard › Adaptiv › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptiv);\ntest('Molecule › MoleculeCard › Arabic › should be rendered', renderComponentMacro, MoleculeCard, fixtureArabic);\ntest('Molecule › MoleculeCard › Article › should be rendered', renderComponentMacro, MoleculeCard, fixtureArticle);\ntest('Molecule › MoleculeCard › Coorpmanager › should be rendered', renderComponentMacro, MoleculeCard, fixtureCoorpmanager);\ntest('Molecule › MoleculeCard › Default › should be rendered', renderComponentMacro, MoleculeCard, fixtureDefault);\ntest('Molecule › MoleculeCard › Disabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureDisabled);\ntest('Molecule › MoleculeCard › Empty › should be rendered', renderComponentMacro, MoleculeCard, fixtureEmpty);\ntest('Molecule › MoleculeCard › ExternalContent › should be rendered', renderComponentMacro, MoleculeCard, fixtureExternalContent);\ntest('Molecule › MoleculeCard › Favorite › should be rendered', renderComponentMacro, MoleculeCard, fixtureFavorite);\ntest('Molecule › MoleculeCard › FreerunAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerunAndDisabled);\ntest('Molecule › MoleculeCard › Freerun › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerun);\ntest('Molecule › MoleculeCard › Podcast › should be rendered', renderComponentMacro, MoleculeCard, fixturePodcast);\ntest('Molecule › MoleculeCard › Scorm › should be rendered', renderComponentMacro, MoleculeCard, fixtureScorm);\ntest('Molecule › MoleculeCard › SelectableFalse › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableFalse);\ntest('Molecule › MoleculeCard › SelectableTrue › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableTrue);\ntest('Molecule › MoleculeCard › Video › should be rendered', renderComponentMacro, MoleculeCard, fixtureVideo);\n"],"file":"fixtures.js"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _keys from "lodash/fp/keys";
|
|
1
2
|
import _isNil from "lodash/fp/isNil";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
@@ -12,11 +13,16 @@ export const MODES = {
|
|
|
12
13
|
HERO: 'hero',
|
|
13
14
|
CARD: 'card'
|
|
14
15
|
};
|
|
16
|
+
export const THEMES = {
|
|
17
|
+
default: null,
|
|
18
|
+
coorpmanager: style.coorpmanager
|
|
19
|
+
};
|
|
15
20
|
|
|
16
21
|
const ContentTypeInfo = ({
|
|
17
22
|
mode,
|
|
18
23
|
type,
|
|
19
|
-
externalContent
|
|
24
|
+
externalContent,
|
|
25
|
+
theme
|
|
20
26
|
}, context) => {
|
|
21
27
|
const {
|
|
22
28
|
translate
|
|
@@ -28,12 +34,11 @@ const ContentTypeInfo = ({
|
|
|
28
34
|
|
|
29
35
|
if (type === 'chapter') {
|
|
30
36
|
return /*#__PURE__*/React.createElement("div", {
|
|
31
|
-
className: style.microLearningIcon
|
|
37
|
+
className: classnames(THEMES[theme], style.microLearningIcon)
|
|
32
38
|
}, /*#__PURE__*/React.createElement(TimerIcon, {
|
|
33
|
-
|
|
34
|
-
width: 40
|
|
39
|
+
className: style.timerIcon
|
|
35
40
|
}), /*#__PURE__*/React.createElement("span", {
|
|
36
|
-
className: style.microLearninglabel
|
|
41
|
+
className: classnames(THEMES[theme], style.microLearninglabel)
|
|
37
42
|
}, "5' learning"));
|
|
38
43
|
}
|
|
39
44
|
|
|
@@ -57,16 +62,18 @@ ContentTypeInfo.contextTypes = {
|
|
|
57
62
|
ContentTypeInfo.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
58
63
|
externalContent: PropTypes.bool,
|
|
59
64
|
type: PropTypes.string,
|
|
60
|
-
mode: PropTypes.string
|
|
65
|
+
mode: PropTypes.string,
|
|
66
|
+
theme: PropTypes.oneOf(_keys(THEMES))
|
|
61
67
|
} : {};
|
|
62
68
|
|
|
63
69
|
const CardTitle = ({
|
|
64
70
|
title,
|
|
65
71
|
empty,
|
|
66
|
-
courseContent
|
|
72
|
+
courseContent,
|
|
73
|
+
theme
|
|
67
74
|
}) => {
|
|
68
75
|
return /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
className: classnames(style.title, innerHTML, courseContent ? style.lightTitle : style.darkTitle, empty ? style.empty : null),
|
|
76
|
+
className: classnames(THEMES[theme], style.title, innerHTML, courseContent ? style.lightTitle : style.darkTitle, empty ? style.empty : null),
|
|
70
77
|
"data-name": "title",
|
|
71
78
|
title: title // eslint-disable-next-line react/no-danger
|
|
72
79
|
,
|
|
@@ -79,14 +86,16 @@ const CardTitle = ({
|
|
|
79
86
|
CardTitle.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
80
87
|
title: PropTypes.string,
|
|
81
88
|
empty: PropTypes.bool,
|
|
82
|
-
courseContent: PropTypes.bool
|
|
89
|
+
courseContent: PropTypes.bool,
|
|
90
|
+
theme: PropTypes.oneOf(_keys(THEMES))
|
|
83
91
|
} : {};
|
|
84
92
|
|
|
85
93
|
const AuthorName = ({
|
|
86
94
|
author,
|
|
87
95
|
empty,
|
|
88
96
|
courseContent,
|
|
89
|
-
certifiedAuthor
|
|
97
|
+
certifiedAuthor,
|
|
98
|
+
theme
|
|
90
99
|
}) => {
|
|
91
100
|
const checkIcon = certifiedAuthor ? /*#__PURE__*/React.createElement(CheckIcon, {
|
|
92
101
|
className: classnames(style.authorIcon, courseContent ? style.iconShadow : null),
|
|
@@ -95,7 +104,7 @@ const AuthorName = ({
|
|
|
95
104
|
return /*#__PURE__*/React.createElement("div", {
|
|
96
105
|
"data-name": "author",
|
|
97
106
|
title: author,
|
|
98
|
-
className: classnames(style.author, courseContent ? style.lightTitle : style.darkAuthorTitle, empty ? style.empty : null)
|
|
107
|
+
className: classnames(THEMES[theme], style.author, courseContent ? style.lightTitle : style.darkAuthorTitle, empty ? style.empty : null)
|
|
99
108
|
}, /*#__PURE__*/React.createElement("span", null, author), checkIcon);
|
|
100
109
|
};
|
|
101
110
|
|
|
@@ -103,7 +112,8 @@ AuthorName.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
103
112
|
author: PropTypes.string,
|
|
104
113
|
empty: PropTypes.bool,
|
|
105
114
|
courseContent: PropTypes.bool,
|
|
106
|
-
certifiedAuthor: PropTypes.bool
|
|
115
|
+
certifiedAuthor: PropTypes.bool,
|
|
116
|
+
theme: PropTypes.oneOf(_keys(THEMES))
|
|
107
117
|
} : {};
|
|
108
118
|
|
|
109
119
|
const ContentInfo = ({
|
|
@@ -117,7 +127,8 @@ const ContentInfo = ({
|
|
|
117
127
|
title,
|
|
118
128
|
type,
|
|
119
129
|
badgeCategory,
|
|
120
|
-
badgeLabel
|
|
130
|
+
badgeLabel,
|
|
131
|
+
theme = 'default'
|
|
121
132
|
}) => {
|
|
122
133
|
const progressBarColor = '#3EC483';
|
|
123
134
|
const inlineProgressValueStyle = {
|
|
@@ -141,11 +152,12 @@ const ContentInfo = ({
|
|
|
141
152
|
})) : null;
|
|
142
153
|
return /*#__PURE__*/React.createElement("div", {
|
|
143
154
|
"data-name": "info",
|
|
144
|
-
className: classnames(style.infoWrapper, mode === MODES.HERO ? style.hero : style.card, disabled ? style.progressBarDisabled : null, externalContent ? style.externalContent : null)
|
|
155
|
+
className: classnames(THEMES[theme], style.infoWrapper, mode === MODES.HERO ? style.hero : style.card, disabled ? style.progressBarDisabled : null, externalContent ? style.externalContent : null)
|
|
145
156
|
}, /*#__PURE__*/React.createElement(ContentTypeInfo, {
|
|
146
157
|
mode: mode,
|
|
147
158
|
type: type,
|
|
148
|
-
externalContent: externalContent
|
|
159
|
+
externalContent: externalContent,
|
|
160
|
+
theme: theme
|
|
149
161
|
}), /*#__PURE__*/React.createElement("div", {
|
|
150
162
|
className: classnames(style.cardInfo, chapterContent ? style.microLearningCardInfo : null)
|
|
151
163
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -156,12 +168,14 @@ const ContentInfo = ({
|
|
|
156
168
|
}) : null), /*#__PURE__*/React.createElement(CardTitle, {
|
|
157
169
|
title: title,
|
|
158
170
|
empty: empty,
|
|
159
|
-
courseContent: courseContent
|
|
171
|
+
courseContent: courseContent,
|
|
172
|
+
theme: theme
|
|
160
173
|
}), /*#__PURE__*/React.createElement(AuthorName, {
|
|
161
174
|
author: author,
|
|
162
175
|
empty: empty,
|
|
163
176
|
courseContent: courseContent,
|
|
164
|
-
certifiedAuthor: certifiedAuthor
|
|
177
|
+
certifiedAuthor: certifiedAuthor,
|
|
178
|
+
theme: theme
|
|
165
179
|
})), progressBar);
|
|
166
180
|
};
|
|
167
181
|
|
|
@@ -179,7 +193,8 @@ ContentInfo.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
179
193
|
type: PropTypes.string,
|
|
180
194
|
mode: PropTypes.string,
|
|
181
195
|
badgeCategory: ContentBadge.propTypes.category,
|
|
182
|
-
badgeLabel: ContentBadge.propTypes.label
|
|
196
|
+
badgeLabel: ContentBadge.propTypes.label,
|
|
197
|
+
theme: PropTypes.oneOf(_keys(THEMES))
|
|
183
198
|
} : {};
|
|
184
199
|
export default ContentInfo;
|
|
185
200
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/card-content/index.js"],"names":["React","PropTypes","classnames","NovaCompositionCoorpacademyAdaptive","AdaptivIcon","NovaSolidStatusCheckCircle2","CheckIcon","NovaCompositionCoorpacademyTimer","TimerIcon","isExternalContent","EXTERNAL_CONTENT_ICONS","Provider","ContentBadge","innerHTML","style","MODES","HERO","CARD","ContentTypeInfo","mode","type","externalContent","context","translate","microLearningIcon","microLearninglabel","textColor","color","contentTypeInfo","contextTypes","skin","childContextTypes","propTypes","bool","string","CardTitle","title","empty","courseContent","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","category","label"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SACEC,mCAAmC,IAAIC,WADzC,EAEEC,2BAA2B,IAAIC,SAFjC,EAGEC,gCAAgC,IAAIC,SAHtC,QAIO,0BAJP;AAKA,SAAQC,iBAAR,EAA2BC,sBAA3B,QAAwD,6BAAxD;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,YAAP,MAAyB,0BAAzB;AACA,SAAQC,SAAR,QAAwB,4BAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,OAAO,MAAMC,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,EAAEN,KAAK,CAACU;AAAtB,oBACE,oB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AEE,IAAA,KAAK,EAAEN,KAFT;AAGE,IAAA,aAAa,EAAEC,aAHjB;AAIE,IAAA,eAAe,EAAEM;AAJnB,IAVF,CAVF,EA2BGgB,WA3BH,CADF;AA+BD,CApED;;AAsEAX,WAAW,CAACpB,YAAZ,GAA2B;AACzBC,EAAAA,IAAI,EAAEnB,QAAQ,CAACoB,iBAAT,CAA2BD;AADR,CAA3B;AAIAmB,WAAW,CAACjB,SAAZ,2CAAwB;AACtBkB,EAAAA,OAAO,EAAEjD,SAAS,CAACgC,IADG;AAEtBU,EAAAA,MAAM,EAAE1C,SAAS,CAACiC,MAFI;AAGtBU,EAAAA,eAAe,EAAE3C,SAAS,CAACgC,IAHL;AAItBkB,EAAAA,QAAQ,EAAElD,SAAS,CAACgC,IAJE;AAKtBI,EAAAA,KAAK,EAAEpC,SAAS,CAACgC,IALK;AAMtBmB,EAAAA,QAAQ,EAAEnD,SAAS,CAACsE,MANE;AAOtBnC,EAAAA,KAAK,EAAEnC,SAAS,CAACiC,MAPK;AAQtBd,EAAAA,IAAI,EAAEnB,SAAS,CAACiC,MARM;AAStBf,EAAAA,IAAI,EAAElB,SAAS,CAACiC,MATM;AAUtBmB,EAAAA,aAAa,EAAEzC,YAAY,CAACoB,SAAb,CAAuBwC,QAVhB;AAWtBlB,EAAAA,UAAU,EAAE1C,YAAY,CAACoB,SAAb,CAAuByC;AAXb,CAAxB;AAcA,eAAexB,WAAf","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":["React","PropTypes","classnames","NovaCompositionCoorpacademyAdaptive","AdaptivIcon","NovaSolidStatusCheckCircle2","CheckIcon","NovaCompositionCoorpacademyTimer","TimerIcon","isExternalContent","EXTERNAL_CONTENT_ICONS","Provider","ContentBadge","innerHTML","style","MODES","HERO","CARD","THEMES","default","coorpmanager","ContentTypeInfo","mode","type","externalContent","theme","context","translate","microLearningIcon","timerIcon","microLearninglabel","textColor","color","contentTypeInfo","contextTypes","skin","childContextTypes","propTypes","bool","string","oneOf","CardTitle","title","empty","courseContent","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","category","label"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SACEC,mCAAmC,IAAIC,WADzC,EAEEC,2BAA2B,IAAIC,SAFjC,EAGEC,gCAAgC,IAAIC,SAHtC,QAIO,0BAJP;AAKA,SAAQC,iBAAR,EAA2BC,sBAA3B,QAAwD,6BAAxD;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,YAAP,MAAyB,0BAAzB;AACA,SAAQC,SAAR,QAAwB,4BAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,OAAO,MAAMC,KAAK,GAAG;AACnBC,EAAAA,IA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A,eAAe,EAAEM,eAJnB;AAKE,IAAA,KAAK,EAAEzB;AALT,IAVF,CAXF,EA6BGyC,WA7BH,CADF;AAiCD,CAvED;;AAyEAX,WAAW,CAACrB,YAAZ,GAA2B;AACzBC,EAAAA,IAAI,EAAExB,QAAQ,CAACyB,iBAAT,CAA2BD;AADR,CAA3B;AAIAoB,WAAW,CAAClB,SAAZ,2CAAwB;AACtBmB,EAAAA,OAAO,EAAEvD,SAAS,CAACqC,IADG;AAEtBW,EAAAA,MAAM,EAAEhD,SAAS,CAACsC,MAFI;AAGtBW,EAAAA,eAAe,EAAEjD,SAAS,CAACqC,IAHL;AAItBmB,EAAAA,QAAQ,EAAExD,SAAS,CAACqC,IAJE;AAKtBK,EAAAA,KAAK,EAAE1C,SAAS,CAACqC,IALK;AAMtBoB,EAAAA,QAAQ,EAAEzD,SAAS,CAAC4E,MANE;AAOtBnC,EAAAA,KAAK,EAAEzC,SAAS,CAACsC,MAPK;AAQtBhB,EAAAA,IAAI,EAAEtB,SAAS,CAACsC,MARM;AAStBjB,EAAAA,IAAI,EAAErB,SAAS,CAACsC,MATM;AAUtBoB,EAAAA,aAAa,EAAE/C,YAAY,CAACyB,SAAb,CAAuByC,QAVhB;AAWtBlB,EAAAA,UAAU,EAAEhD,YAAY,CAACyB,SAAb,CAAuB0C,KAXb;AAYtBtD,EAAAA,KAAK,EAAExB,SAAS,CAACuC,KAAV,CAAgB,MAAKtB,MAAL,CAAhB;AAZe,CAAxB;AAeA,eAAeqC,WAAf","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,17 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeCockpitPopin from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureLoading from './fixtures/loading';
|
|
7
|
+
import fixtureVideoTranslate from './fixtures/video-translate';
|
|
8
|
+
test('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {
|
|
9
|
+
t.pass();
|
|
10
|
+
forEach(MoleculeCockpitPopin.propTypes, (value, key) => {
|
|
11
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeCockpitPopin.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
test('Molecule › MoleculeCockpitPopin › Default › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureDefault);
|
|
15
|
+
test('Molecule › MoleculeCockpitPopin › Loading › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureLoading);
|
|
16
|
+
test('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureVideoTranslate);
|
|
17
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/cockpit-popin/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCockpitPopin","fixtureDefault","fixtureLoading","fixtureVideoTranslate","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,oBAAP,MAAiC,IAAjC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AAEAN,IAAI,CAAC,+DAAD,EAAkEO,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,oBAAoB,CAACM,SAAtB,EAAiC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,oBAAzF,EAA+GC,cAA/G,CAAJ;AACAJ,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,oBAAzF,EAA+GE,cAA/G,CAAJ;AACAL,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,oBAAhG,EAAsHG,qBAAtH,CAAJ","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,15 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeSearch from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureWithValue from './fixtures/with-value';
|
|
7
|
+
test('Molecule › MoleculeSearch > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(MoleculeSearch.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeSearch.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Molecule › MoleculeSearch › Default › should be rendered', renderComponentMacro, MoleculeSearch, fixtureDefault);
|
|
14
|
+
test('Molecule › MoleculeSearch › WithValue › should be rendered', renderComponentMacro, MoleculeSearch, fixtureWithValue);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/search/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeSearch","fixtureDefault","fixtureWithValue","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,cAAP,MAA2B,IAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AAEAL,IAAI,CAAC,yDAAD,EAA4DM,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,cAAc,CAACK,SAAhB,EAA2B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,mDAAkDF,GAAI,mEAA/E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,cAAnF,EAAmGC,cAAnG,CAAJ;AACAJ,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,cAArF,EAAqGE,gBAArG,CAAJ","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"}
|
|
@@ -3,6 +3,7 @@ import forEach from 'lodash/forEach';
|
|
|
3
3
|
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
4
|
import MoleculeVerticalTabs from '..';
|
|
5
5
|
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureWithMultipleErrors from './fixtures/with-multiple-errors';
|
|
6
7
|
import fixtureWithSelectedItem from './fixtures/with-selected-item';
|
|
7
8
|
test('Molecule › MoleculeVerticalTabs > should have valid propTypes', t => {
|
|
8
9
|
t.pass();
|
|
@@ -11,5 +12,6 @@ test('Molecule › MoleculeVerticalTabs > should have valid propTypes', t => {
|
|
|
11
12
|
});
|
|
12
13
|
});
|
|
13
14
|
test('Molecule › MoleculeVerticalTabs › Default › should be rendered', renderComponentMacro, MoleculeVerticalTabs, fixtureDefault);
|
|
15
|
+
test('Molecule › MoleculeVerticalTabs › WithMultipleErrors › should be rendered', renderComponentMacro, MoleculeVerticalTabs, fixtureWithMultipleErrors);
|
|
14
16
|
test('Molecule › MoleculeVerticalTabs › WithSelectedItem › should be rendered', renderComponentMacro, MoleculeVerticalTabs, fixtureWithSelectedItem);
|
|
15
17
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/vertical-tabs/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeVerticalTabs","fixtureDefault","fixtureWithSelectedItem","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,oBAAP,MAAiC,IAAjC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,uBAAP,MAAoC,+BAApC;
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/vertical-tabs/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeVerticalTabs","fixtureDefault","fixtureWithMultipleErrors","fixtureWithSelectedItem","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,oBAAP,MAAiC,IAAjC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AAEAN,IAAI,CAAC,+DAAD,EAAkEO,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,oBAAoB,CAACM,SAAtB,EAAiC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,oBAAzF,EAA+GC,cAA/G,CAAJ;AACAJ,IAAI,CAAC,2EAAD,EAA8EE,oBAA9E,EAAoGC,oBAApG,EAA0HE,yBAA1H,CAAJ;AACAL,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,oBAAlG,EAAwHG,uBAAxH,CAAJ","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"}
|
|
@@ -5,6 +5,7 @@ import SelectedCard from '../../../../molecule/card/test/fixtures/selectable-tru
|
|
|
5
5
|
import Article from '../../../../molecule/card/test/fixtures/article';
|
|
6
6
|
import Scorm from '../../../../molecule/card/test/fixtures/scorm';
|
|
7
7
|
import ExternalContent from '../../../../molecule/card/test/fixtures/external-content';
|
|
8
|
+
import Chaptercard from '../../../../molecule/card/test/fixtures/freerun';
|
|
8
9
|
export default {
|
|
9
10
|
props: {
|
|
10
11
|
search: {
|
|
@@ -42,19 +43,40 @@ export default {
|
|
|
42
43
|
multiple: false
|
|
43
44
|
},
|
|
44
45
|
'courses-selection-aria-label': 'Courses results',
|
|
45
|
-
courses: [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
courses: [_extends(_extends({}, SelectedCard.props), {}, {
|
|
47
|
+
theme: 'coorpmanager',
|
|
48
|
+
progress: undefined
|
|
49
|
+
}), _extends(_extends({}, UnSelectedCard.props), {}, {
|
|
50
|
+
theme: 'coorpmanager',
|
|
51
|
+
progress: undefined
|
|
52
|
+
}), _extends(_extends({}, Article.props), {}, {
|
|
53
|
+
isSelected: false,
|
|
54
|
+
theme: 'coorpmanager',
|
|
55
|
+
progress: undefined
|
|
56
|
+
}), _extends(_extends({}, Chaptercard.props), {}, {
|
|
57
|
+
theme: 'coorpmanager',
|
|
58
|
+
progress: undefined,
|
|
59
|
+
isSelected: false,
|
|
60
|
+
favorite: false
|
|
61
|
+
}), _extends(_extends({}, Scorm.props), {}, {
|
|
62
|
+
isSelected: true,
|
|
63
|
+
theme: 'coorpmanager',
|
|
64
|
+
progress: undefined
|
|
49
65
|
}), _extends(_extends({}, UnSelectedCard.props), {}, {
|
|
50
66
|
isSelected: false,
|
|
51
|
-
title: 'Standard course'
|
|
67
|
+
title: 'Standard course',
|
|
68
|
+
theme: 'coorpmanager',
|
|
69
|
+
progress: undefined
|
|
52
70
|
}), _extends(_extends({}, ExternalContent.props), {}, {
|
|
53
71
|
isSelected: false,
|
|
54
|
-
title: 'External course'
|
|
72
|
+
title: 'External course',
|
|
73
|
+
theme: 'coorpmanager',
|
|
74
|
+
progress: undefined
|
|
55
75
|
}), _extends(_extends({}, Scorm.props), {}, {
|
|
56
76
|
isSelected: false,
|
|
57
|
-
title: 'Scorm course'
|
|
77
|
+
title: 'Scorm course',
|
|
78
|
+
theme: 'coorpmanager',
|
|
79
|
+
progress: undefined
|
|
58
80
|
})],
|
|
59
81
|
switchButton: {
|
|
60
82
|
type: 'switch',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/default.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","ExternalContent","props","search","title","placeholder","value","description","onChange","console","log","isLoading","contentTypeFilter","type","theme","size","options","name","selected","multiple","courses","isSelected","switchButton","titlePosition"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AACA,OAAOC,eAAP,MAA4B,0DAA5B;AAEA,eAAe;AACbC,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;AACEC,QAAAA,IAAI,EAAE,QADR;AAEEX,QAAAA,KAAK,EAAE,QAFT;AAGEY,QAAAA,QAAQ,EAAE;AAHZ,OADO,EAMP;AACED,QAAAA,IAAI,EAAE,aADR;AAEEX,QAAAA,KAAK,EAAE,SAFT;AAGEY,QAAAA,QAAQ,EAAE;AAHZ,OANO,EAWP;AACED,QAAAA,IAAI,EAAE,oBADR;AAEEX,QAAAA,KAAK,EAAE,OAFT;AAGEY,QAAAA,QAAQ,EAAE;AAHZ,OAXO,EAgBP;AACED,QAAAA,IAAI,EAAE,OADR;AAEEX,QAAAA,KAAK,EAAE,OAFT;AAGEY,QAAAA,QAAQ,EAAE;AAHZ,OAhBO,CAPQ;AA6BjBC,MAAAA,QAAQ,EAAE;AA7BO,KATd;AAwCL,oCAAgC,iBAxC3B;AAyCLC,IAAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/default.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","ExternalContent","Chaptercard","props","search","title","placeholder","value","description","onChange","console","log","isLoading","contentTypeFilter","type","theme","size","options","name","selected","multiple","courses","progress","undefined","isSelected","favorite","switchButton","titlePosition"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AACA,OAAOC,eAAP,MAA4B,0DAA5B;AACA,OAAOC,WAAP,MAAwB,iDAAxB;AAEA,eAAe;AACbC,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,iB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C,MAAAA,QAAQ,EAAE;AATL,8BAWHzB,KAAK,CAACG,KAXH;AAWUqB,MAAAA,UAAU,EAAE,IAXtB;AAW4BT,MAAAA,KAAK,EAAE,cAXnC;AAWmDO,MAAAA,QAAQ,EAAEC;AAX7D,8BAaF1B,cAAc,CAACM,KAbb;AAcLqB,MAAAA,UAAU,EAAE,KAdP;AAeLnB,MAAAA,KAAK,EAAE,iBAfF;AAgBLU,MAAAA,KAAK,EAAE,cAhBF;AAiBLO,MAAAA,QAAQ,EAAEC;AAjBL,8BAoBFtB,eAAe,CAACE,KApBd;AAqBLqB,MAAAA,UAAU,EAAE,KArBP;AAsBLnB,MAAAA,KAAK,EAAE,iBAtBF;AAuBLU,MAAAA,KAAK,EAAE,cAvBF;AAwBLO,MAAAA,QAAQ,EAAEC;AAxBL,8BA2BFvB,KAAK,CAACG,KA3BJ;AA4BLqB,MAAAA,UAAU,EAAE,KA5BP;AA6BLnB,MAAAA,KAAK,EAAE,cA7BF;AA8BLU,MAAAA,KAAK,EAAE,cA9BF;AA+BLO,MAAAA,QAAQ,EAAEC;AA/BL,OAzCJ;AA2ELG,IAAAA,YAAY,EAAE;AACZZ,MAAAA,IAAI,EAAE,QADM;AAEZT,MAAAA,KAAK,EAAE,4BAFK;AAGZE,MAAAA,KAAK,EAAE,KAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZoB,MAAAA,aAAa,EAAE,OALH;AAMZZ,MAAAA,KAAK,EAAE;AANK;AA3ET;AADM,CAAf","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"}
|
|
@@ -6,6 +6,7 @@ import fixtureDefault from './fixtures/default';
|
|
|
6
6
|
import fixtureEmpty from './fixtures/empty';
|
|
7
7
|
import fixtureFiltered from './fixtures/filtered';
|
|
8
8
|
import fixtureSortedSelected from './fixtures/sorted-selected';
|
|
9
|
+
import fixtureSwitchActivated from './fixtures/switch-activated';
|
|
9
10
|
import fixtureUnsortedSelected from './fixtures/unsorted-selected';
|
|
10
11
|
test('Organism › OrganismCourseSelection > should have valid propTypes', t => {
|
|
11
12
|
t.pass();
|
|
@@ -17,5 +18,6 @@ test('Organism › OrganismCourseSelection › Default › should be rendered',
|
|
|
17
18
|
test('Organism › OrganismCourseSelection › Empty › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureEmpty);
|
|
18
19
|
test('Organism › OrganismCourseSelection › Filtered › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureFiltered);
|
|
19
20
|
test('Organism › OrganismCourseSelection › SortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSortedSelected);
|
|
21
|
+
test('Organism › OrganismCourseSelection › SwitchActivated › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSwitchActivated);
|
|
20
22
|
test('Organism › OrganismCourseSelection › UnsortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureUnsortedSelected);
|
|
21
23
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/organism/course-selection/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismCourseSelection","fixtureDefault","fixtureEmpty","fixtureFiltered","fixtureSortedSelected","fixtureUnsortedSelected","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,uBAAP,MAAoC,IAApC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AACA,OAAOC,uBAAP,MAAoC,8BAApC;
|
|
1
|
+
{"version":3,"sources":["../../../../src/organism/course-selection/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismCourseSelection","fixtureDefault","fixtureEmpty","fixtureFiltered","fixtureSortedSelected","fixtureSwitchActivated","fixtureUnsortedSelected","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,uBAAP,MAAoC,IAApC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,uBAAP,MAAoC,8BAApC;AAEAT,IAAI,CAAC,kEAAD,EAAqEU,CAAC,IAAI;AAC5EA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,uBAAuB,CAACS,SAAzB,EAAoC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACzDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,4DAA2DF,GAAI,mEAAxF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,uBAA5F,EAAqHC,cAArH,CAAJ;AACAJ,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,uBAA1F,EAAmHE,YAAnH,CAAJ;AACAL,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,uBAA7F,EAAsHG,eAAtH,CAAJ;AACAN,IAAI,CAAC,0EAAD,EAA6EE,oBAA7E,EAAmGC,uBAAnG,EAA4HI,qBAA5H,CAAJ;AACAP,IAAI,CAAC,2EAAD,EAA8EE,oBAA9E,EAAoGC,uBAApG,EAA6HK,sBAA7H,CAAJ;AACAR,IAAI,CAAC,4EAAD,EAA+EE,oBAA/E,EAAqGC,uBAArG,EAA8HM,uBAA9H,CAAJ","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"}
|
|
@@ -10,6 +10,16 @@ var _ = _interopRequireDefault(require(".."));
|
|
|
10
10
|
|
|
11
11
|
var _checked = _interopRequireDefault(require("./fixtures/checked"));
|
|
12
12
|
|
|
13
|
+
var _cmLeft = _interopRequireDefault(require("./fixtures/cm-left"));
|
|
14
|
+
|
|
15
|
+
var _cmRightChecked = _interopRequireDefault(require("./fixtures/cm-right-checked"));
|
|
16
|
+
|
|
17
|
+
var _cmRightDisabled = _interopRequireDefault(require("./fixtures/cm-right-disabled"));
|
|
18
|
+
|
|
19
|
+
var _cmRightModified = _interopRequireDefault(require("./fixtures/cm-right-modified"));
|
|
20
|
+
|
|
21
|
+
var _cmRight = _interopRequireDefault(require("./fixtures/cm-right"));
|
|
22
|
+
|
|
13
23
|
var _disabled = _interopRequireDefault(require("./fixtures/disabled"));
|
|
14
24
|
|
|
15
25
|
var _modified = _interopRequireDefault(require("./fixtures/modified"));
|
|
@@ -29,6 +39,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
29
39
|
});
|
|
30
40
|
});
|
|
31
41
|
(0, _ava.default)('Atom › AtomInputSwitch › Checked › should be rendered', _renderComponent.default, _.default, _checked.default);
|
|
42
|
+
(0, _ava.default)('Atom › AtomInputSwitch › CmLeft › should be rendered', _renderComponent.default, _.default, _cmLeft.default);
|
|
43
|
+
(0, _ava.default)('Atom › AtomInputSwitch › CmRightChecked › should be rendered', _renderComponent.default, _.default, _cmRightChecked.default);
|
|
44
|
+
(0, _ava.default)('Atom › AtomInputSwitch › CmRightDisabled › should be rendered', _renderComponent.default, _.default, _cmRightDisabled.default);
|
|
45
|
+
(0, _ava.default)('Atom › AtomInputSwitch › CmRightModified › should be rendered', _renderComponent.default, _.default, _cmRightModified.default);
|
|
46
|
+
(0, _ava.default)('Atom › AtomInputSwitch › CmRight › should be rendered', _renderComponent.default, _.default, _cmRight.default);
|
|
32
47
|
(0, _ava.default)('Atom › AtomInputSwitch › Disabled › should be rendered', _renderComponent.default, _.default, _disabled.default);
|
|
33
48
|
(0, _ava.default)('Atom › AtomInputSwitch › Modified › should be rendered', _renderComponent.default, _.default, _modified.default);
|
|
34
49
|
(0, _ava.default)('Atom › AtomInputSwitch › NoTitle › should be rendered', _renderComponent.default, _.default, _noTitle.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/input-switch/test/fixtures.js"],"names":["t","pass","AtomInputSwitch","propTypes","value","key","not","undefined","renderComponentMacro","fixtureChecked","fixtureDisabled","fixtureModified","fixtureNoTitle","fixtureSso","fixtureUnchecked"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,sDAAL,EAA6DA,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAgBC,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,uDAAL,EAA8DG,wBAA9D,EAAoFN,SAApF,EAAqGO,gBAArG;AACA,kBAAK,wDAAL,EAA+
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/input-switch/test/fixtures.js"],"names":["t","pass","AtomInputSwitch","propTypes","value","key","not","undefined","renderComponentMacro","fixtureChecked","fixtureCmLeft","fixtureCmRightChecked","fixtureCmRightDisabled","fixtureCmRightModified","fixtureCmRight","fixtureDisabled","fixtureModified","fixtureNoTitle","fixtureSso","fixtureUnchecked"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,sDAAL,EAA6DA,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAgBC,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,uDAAL,EAA8DG,wBAA9D,EAAoFN,SAApF,EAAqGO,gBAArG;AACA,kBAAK,sDAAL,EAA6DD,wBAA7D,EAAmFN,SAAnF,EAAoGQ,eAApG;AACA,kBAAK,8DAAL,EAAqEF,wBAArE,EAA2FN,SAA3F,EAA4GS,uBAA5G;AACA,kBAAK,+DAAL,EAAsEH,wBAAtE,EAA4FN,SAA5F,EAA6GU,wBAA7G;AACA,kBAAK,+DAAL,EAAsEJ,wBAAtE,EAA4FN,SAA5F,EAA6GW,wBAA7G;AACA,kBAAK,uDAAL,EAA8DL,wBAA9D,EAAoFN,SAApF,EAAqGY,gBAArG;AACA,kBAAK,wDAAL,EAA+DN,wBAA/D,EAAqFN,SAArF,EAAsGa,iBAAtG;AACA,kBAAK,wDAAL,EAA+DP,wBAA/D,EAAqFN,SAArF,EAAsGc,iBAAtG;AACA,kBAAK,uDAAL,EAA8DR,wBAA9D,EAAoFN,SAApF,EAAqGe,gBAArG;AACA,kBAAK,mDAAL,EAA0DT,wBAA1D,EAAgFN,SAAhF,EAAiGgB,YAAjG;AACA,kBAAK,yDAAL,EAAgEV,wBAAhE,EAAsFN,SAAtF,EAAuGiB,kBAAvG","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputSwitch from '..';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureCmLeft from './fixtures/cm-left';\nimport fixtureCmRightChecked from './fixtures/cm-right-checked';\nimport fixtureCmRightDisabled from './fixtures/cm-right-disabled';\nimport fixtureCmRightModified from './fixtures/cm-right-modified';\nimport fixtureCmRight from './fixtures/cm-right';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureModified from './fixtures/modified';\nimport fixtureNoTitle from './fixtures/no-title';\nimport fixtureSso from './fixtures/sso';\nimport fixtureUnchecked from './fixtures/unchecked';\n\ntest('Atom › AtomInputSwitch > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputSwitch.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputSwitch.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputSwitch › Checked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureChecked);\ntest('Atom › AtomInputSwitch › CmLeft › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmLeft);\ntest('Atom › AtomInputSwitch › CmRightChecked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightChecked);\ntest('Atom › AtomInputSwitch › CmRightDisabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightDisabled);\ntest('Atom › AtomInputSwitch › CmRightModified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightModified);\ntest('Atom › AtomInputSwitch › CmRight › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRight);\ntest('Atom › AtomInputSwitch › Disabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureDisabled);\ntest('Atom › AtomInputSwitch › Modified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureModified);\ntest('Atom › AtomInputSwitch › NoTitle › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureNoTitle);\ntest('Atom › AtomInputSwitch › Sso › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureSso);\ntest('Atom › AtomInputSwitch › Unchecked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureUnchecked);\n"],"file":"fixtures.js"}
|