@coorpacademy/components 10.3.28 → 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/clue/test/see-clue.js +33 -0
- package/es/atom/clue/test/see-clue.js.map +1 -1
- package/es/atom/content-badge/test/fixtures.js +2 -0
- package/es/atom/content-badge/test/fixtures.js.map +1 -1
- 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/atom/provider/index.js +1 -1
- package/es/atom/provider/index.js.map +1 -1
- package/es/molecule/banner/style.css +1 -0
- package/es/molecule/banner/test/fixtures/default.js +1 -1
- package/es/molecule/banner/test/fixtures/default.js.map +1 -1
- package/es/molecule/banner/test/fixtures.js +8 -0
- package/es/molecule/banner/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/cm-popin/style.css +1 -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/select-multiple/test/fixtures.js +8 -0
- package/es/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/es/molecule/vertical-tabs/test/fixtures.js +2 -0
- package/es/molecule/vertical-tabs/test/fixtures.js.map +1 -1
- package/es/molecule/wizard-summary/style.css +1 -0
- package/es/organism/content-translation/test/fixtures.js +15 -0
- package/es/organism/content-translation/test/fixtures.js.map +1 -0
- 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/list-item/test/fixtures.js +19 -0
- package/es/organism/list-item/test/fixtures.js.map +1 -0
- package/es/organism/list-items/test/fixtures/published.js +1 -1
- package/es/organism/list-items/test/fixtures/published.js.map +1 -1
- package/es/organism/list-items/test/fixtures.js +17 -0
- package/es/organism/list-items/test/fixtures.js.map +1 -0
- package/es/organism/mooc-footer/style.css +1 -0
- package/es/organism/wizard-contents/style.css +4 -6
- package/es/organism/wizard-contents/test/fixtures.js +21 -0
- package/es/organism/wizard-contents/test/fixtures.js.map +1 -0
- package/es/template/back-office/brand-update/index.js +1 -1
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js +49 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures.js +20 -2
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/atom/clue/test/see-clue.js +34 -0
- package/lib/atom/clue/test/see-clue.js.map +1 -1
- package/lib/atom/content-badge/test/fixtures.js +3 -0
- package/lib/atom/content-badge/test/fixtures.js.map +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/atom/provider/index.js +1 -1
- package/lib/atom/provider/index.js.map +1 -1
- package/lib/molecule/banner/style.css +1 -0
- package/lib/molecule/banner/test/fixtures/default.js +1 -1
- package/lib/molecule/banner/test/fixtures/default.js.map +1 -1
- package/lib/molecule/banner/test/fixtures.js +12 -0
- package/lib/molecule/banner/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/cm-popin/style.css +1 -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/select-multiple/test/fixtures.js +12 -0
- package/lib/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/lib/molecule/vertical-tabs/test/fixtures.js +3 -0
- package/lib/molecule/vertical-tabs/test/fixtures.js.map +1 -1
- package/lib/molecule/wizard-summary/style.css +1 -0
- package/lib/organism/content-translation/test/fixtures.js +25 -0
- package/lib/organism/content-translation/test/fixtures.js.map +1 -0
- 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/list-item/test/fixtures.js +31 -0
- package/lib/organism/list-item/test/fixtures.js.map +1 -0
- package/lib/organism/list-items/test/fixtures/published.js +1 -1
- package/lib/organism/list-items/test/fixtures/published.js.map +1 -1
- package/lib/organism/list-items/test/fixtures.js +28 -0
- package/lib/organism/list-items/test/fixtures.js.map +1 -0
- package/lib/organism/mooc-footer/style.css +1 -0
- package/lib/organism/wizard-contents/style.css +4 -6
- package/lib/organism/wizard-contents/test/fixtures.js +34 -0
- package/lib/organism/wizard-contents/test/fixtures.js.map +1 -0
- package/lib/template/back-office/brand-update/index.js +1 -1
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js +49 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures.js +30 -3
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/package.json +2 -2
|
@@ -10,6 +10,7 @@ import Adapter from 'enzyme-adapter-react-16';
|
|
|
10
10
|
import style from '../style.css'; // eslint-disable-line css-modules/no-unused-class
|
|
11
11
|
|
|
12
12
|
import Clue from '..';
|
|
13
|
+
import Provider from '../../provider';
|
|
13
14
|
import defaultFixture from './fixtures/default';
|
|
14
15
|
browserEnv();
|
|
15
16
|
configure({
|
|
@@ -65,4 +66,36 @@ test('should See the clue', t => {
|
|
|
65
66
|
});
|
|
66
67
|
t.is(wrapper.find(clueTextStyle).text(), 'This is the new clue ...');
|
|
67
68
|
});
|
|
69
|
+
test('should clue color is the primary color if color is defined on skin', t => {
|
|
70
|
+
const context = {
|
|
71
|
+
skin: {
|
|
72
|
+
common: {
|
|
73
|
+
primary: '#FF0000'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
translate: key => key
|
|
77
|
+
};
|
|
78
|
+
t.plan(1);
|
|
79
|
+
const backStyle = `.${_replace(' ', '.', style.back)}`;
|
|
80
|
+
const wrapper = mount( /*#__PURE__*/React.createElement(Provider, context, /*#__PURE__*/React.createElement(Clue, defaultFixture.props)));
|
|
81
|
+
t.deepEqual(wrapper.find(backStyle).get(0).props.style, {
|
|
82
|
+
backgroundColor: '#FF0000'
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
test('should clue color is the fallback primary color if color not defined on skin', t => {
|
|
86
|
+
const context = {
|
|
87
|
+
skin: {
|
|
88
|
+
common: {
|
|
89
|
+
secondary: '#FF0000'
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
translate: key => key
|
|
93
|
+
};
|
|
94
|
+
t.plan(1);
|
|
95
|
+
const backStyle = `.${_replace(' ', '.', style.back)}`;
|
|
96
|
+
const wrapper = mount( /*#__PURE__*/React.createElement(Provider, context, /*#__PURE__*/React.createElement(Clue, defaultFixture.props)));
|
|
97
|
+
t.deepEqual(wrapper.find(backStyle).get(0).props.style, {
|
|
98
|
+
backgroundColor: '#00B0FF'
|
|
99
|
+
});
|
|
100
|
+
});
|
|
68
101
|
//# sourceMappingURL=see-clue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/clue/test/see-clue.js"],"names":["browserEnv","test","React","mount","configure","Adapter","style","Clue","defaultFixture","adapter","t","context","skin","translate","key","plan","clueCardStyle","clueCard","flipStyle","flip","loadingStyle","loading","backContentStyle","backContent","clueTextStyle","clueText","onClick","e","pass","wrapper","props","is","find","exists","simulate","preventDefault","stopPropagation","setProps","text"],"mappings":";;;;AAAA,OAAOA,UAAP,MAAuB,aAAvB;AACA,OAAOC,IAAP,MAAiB,KAAjB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,KAAR,EAAeC,SAAf,QAA+B,QAA/B;AACA,OAAOC,OAAP,MAAoB,yBAApB;AAEA,OAAOC,KAAP,MAAkB,cAAlB,C,CAAkC;;AAClC,OAAOC,IAAP,MAAiB,IAAjB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/clue/test/see-clue.js"],"names":["browserEnv","test","React","mount","configure","Adapter","style","Clue","Provider","defaultFixture","adapter","t","context","skin","translate","key","plan","clueCardStyle","clueCard","flipStyle","flip","loadingStyle","loading","backContentStyle","backContent","clueTextStyle","clueText","onClick","e","pass","wrapper","props","is","find","exists","simulate","preventDefault","stopPropagation","setProps","text","common","primary","backStyle","back","deepEqual","get","backgroundColor","secondary"],"mappings":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C,CAACK,IAAF,CAAO,CAAP;AACA,QAAM0B,SAAS,GAAI,IAAG,SAAQ,GAAR,EAAa,GAAb,EAAkBpC,KAAK,CAACqC,IAAxB,CAA8B,EAApD;AAEA,QAAMb,OAAO,GAAG3B,KAAK,eACnB,oBAAC,QAAD,EAAcS,OAAd,eACE,oBAAC,IAAD,EAAUH,cAAc,CAACsB,KAAzB,CADF,CADmB,CAArB;AAMApB,EAAAA,CAAC,CAACiC,SAAF,CAAYd,OAAO,CAACG,IAAR,CAAaS,SAAb,EAAwBG,GAAxB,CAA4B,CAA5B,EAA+Bd,KAA/B,CAAqCzB,KAAjD,EAAwD;AACtDwC,IAAAA,eAAe,EAAE;AADqC,GAAxD;AAGD,CArBG,CAAJ;AAuBA7C,IAAI,CAAC,8EAAD,EAAiFU,CAAC,IAAI;AACxF,QAAMC,OAAO,GAAG;AACdC,IAAAA,IAAI,EAAE;AACJ2B,MAAAA,MAAM,EAAE;AACNO,QAAAA,SAAS,EAAE;AADL;AADJ,KADQ;AAMdjC,IAAAA,SAAS,EAAEC,GAAG,IAAIA;AANJ,GAAhB;AAQAJ,EAAAA,CAAC,CAACK,IAAF,CAAO,CAAP;AACA,QAAM0B,SAAS,GAAI,IAAG,SAAQ,GAAR,EAAa,GAAb,EAAkBpC,KAAK,CAACqC,IAAxB,CAA8B,EAApD;AAEA,QAAMb,OAAO,GAAG3B,KAAK,eACnB,oBAAC,QAAD,EAAcS,OAAd,eACE,oBAAC,IAAD,EAAUH,cAAc,CAACsB,KAAzB,CADF,CADmB,CAArB;AAMApB,EAAAA,CAAC,CAACiC,SAAF,CAAYd,OAAO,CAACG,IAAR,CAAaS,SAAb,EAAwBG,GAAxB,CAA4B,CAA5B,EAA+Bd,KAA/B,CAAqCzB,KAAjD,EAAwD;AACtDwC,IAAAA,eAAe,EAAE;AADqC,GAAxD;AAGD,CArBG,CAAJ","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {mount, configure} from 'enzyme';\nimport Adapter from 'enzyme-adapter-react-16';\nimport {replace} from 'lodash/fp';\nimport style from '../style.css'; // eslint-disable-line css-modules/no-unused-class\nimport Clue from '..';\nimport Provider from '../../provider';\nimport defaultFixture from './fixtures/default';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\n\ntest('should See the clue', t => {\n const context = {\n skin: {},\n translate: key => key\n };\n t.plan(16);\n\n const clueCardStyle = `.${replace(' ', '.', style.clueCard)}`;\n const flipStyle = `.${replace(' ', '.', style.flip)}`;\n\n const loadingStyle = `.${replace(' ', '.', style.loading)}`;\n const backContentStyle = `.${replace(' ', '.', style.backContent)}`;\n\n const clueTextStyle = `.${replace(' ', '.', style.clueText)}`;\n\n const onClick = e => {\n t.pass();\n };\n\n const wrapper = mount(<Clue {...defaultFixture.props} onClick={onClick} />, {context});\n\n t.is(wrapper.find(clueCardStyle).exists(), true);\n t.is(wrapper.find(flipStyle).exists(), false);\n t.is(wrapper.find(loadingStyle).exists(), false);\n t.is(wrapper.find(backContentStyle).exists(), true);\n\n wrapper.find('a').simulate('click', {\n preventDefault: () => {},\n stopPropagation: () => {}\n });\n\n t.is(wrapper.find(clueCardStyle).exists(), true);\n t.is(wrapper.find(flipStyle).exists(), false);\n t.is(wrapper.find(loadingStyle).exists(), true);\n t.is(wrapper.find(backContentStyle).exists(), true);\n\n wrapper.setProps({text: 'This is the clue ...'});\n\n t.is(wrapper.find(clueTextStyle).text(), 'This is the clue ...');\n\n t.is(wrapper.find(clueCardStyle).exists(), true);\n t.is(wrapper.find(flipStyle).exists(), true);\n t.is(wrapper.find(loadingStyle).exists(), false);\n t.is(wrapper.find(backContentStyle).exists(), true);\n\n wrapper.setProps({text: ''});\n\n t.is(wrapper.find(clueTextStyle).text(), '');\n\n wrapper.setProps({text: 'This is the new clue ...'});\n\n t.is(wrapper.find(clueTextStyle).text(), 'This is the new clue ...');\n});\n\ntest('should clue color is the primary color if color is defined on skin', t => {\n const context = {\n skin: {\n common: {\n primary: '#FF0000'\n }\n },\n translate: key => key\n };\n t.plan(1);\n const backStyle = `.${replace(' ', '.', style.back)}`;\n\n const wrapper = mount(\n <Provider {...context}>\n <Clue {...defaultFixture.props} />\n </Provider>\n );\n\n t.deepEqual(wrapper.find(backStyle).get(0).props.style, {\n backgroundColor: '#FF0000'\n });\n});\n\ntest('should clue color is the fallback primary color if color not defined on skin', t => {\n const context = {\n skin: {\n common: {\n secondary: '#FF0000'\n }\n },\n translate: key => key\n };\n t.plan(1);\n const backStyle = `.${replace(' ', '.', style.back)}`;\n\n const wrapper = mount(\n <Provider {...context}>\n <Clue {...defaultFixture.props} />\n </Provider>\n );\n\n t.deepEqual(wrapper.find(backStyle).get(0).props.style, {\n backgroundColor: '#00B0FF'\n });\n});\n"],"file":"see-clue.js"}
|
|
@@ -6,6 +6,7 @@ import fixtureAdvanced from './fixtures/advanced';
|
|
|
6
6
|
import fixtureArticle from './fixtures/article';
|
|
7
7
|
import fixtureChapter from './fixtures/chapter';
|
|
8
8
|
import fixtureCoach from './fixtures/coach';
|
|
9
|
+
import fixtureCourse from './fixtures/course';
|
|
9
10
|
import fixtureDefault from './fixtures/default';
|
|
10
11
|
import fixturePodcast from './fixtures/podcast';
|
|
11
12
|
import fixtureScorm from './fixtures/scorm';
|
|
@@ -20,6 +21,7 @@ test('Atom › AtomContentBadge › Advanced › should be rendered', renderComp
|
|
|
20
21
|
test('Atom › AtomContentBadge › Article › should be rendered', renderComponentMacro, AtomContentBadge, fixtureArticle);
|
|
21
22
|
test('Atom › AtomContentBadge › Chapter › should be rendered', renderComponentMacro, AtomContentBadge, fixtureChapter);
|
|
22
23
|
test('Atom › AtomContentBadge › Coach › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCoach);
|
|
24
|
+
test('Atom › AtomContentBadge › Course › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCourse);
|
|
23
25
|
test('Atom › AtomContentBadge › Default › should be rendered', renderComponentMacro, AtomContentBadge, fixtureDefault);
|
|
24
26
|
test('Atom › AtomContentBadge › Podcast › should be rendered', renderComponentMacro, AtomContentBadge, fixturePodcast);
|
|
25
27
|
test('Atom › AtomContentBadge › Scorm › should be rendered', renderComponentMacro, AtomContentBadge, fixtureScorm);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/content-badge/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomContentBadge","fixtureAdvanced","fixtureArticle","fixtureChapter","fixtureCoach","fixtureDefault","fixturePodcast","fixtureScorm","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,gBAAP,MAA6B,IAA7B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/content-badge/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomContentBadge","fixtureAdvanced","fixtureArticle","fixtureChapter","fixtureCoach","fixtureCourse","fixtureDefault","fixturePodcast","fixtureScorm","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,gBAAP,MAA6B,IAA7B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAA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ach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomContentBadge from '..';\nimport fixtureAdvanced from './fixtures/advanced';\nimport fixtureArticle from './fixtures/article';\nimport fixtureChapter from './fixtures/chapter';\nimport fixtureCoach from './fixtures/coach';\nimport fixtureCourse from './fixtures/course';\nimport fixtureDefault from './fixtures/default';\nimport fixturePodcast from './fixtures/podcast';\nimport fixtureScorm from './fixtures/scorm';\nimport fixtureVideo from './fixtures/video';\n\ntest('Atom › AtomContentBadge > should have valid propTypes', t => {\n t.pass();\n forEach(AtomContentBadge.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomContentBadge.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomContentBadge › Advanced › should be rendered', renderComponentMacro, AtomContentBadge, fixtureAdvanced);\ntest('Atom › AtomContentBadge › Article › should be rendered', renderComponentMacro, AtomContentBadge, fixtureArticle);\ntest('Atom › AtomContentBadge › Chapter › should be rendered', renderComponentMacro, AtomContentBadge, fixtureChapter);\ntest('Atom › AtomContentBadge › Coach › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCoach);\ntest('Atom › AtomContentBadge › Course › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCourse);\ntest('Atom › AtomContentBadge › Default › should be rendered', renderComponentMacro, AtomContentBadge, fixtureDefault);\ntest('Atom › AtomContentBadge › Podcast › should be rendered', renderComponentMacro, AtomContentBadge, fixturePodcast);\ntest('Atom › AtomContentBadge › Scorm › should be rendered', renderComponentMacro, AtomContentBadge, fixtureScorm);\ntest('Atom › AtomContentBadge › Video › should be rendered', renderComponentMacro, AtomContentBadge, fixtureVideo);\n"],"file":"fixtures.js"}
|
|
@@ -3,6 +3,11 @@ import forEach from 'lodash/forEach';
|
|
|
3
3
|
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
4
|
import AtomInputSwitch from '..';
|
|
5
5
|
import fixtureChecked from './fixtures/checked';
|
|
6
|
+
import fixtureCmLeft from './fixtures/cm-left';
|
|
7
|
+
import fixtureCmRightChecked from './fixtures/cm-right-checked';
|
|
8
|
+
import fixtureCmRightDisabled from './fixtures/cm-right-disabled';
|
|
9
|
+
import fixtureCmRightModified from './fixtures/cm-right-modified';
|
|
10
|
+
import fixtureCmRight from './fixtures/cm-right';
|
|
6
11
|
import fixtureDisabled from './fixtures/disabled';
|
|
7
12
|
import fixtureModified from './fixtures/modified';
|
|
8
13
|
import fixtureNoTitle from './fixtures/no-title';
|
|
@@ -15,6 +20,11 @@ test('Atom › AtomInputSwitch > should have valid propTypes', t => {
|
|
|
15
20
|
});
|
|
16
21
|
});
|
|
17
22
|
test('Atom › AtomInputSwitch › Checked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureChecked);
|
|
23
|
+
test('Atom › AtomInputSwitch › CmLeft › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmLeft);
|
|
24
|
+
test('Atom › AtomInputSwitch › CmRightChecked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightChecked);
|
|
25
|
+
test('Atom › AtomInputSwitch › CmRightDisabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightDisabled);
|
|
26
|
+
test('Atom › AtomInputSwitch › CmRightModified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightModified);
|
|
27
|
+
test('Atom › AtomInputSwitch › CmRight › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRight);
|
|
18
28
|
test('Atom › AtomInputSwitch › Disabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureDisabled);
|
|
19
29
|
test('Atom › AtomInputSwitch › Modified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureModified);
|
|
20
30
|
test('Atom › AtomInputSwitch › NoTitle › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureNoTitle);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/input-switch/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputSwitch","fixtureChecked","fixtureDisabled","fixtureModified","fixtureNoTitle","fixtureSso","fixtureUnchecked","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,eAAP,MAA4B,IAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,qBAA3B;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/input-switch/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputSwitch","fixtureChecked","fixtureCmLeft","fixtureCmRightChecked","fixtureCmRightDisabled","fixtureCmRightModified","fixtureCmRight","fixtureDisabled","fixtureModified","fixtureNoTitle","fixtureSso","fixtureUnchecked","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,eAAP,MAA4B,IAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,oBAA1B;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AACA,OAAOC,sBAAP,MAAmC,8BAAnC;AACA,OAAOC,sBAAP,MAAmC,8BAAnC;AACA,OAAOC,cAAP,MAA2B,qBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,qBAA3B;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AAEAd,IAAI,CAAC,s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pers/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"}
|
|
@@ -2,6 +2,7 @@ import test from 'ava';
|
|
|
2
2
|
import forEach from 'lodash/forEach';
|
|
3
3
|
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
4
|
import AtomLoader from '..';
|
|
5
|
+
import fixtureCoorpmanager from './fixtures/coorpmanager';
|
|
5
6
|
import fixtureDefault from './fixtures/default';
|
|
6
7
|
test('Atom › AtomLoader > should have valid propTypes', t => {
|
|
7
8
|
t.pass();
|
|
@@ -9,5 +10,6 @@ test('Atom › AtomLoader > should have valid propTypes', t => {
|
|
|
9
10
|
t.not(value, undefined, `PropType for "Atom.AtomLoader.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
10
11
|
});
|
|
11
12
|
});
|
|
13
|
+
test('Atom › AtomLoader › Coorpmanager › should be rendered', renderComponentMacro, AtomLoader, fixtureCoorpmanager);
|
|
12
14
|
test('Atom › AtomLoader › Default › should be rendered', renderComponentMacro, AtomLoader, fixtureDefault);
|
|
13
15
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/loader/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomLoader","fixtureDefault","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,UAAP,MAAuB,IAAvB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/loader/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomLoader","fixtureCoorpmanager","fixtureDefault","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,UAAP,MAAuB,IAAvB;AACA,OAAOC,mBAAP,MAAgC,yBAAhC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAL,IAAI,CAAC,iDAAD,EAAoDM,CAAC,IAAI;AAC3DA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,UAAU,CAACK,SAAZ,EAAuB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC5CJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2CAA0CF,GAAI,mEAAvE;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,UAAhF,EAA4FC,mBAA5F,CAAJ;AACAJ,IAAI,CAAC,kDAAD,EAAqDE,oBAArD,EAA2EC,UAA3E,EAAuFE,cAAvF,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomLoader from '..';\nimport fixtureCoorpmanager from './fixtures/coorpmanager';\nimport fixtureDefault from './fixtures/default';\n\ntest('Atom › AtomLoader > should have valid propTypes', t => {\n t.pass();\n forEach(AtomLoader.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomLoader.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomLoader › Coorpmanager › should be rendered', renderComponentMacro, AtomLoader, fixtureCoorpmanager);\ntest('Atom › AtomLoader › Default › should be rendered', renderComponentMacro, AtomLoader, fixtureDefault);\n"],"file":"fixtures.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/provider/index.js"],"names":["React","PropTypes","SrcPropType","ColorPropType","HexPropType","DEFAULT_SKIN","common","good","bad","primary","life","brand","primaryAdd1","primaryAdd2","primaryAdd3","primaryAdd4","xtraLightGrey","light","medium","dark","grey","orangeAdd","orange","positive","lightGreen","negative","battle","white","black","mergeSkin","skin","historyShape","shape","createHref","func","push","skinShape","objectOf","images","logo","login","icons","mod","courses","arrayOf","texts","translateShape","Provider","Component","getDerivedStateFromProps","props","history","translate","constructor","context","Vimeo","state","getChildContext","render","children","Children","only","isRequired","object","propTypes","node"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,WAAR,EAAqBC,aAArB,EAAoCC,WAApC,QAAsD,sBAAtD;AAEA,MAAMC,YAAY,GAAG;AACnBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,IAAI,EAAE,SADA;AAENC,IAAAA,GAAG,EAAE,SAFC;AAGNC,IAAAA,OAAO,EAAE,SAHH;AAINC,IAAAA,IAAI,EAAE,SAJA;AAKNC,IAAAA,KAAK,EAAE,SALD;AAMNC,IAAAA,WAAW,EAAE,SANP;AAONC,IAAAA,WAAW,EAAE,SAPP;AAQNC,IAAAA,WAAW,EAAE,SARP;AASNC,IAAAA,WAAW,EAAE,SATP;AAUNC,IAAAA,aAAa,EAAE,SAVT;AAWNC,IAAAA,KAAK,EAAE,SAXD;AAYNC,IAAAA,MAAM,EAAE,SAZF;AAaNC,IAAAA,IAAI,EAAE,SAbA;AAcNC,IAAAA,IAAI,EAAE,SAdA;AAeNC,IAAAA,SAAS,EAAE,SAfL;AAgBNC,IAAAA,MAAM,EAAE,SAhBF;AAiBNC,IAAAA,QAAQ,EAAE,SAjBJ;AAkBNC,IAAAA,UAAU,EAAE,SAlBN;AAmBNC,IAAAA,QAAQ,EAAE,SAnBJ;AAoBNC,IAAAA,MAAM,EAAE,SApBF;AAqBNC,IAAAA,KAAK,EAAE,SArBD;AAsBNC,IAAAA,KAAK,EAAE;AAtBD;AADW,CAArB;;AA2BA,MAAMC,SAAS,GAAG,CAACC,IAAI,GAAG,EAAR,KAAe,
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/provider/index.js"],"names":["React","PropTypes","SrcPropType","ColorPropType","HexPropType","DEFAULT_SKIN","common","good","bad","primary","life","brand","primaryAdd1","primaryAdd2","primaryAdd3","primaryAdd4","xtraLightGrey","light","medium","dark","grey","orangeAdd","orange","positive","lightGreen","negative","battle","white","black","mergeSkin","skin","historyShape","shape","createHref","func","push","skinShape","objectOf","images","logo","login","icons","mod","courses","arrayOf","texts","translateShape","Provider","Component","getDerivedStateFromProps","props","history","translate","constructor","context","Vimeo","state","getChildContext","render","children","Children","only","isRequired","object","propTypes","node"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,WAAR,EAAqBC,aAArB,EAAoCC,WAApC,QAAsD,sBAAtD;AAEA,MAAMC,YAAY,GAAG;AACnBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,IAAI,EAAE,SADA;AAENC,IAAAA,GAAG,EAAE,SAFC;AAGNC,IAAAA,OAAO,EAAE,SAHH;AAINC,IAAAA,IAAI,EAAE,SAJA;AAKNC,IAAAA,KAAK,EAAE,SALD;AAMNC,IAAAA,WAAW,EAAE,SANP;AAONC,IAAAA,WAAW,EAAE,SAPP;AAQNC,IAAAA,WAAW,EAAE,SARP;AASNC,IAAAA,WAAW,EAAE,SATP;AAUNC,IAAAA,aAAa,EAAE,SAVT;AAWNC,IAAAA,KAAK,EAAE,SAXD;AAYNC,IAAAA,MAAM,EAAE,SAZF;AAaNC,IAAAA,IAAI,EAAE,SAbA;AAcNC,IAAAA,IAAI,EAAE,SAdA;AAeNC,IAAAA,SAAS,EAAE,SAfL;AAgBNC,IAAAA,MAAM,EAAE,SAhBF;AAiBNC,IAAAA,QAAQ,EAAE,SAjBJ;AAkBNC,IAAAA,UAAU,EAAE,SAlBN;AAmBNC,IAAAA,QAAQ,EAAE,SAnBJ;AAoBNC,IAAAA,MAAM,EAAE,SApBF;AAqBNC,IAAAA,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ropTypes from 'prop-types';\nimport {defaultsDeep} from 'lodash/fp';\nimport {SrcPropType, ColorPropType, HexPropType} from '../../util/proptypes';\n\nconst DEFAULT_SKIN = {\n common: {\n good: '#24b694',\n bad: '#ed1c24',\n primary: '#00B0FF',\n life: '#ed1c24',\n brand: '#00B0FF',\n primaryAdd1: '#B3E5FC',\n primaryAdd2: '#0091EA',\n primaryAdd3: '#0277BD',\n primaryAdd4: '#015798',\n xtraLightGrey: '#FAFAFA',\n light: '#ECEFF1',\n medium: '#90A4AE',\n dark: '#546E7A',\n grey: '#607D8B',\n orangeAdd: '#FF7043',\n orange: '#FFA000',\n positive: '#3EC483',\n lightGreen: '#66BB6A',\n negative: '#F73F52',\n battle: '#FFE100',\n white: '#FFFFFF',\n black: '#14171A'\n }\n};\n\nconst mergeSkin = (skin = {}) => defaultsDeep(DEFAULT_SKIN, skin);\n\nconst historyShape = PropTypes.shape({\n createHref: PropTypes.func,\n push: PropTypes.func\n});\n\nconst skinShape = PropTypes.shape({\n common: PropTypes.objectOf(ColorPropType),\n images: PropTypes.shape({\n 'logo-mobile': SrcPropType,\n logo: SrcPropType,\n 'logo-email': SrcPropType,\n login: SrcPropType\n }),\n icons: PropTypes.objectOf(HexPropType),\n mod: PropTypes.objectOf(ColorPropType),\n courses: PropTypes.arrayOf(ColorPropType),\n texts: PropTypes.objectOf(ColorPropType)\n});\n\nconst translateShape = PropTypes.func;\n\nclass Provider extends React.Component {\n static propTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape,\n children: PropTypes.node.isRequired,\n Vimeo: PropTypes.shape({\n common: PropTypes.func\n })\n };\n\n static childContextTypes = {\n history: historyShape,\n skin: skinShape,\n translate: translateShape.isRequired,\n Vimeo: PropTypes.object\n };\n\n static getDerivedStateFromProps(props) {\n const {history, skin, translate} = props;\n\n return {\n history,\n skin: mergeSkin(skin),\n translate\n };\n }\n\n constructor(props, context) {\n super(props, context);\n const {history, skin, translate, Vimeo} = props;\n // eslint-disable-next-line react/no-unused-state\n this.state = {history, skin: mergeSkin(skin), translate, Vimeo};\n }\n\n getChildContext() {\n return this.state;\n }\n\n render() {\n const {children} = this.props;\n return React.Children.only(children);\n }\n}\n\nexport default Provider;\n"],"file":"index.js"}
|
|
@@ -2,7 +2,7 @@ export default {
|
|
|
2
2
|
props: {
|
|
3
3
|
type: 'warning',
|
|
4
4
|
message: 'Changes saved but not published. Do you want to update this custom playlist now? ',
|
|
5
|
-
firstCTALabel: '
|
|
5
|
+
firstCTALabel: 'Delete all changes',
|
|
6
6
|
firstCTA: () => console.log('first cta'),
|
|
7
7
|
secondCTALabel: 'Update',
|
|
8
8
|
secondCTA: () => console.log('second cta')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/banner/test/fixtures/default.js"],"names":["props","type","message","firstCTALabel","firstCTA","console","log","secondCTALabel","secondCTA"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,SADD;AAELC,IAAAA,OAAO,EAAE,mFAFJ;AAGLC,IAAAA,aAAa,EAAE,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/banner/test/fixtures/default.js"],"names":["props","type","message","firstCTALabel","firstCTA","console","log","secondCTALabel","secondCTA"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,SADD;AAELC,IAAAA,OAAO,EAAE,mFAFJ;AAGLC,IAAAA,aAAa,EAAE,oBAHV;AAILC,IAAAA,QAAQ,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,WAAZ,CAJX;AAKLC,IAAAA,cAAc,EAAE,QALX;AAMLC,IAAAA,SAAS,EAAE,MAAMH,OAAO,CAACC,GAAR,CAAY,YAAZ;AANZ;AADM,CAAf","sourcesContent":["export default {\n props: {\n type: 'warning',\n message: 'Changes saved but not published. Do you want to update this custom playlist now? ',\n firstCTALabel: 'Delete all changes',\n firstCTA: () => console.log('first cta'),\n secondCTALabel: 'Update',\n secondCTA: () => console.log('second cta')\n }\n};\n"],"file":"default.js"}
|
|
@@ -4,6 +4,10 @@ import renderComponentMacro from '../../../test/helpers/render-component';
|
|
|
4
4
|
import MoleculeBanner from '..';
|
|
5
5
|
import fixtureDefault from './fixtures/default';
|
|
6
6
|
import fixtureErrorBanner from './fixtures/error-banner';
|
|
7
|
+
import fixtureErrorTemporaryBanner from './fixtures/error-temporary-banner';
|
|
8
|
+
import fixtureSuccessBanner from './fixtures/success-banner';
|
|
9
|
+
import fixtureSuccessTemporaryBanner from './fixtures/success-temporary-banner';
|
|
10
|
+
import fixtureWarningTemporaryBanner from './fixtures/warning-temporary-banner';
|
|
7
11
|
test('Molecule › MoleculeBanner > should have valid propTypes', t => {
|
|
8
12
|
t.pass();
|
|
9
13
|
forEach(MoleculeBanner.propTypes, (value, key) => {
|
|
@@ -12,4 +16,8 @@ test('Molecule › MoleculeBanner > should have valid propTypes', t => {
|
|
|
12
16
|
});
|
|
13
17
|
test('Molecule › MoleculeBanner › Default › should be rendered', renderComponentMacro, MoleculeBanner, fixtureDefault);
|
|
14
18
|
test('Molecule › MoleculeBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorBanner);
|
|
19
|
+
test('Molecule › MoleculeBanner › ErrorTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorTemporaryBanner);
|
|
20
|
+
test('Molecule › MoleculeBanner › SuccessBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessBanner);
|
|
21
|
+
test('Molecule › MoleculeBanner › SuccessTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessTemporaryBanner);
|
|
22
|
+
test('Molecule › MoleculeBanner › WarningTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureWarningTemporaryBanner);
|
|
15
23
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/banner/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeBanner","fixtureDefault","fixtureErrorBanner","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,kBAAP,MAA+B,yBAA/B;
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/banner/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeBanner","fixtureDefault","fixtureErrorBanner","fixtureErrorTemporaryBanner","fixtureSuccessBanner","fixtureSuccessTemporaryBanner","fixtureWarningTemporaryBanner","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,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,2BAAP,MAAwC,mCAAxC;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,OAAOC,6BAAP,MAA0C,qCAA1C;AACA,OAAOC,6BAAP,MAA0C,qCAA1C;AAEAT,IAAI,CAAC,yDAAD,EAA4DU,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,cAAc,CAACS,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;AAOAd,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,cAAnF,EAAmGC,cAAnG,CAAJ;AACAJ,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,cAAvF,EAAuGE,kBAAvG,CAAJ;AACAL,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,cAAhG,EAAgHG,2BAAhH,CAAJ;AACAN,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,cAAzF,EAAyGI,oBAAzG,CAAJ;AACAP,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,cAAlG,EAAkHK,6BAAlH,CAAJ;AACAR,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,cAAlG,EAAkHM,6BAAlH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeBanner from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureErrorBanner from './fixtures/error-banner';\nimport fixtureErrorTemporaryBanner from './fixtures/error-temporary-banner';\nimport fixtureSuccessBanner from './fixtures/success-banner';\nimport fixtureSuccessTemporaryBanner from './fixtures/success-temporary-banner';\nimport fixtureWarningTemporaryBanner from './fixtures/warning-temporary-banner';\n\ntest('Molecule › MoleculeBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeBanner › Default › should be rendered', renderComponentMacro, MoleculeBanner, fixtureDefault);\ntest('Molecule › MoleculeBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorBanner);\ntest('Molecule › MoleculeBanner › ErrorTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorTemporaryBanner);\ntest('Molecule › MoleculeBanner › SuccessBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessBanner);\ntest('Molecule › MoleculeBanner › SuccessTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessTemporaryBanner);\ntest('Molecule › MoleculeBanner › WarningTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureWarningTemporaryBanner);\n"],"file":"fixtures.js"}
|
|
@@ -3,33 +3,91 @@
|
|
|
3
3
|
@value colors: "../../variables/colors.css";
|
|
4
4
|
@value white from colors;
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.default {
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-wrap: wrap;
|
|
9
9
|
justify-content: center;
|
|
10
|
-
padding: 12px 12px 0;
|
|
11
10
|
width: 100%;
|
|
12
11
|
font-family: 'Open Sans';
|
|
13
12
|
box-sizing: border-box;
|
|
14
13
|
text-align: center;
|
|
15
14
|
color: white;
|
|
16
15
|
text-transform: uppercase;
|
|
17
|
-
font-size: 12px;
|
|
18
16
|
text-shadow: 0 0 4px rgba(0, 0, 0, 0.75);
|
|
19
17
|
user-select: none;
|
|
20
18
|
}
|
|
21
19
|
|
|
20
|
+
.customer[disabled] {
|
|
21
|
+
background: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.content {
|
|
25
|
+
composes: default;
|
|
26
|
+
padding: 12px 12px 0;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.coorpmanager .content {
|
|
31
|
+
padding: 8px 12px 0;
|
|
32
|
+
font-size: 8px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.customer {
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.customer {
|
|
44
|
+
background: linear-gradient(
|
|
45
|
+
to bottom,
|
|
46
|
+
rgba(0, 0, 0, 0.2) 0%,
|
|
47
|
+
rgba(0, 0, 0, 0) 20%
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
.chapterCustomer {
|
|
51
|
+
padding-top: 10px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.coorpmanager.customer.chapterCustomer {
|
|
55
|
+
padding-top: 0px;
|
|
56
|
+
}
|
|
57
|
+
|
|
22
58
|
.coorp,
|
|
23
59
|
.original {
|
|
24
60
|
letter-spacing: 3px;
|
|
25
61
|
}
|
|
26
62
|
|
|
63
|
+
.coorpmanager .coorp {
|
|
64
|
+
letter-spacing: 2px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.coorpmanager.customer.chapterCustomer .coorp {
|
|
68
|
+
letter-spacing: 1px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.coorpmanager .original {
|
|
72
|
+
letter-spacing: 2px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.coorpmanager.customer.chapterCustomer .original {
|
|
76
|
+
letter-spacing: 1px;
|
|
77
|
+
}
|
|
78
|
+
|
|
27
79
|
.coorp {
|
|
28
80
|
font-weight: 100;
|
|
29
81
|
margin-right: 5px;
|
|
30
82
|
letter-spacing: 4px;
|
|
31
83
|
}
|
|
32
84
|
|
|
85
|
+
.coorpmanager .coorp {
|
|
86
|
+
font-weight: 100;
|
|
87
|
+
margin-right: 5px;
|
|
88
|
+
letter-spacing: 2px;
|
|
89
|
+
}
|
|
90
|
+
|
|
33
91
|
.original {
|
|
34
92
|
font-weight: 600;
|
|
35
93
|
}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
+
import _keys from "lodash/fp/keys";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
4
|
+
import classnames from 'classnames';
|
|
3
5
|
import style from './customer.css';
|
|
6
|
+
export const THEMES = {
|
|
7
|
+
default: null,
|
|
8
|
+
coorpmanager: style.coorpmanager
|
|
9
|
+
};
|
|
4
10
|
|
|
5
11
|
const Customer = props => {
|
|
6
12
|
const {
|
|
7
13
|
name,
|
|
8
|
-
|
|
9
|
-
coorpOriginal
|
|
14
|
+
type,
|
|
15
|
+
coorpOriginal,
|
|
16
|
+
theme,
|
|
17
|
+
disabled = false
|
|
10
18
|
} = props;
|
|
19
|
+
const className = classnames(THEMES[theme], style.customer, type === 'chapter' ? style.chapterCustomer : null);
|
|
11
20
|
return /*#__PURE__*/React.createElement("div", {
|
|
12
|
-
className: className
|
|
21
|
+
className: className,
|
|
22
|
+
disabled: disabled
|
|
13
23
|
}, /*#__PURE__*/React.createElement("div", {
|
|
14
24
|
className: style.content
|
|
15
25
|
}, coorpOriginal ? /*#__PURE__*/React.createElement("span", {
|
|
@@ -20,9 +30,11 @@ const Customer = props => {
|
|
|
20
30
|
};
|
|
21
31
|
|
|
22
32
|
Customer.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
23
|
-
|
|
33
|
+
theme: PropTypes.oneOf(_keys(THEMES)),
|
|
34
|
+
type: PropTypes.string,
|
|
24
35
|
name: PropTypes.string,
|
|
25
|
-
coorpOriginal: PropTypes.bool.isRequired
|
|
36
|
+
coorpOriginal: PropTypes.bool.isRequired,
|
|
37
|
+
disabled: PropTypes.bool
|
|
26
38
|
} : {};
|
|
27
39
|
export default Customer;
|
|
28
40
|
//# sourceMappingURL=customer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/card/customer.js"],"names":["React","PropTypes","style","Customer","props","name","
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/card/customer.js"],"names":["React","PropTypes","classnames","style","THEMES","default","coorpmanager","Customer","props","name","type","coorpOriginal","theme","disabled","className","customer","chapterCustomer","content","coorp","original","propTypes","oneOf","string","bool","isRequired"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,KAAP,MAAkB,gBAAlB;AAEA,OAAO,MAAMC,MAAM,GAAG;AACpBC,EAAAA,OAAO,EAAE,IADW;AAEpBC,EAAAA,YAAY,EAAEH,KAAK,CAACG;AAFA,CAAf;;AAKP,MAAMC,QAAQ,GAAGC,KAAK,IAAI;AACxB,QAAM;AAACC,IAAAA,IAAD;AAAOC,IAAAA,IAAP;AAAaC,IAAAA,aAAb;AAA4BC,IAAAA,KAA5B;AAAmCC,IAAAA,QAAQ,GAAG;AAA9C,MAAuDL,KAA7D;AACA,QAAMM,SAAS,GAAGZ,UAAU,CAC1BE,MAAM,CAACQ,KAAD,CADoB,EAE1BT,KAAK,CAACY,QAFoB,EAG1BL,IAAI,KAAK,SAAT,GAAqBP,KAAK,CAACa,eAA3B,GAA6C,IAHnB,CAA5B;AAMA,sBACE;AAAK,IAAA,SAAS,EAAEF,SAAhB;AAA2B,IAAA,QAAQ,EAAED;AAArC,kBACE;AAAK,IAAA,SAAS,EAAEV,KAAK,CAACc;AAAtB,KACGN,aAAa,gBAAG;AAAM,IAAA,SAAS,EAAER,KAAK,CAACe;AAAvB,cAAH,GAAiD,IADjE,EAEGP,aAAa,gBAAG;AAAM,IAAA,SAAS,EAAER,KAAK,CAACgB;AAAvB,iBAAH,GAAuD,IAFvE,EAGG,CAACR,aAAD,IAAkBF,IAHrB,CADF,CADF;AASD,CAjBD;;AAmBAF,QAAQ,CAACa,SAAT,2CAAqB;AACnBR,EAAAA,KAAK,EAAEX,SAAS,CAACoB,KAAV,CAAgB,MAAKjB,MAAL,CAAhB,CADY;AAEnBM,EAAAA,IAAI,EAAET,SAAS,CAACqB,MAFG;AAGnBb,EAAAA,IAAI,EAAER,SAAS,CAACqB,MAHG;AAInBX,EAAAA,aAAa,EAAEV,SAAS,CAACsB,IAAV,CAAeC,UAJX;AAKnBX,EAAAA,QAAQ,EAAEZ,SAAS,CAACsB;AALD,CAArB;AAQA,eAAehB,QAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys} from 'lodash/fp';\nimport style from './customer.css';\n\nexport const THEMES = {\n default: null,\n coorpmanager: style.coorpmanager\n};\n\nconst Customer = props => {\n const {name, type, coorpOriginal, theme, disabled = false} = props;\n const className = classnames(\n THEMES[theme],\n style.customer,\n type === 'chapter' ? style.chapterCustomer : null\n );\n\n return (\n <div className={className} disabled={disabled}>\n <div className={style.content}>\n {coorpOriginal ? <span className={style.coorp}>Coorp </span> : null}\n {coorpOriginal ? <span className={style.original}>Original </span> : null}\n {!coorpOriginal && name}\n </div>\n </div>\n );\n};\n\nCustomer.propTypes = {\n theme: PropTypes.oneOf(keys(THEMES)),\n type: PropTypes.string,\n name: PropTypes.string,\n coorpOriginal: PropTypes.bool.isRequired,\n disabled: PropTypes.bool\n};\n\nexport default Customer;\n"],"file":"customer.js"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _keys from "lodash/fp/keys";
|
|
1
2
|
import _pick from "lodash/fp/pick";
|
|
2
3
|
import _isUndefined from "lodash/fp/isUndefined";
|
|
3
4
|
import _isEmpty from "lodash/fp/isEmpty";
|
|
@@ -17,11 +18,16 @@ import Favorite from './favorite';
|
|
|
17
18
|
import Selectable from './selectable';
|
|
18
19
|
import Notification from './notification';
|
|
19
20
|
import style from './style.css';
|
|
21
|
+
export const THEMES = {
|
|
22
|
+
default: null,
|
|
23
|
+
coorpmanager: style.coorpmanager
|
|
24
|
+
};
|
|
20
25
|
|
|
21
26
|
const CardBackground = ({
|
|
22
27
|
type,
|
|
23
28
|
image,
|
|
24
|
-
empty
|
|
29
|
+
empty,
|
|
30
|
+
theme
|
|
25
31
|
}, {
|
|
26
32
|
skin
|
|
27
33
|
}) => {
|
|
@@ -35,19 +41,19 @@ const CardBackground = ({
|
|
|
35
41
|
const IconType = EXTERNAL_CONTENT_ICONS[type].icon;
|
|
36
42
|
const iconColor = EXTERNAL_CONTENT_ICONS[type].color;
|
|
37
43
|
const backgroundIcon = /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
className: style.externalIconCircleWrapper
|
|
44
|
+
className: classnames(THEMES[theme], style.externalIconCircleWrapper)
|
|
39
45
|
}, /*#__PURE__*/React.createElement(IconType, {
|
|
40
|
-
className: style.externalIcon
|
|
46
|
+
className: classnames(THEMES[theme], style.externalIcon)
|
|
41
47
|
}));
|
|
42
48
|
|
|
43
49
|
if (image) {
|
|
44
50
|
const _backgroundIcon = /*#__PURE__*/React.createElement("div", {
|
|
45
|
-
className: classnames(style.externalIconCircleWrapper, style.externalIconCircleWithImageWrapper),
|
|
51
|
+
className: classnames(THEMES[theme], style.externalIconCircleWrapper, style.externalIconCircleWithImageWrapper),
|
|
46
52
|
style: {
|
|
47
53
|
backgroundColor: iconColor
|
|
48
54
|
}
|
|
49
55
|
}, /*#__PURE__*/React.createElement(IconType, {
|
|
50
|
-
className: style.externalIconWithImage
|
|
56
|
+
className: classnames(THEMES[theme], style.externalIconWithImage)
|
|
51
57
|
}));
|
|
52
58
|
|
|
53
59
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -93,6 +99,7 @@ CardBackground.contextTypes = {
|
|
|
93
99
|
skin: Provider.childContextTypes.skin
|
|
94
100
|
};
|
|
95
101
|
CardBackground.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
102
|
+
theme: PropTypes.oneOf(_keys(THEMES)),
|
|
96
103
|
type: PropTypes.string,
|
|
97
104
|
image: PropTypes.string,
|
|
98
105
|
empty: PropTypes.bool
|
|
@@ -120,7 +127,8 @@ const Card = memo(function Card(props, context) {
|
|
|
120
127
|
isSelected,
|
|
121
128
|
notification,
|
|
122
129
|
badgeCategory,
|
|
123
|
-
badgeLabel
|
|
130
|
+
badgeLabel,
|
|
131
|
+
theme = 'default'
|
|
124
132
|
} = props;
|
|
125
133
|
|
|
126
134
|
const empty = _isEmpty(_pick(['title', 'type', 'author', 'image'], props));
|
|
@@ -129,7 +137,7 @@ const Card = memo(function Card(props, context) {
|
|
|
129
137
|
|
|
130
138
|
const whiteColor = _get('common.white', skin);
|
|
131
139
|
|
|
132
|
-
const cardStyle = classnames(type === 'chapter' ? style.chapter : style.course, title ? null : style.lazy, style.grid, empty ? style.empty : null);
|
|
140
|
+
const cardStyle = classnames(THEMES[theme], type === 'chapter' ? style.chapter : style.course, title ? null : style.lazy, style.grid, empty ? style.empty : null);
|
|
133
141
|
const handleClick = useMemo(() => e => !disabled && onClick(e), [disabled, onClick]);
|
|
134
142
|
const lock = disabled ? /*#__PURE__*/React.createElement(LockIcon, {
|
|
135
143
|
className: style.lockIcon,
|
|
@@ -163,7 +171,8 @@ const Card = memo(function Card(props, context) {
|
|
|
163
171
|
}, /*#__PURE__*/React.createElement(CardBackground, {
|
|
164
172
|
type: type,
|
|
165
173
|
image: image,
|
|
166
|
-
empty: empty
|
|
174
|
+
empty: empty,
|
|
175
|
+
theme: theme
|
|
167
176
|
}), _isUndefined(isSelected) && !_isUndefined(favorite) ? /*#__PURE__*/React.createElement(Favorite, {
|
|
168
177
|
className: style.favorite,
|
|
169
178
|
favorite: favorite,
|
|
@@ -174,7 +183,9 @@ const Card = memo(function Card(props, context) {
|
|
|
174
183
|
}) : null, /*#__PURE__*/React.createElement(Selectable, {
|
|
175
184
|
isSelected: isSelected
|
|
176
185
|
}), notification ? /*#__PURE__*/React.createElement(Notification, notification) : null, customer ? /*#__PURE__*/React.createElement(Customer, _extends({}, customer, {
|
|
177
|
-
|
|
186
|
+
theme: theme,
|
|
187
|
+
type: type,
|
|
188
|
+
disabled: disabled
|
|
178
189
|
})) : null, /*#__PURE__*/React.createElement(CardContentInfo, {
|
|
179
190
|
mode: MODES.CARD,
|
|
180
191
|
adaptiv: adaptiv,
|
|
@@ -186,9 +197,10 @@ const Card = memo(function Card(props, context) {
|
|
|
186
197
|
title: title,
|
|
187
198
|
type: type,
|
|
188
199
|
badgeCategory: badgeCategory,
|
|
189
|
-
badgeLabel: badgeLabel
|
|
200
|
+
badgeLabel: badgeLabel,
|
|
201
|
+
theme: theme
|
|
190
202
|
}), badge ? /*#__PURE__*/React.createElement("div", {
|
|
191
|
-
className: style.badge,
|
|
203
|
+
className: classnames(THEMES[theme], style.badge),
|
|
192
204
|
style: inlineBadgeStyle
|
|
193
205
|
}, badge) : null, disabled ? /*#__PURE__*/React.createElement("div", {
|
|
194
206
|
className: style.lockWrapper
|
|
@@ -216,7 +228,8 @@ Card.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
216
228
|
isSelected: PropTypes.bool,
|
|
217
229
|
notification: PropTypes.shape(Notification.propTypes),
|
|
218
230
|
badgeCategory: CardContentInfo.propTypes.badgeCategory,
|
|
219
|
-
badgeLabel: CardContentInfo.propTypes.badgeLabel
|
|
231
|
+
badgeLabel: CardContentInfo.propTypes.badgeLabel,
|
|
232
|
+
theme: PropTypes.oneOf(_keys(THEMES))
|
|
220
233
|
} : {};
|
|
221
234
|
export default Card;
|
|
222
235
|
//# sourceMappingURL=index.js.map
|