@coorpacademy/components 10.1.8 → 10.1.12-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/button-link/test/fixtures.js +0 -2
- package/es/atom/button-link/test/fixtures.js.map +1 -1
- package/es/atom/button-link-icon-only/test/fixtures.js +21 -0
- package/es/atom/button-link-icon-only/test/fixtures.js.map +1 -0
- package/es/atom/button-menu/test/fixtures.js +15 -0
- package/es/atom/button-menu/test/fixtures.js.map +1 -0
- package/es/atom/empty-search-result/index.js +24 -0
- package/es/atom/empty-search-result/index.js.map +1 -0
- package/es/atom/empty-search-result/style.css +25 -0
- package/es/atom/empty-search-result/test/fixtures/default.js +7 -0
- package/es/atom/empty-search-result/test/fixtures/default.js.map +1 -0
- package/es/atom/empty-search-result/test/fixtures.js +13 -0
- package/es/atom/empty-search-result/test/fixtures.js.map +1 -0
- package/es/atom/input-text/index.js +3 -2
- package/es/atom/input-text/index.js.map +1 -1
- package/es/atom/tag/index.js +3 -2
- package/es/atom/tag/index.js.map +1 -1
- package/es/atom/tag/style.css +5 -1
- package/es/atom/tag/test/fixtures/draft.js +7 -0
- package/es/atom/tag/test/fixtures/draft.js.map +1 -0
- package/es/atom/tag/test/fixtures/{revision.js → revised.js} +2 -2
- package/es/atom/tag/test/fixtures/revised.js.map +1 -0
- package/es/molecule/bullet-point-menu-button/test/fixtures.js +15 -0
- package/es/molecule/bullet-point-menu-button/test/fixtures.js.map +1 -0
- package/es/molecule/vertical-tabs/style.css +2 -2
- package/es/organism/accordion/coorp-manager/index.js +3 -0
- package/es/organism/accordion/coorp-manager/index.js.map +1 -1
- package/es/organism/brand-form/test/fixtures.js +2 -0
- package/es/organism/brand-form/test/fixtures.js.map +1 -1
- package/es/organism/course-selection/index.js +57 -0
- package/es/organism/course-selection/index.js.map +1 -0
- package/es/organism/course-selection/style.css +23 -0
- package/es/organism/course-selection/test/fixtures/default.js +34 -0
- package/es/organism/course-selection/test/fixtures/default.js.map +1 -0
- package/es/organism/course-selection/test/fixtures/empty.js +18 -0
- package/es/organism/course-selection/test/fixtures/empty.js.map +1 -0
- package/es/organism/course-selection/test/fixtures/filtered.js +24 -0
- package/es/organism/course-selection/test/fixtures/filtered.js.map +1 -0
- package/es/organism/course-selection/test/fixtures/sorted-selected.js +31 -0
- package/es/organism/course-selection/test/fixtures/sorted-selected.js.map +1 -0
- package/es/organism/course-selection/test/fixtures/unsorted-selected.js +31 -0
- package/es/organism/course-selection/test/fixtures/unsorted-selected.js.map +1 -0
- package/es/organism/course-selection/test/fixtures.js +21 -0
- package/es/organism/course-selection/test/fixtures.js.map +1 -0
- package/es/organism/playlist-translation/style.css +9 -2
- package/es/organism/search-and-chips-results/index.js +3 -8
- package/es/organism/search-and-chips-results/index.js.map +1 -1
- package/es/organism/search-and-chips-results/style.css +0 -22
- package/es/organism/setup-header/index.js +2 -2
- package/es/organism/setup-header/index.js.map +1 -1
- package/lib/atom/button-link/test/fixtures.js +0 -3
- package/lib/atom/button-link/test/fixtures.js.map +1 -1
- package/lib/atom/button-link-icon-only/test/fixtures.js +34 -0
- package/lib/atom/button-link-icon-only/test/fixtures.js.map +1 -0
- package/lib/atom/button-menu/test/fixtures.js +25 -0
- package/lib/atom/button-menu/test/fixtures.js.map +1 -0
- package/lib/atom/empty-search-result/index.js +34 -0
- package/lib/atom/empty-search-result/index.js.map +1 -0
- package/lib/atom/empty-search-result/style.css +25 -0
- package/lib/atom/empty-search-result/test/fixtures/default.js +12 -0
- package/lib/atom/empty-search-result/test/fixtures/default.js.map +1 -0
- package/lib/atom/empty-search-result/test/fixtures.js +22 -0
- package/lib/atom/empty-search-result/test/fixtures.js.map +1 -0
- package/lib/atom/input-text/index.js +3 -2
- package/lib/atom/input-text/index.js.map +1 -1
- package/lib/atom/tag/index.js +3 -2
- package/lib/atom/tag/index.js.map +1 -1
- package/lib/atom/tag/style.css +5 -1
- package/lib/atom/tag/test/fixtures/draft.js +12 -0
- package/lib/atom/tag/test/fixtures/draft.js.map +1 -0
- package/lib/atom/tag/test/fixtures/{revision.js → revised.js} +2 -2
- package/lib/atom/tag/test/fixtures/revised.js.map +1 -0
- package/lib/molecule/bullet-point-menu-button/test/fixtures.js +25 -0
- package/lib/molecule/bullet-point-menu-button/test/fixtures.js.map +1 -0
- package/lib/molecule/vertical-tabs/style.css +2 -2
- package/lib/organism/accordion/coorp-manager/index.js +4 -0
- package/lib/organism/accordion/coorp-manager/index.js.map +1 -1
- package/lib/organism/brand-form/test/fixtures.js +3 -0
- package/lib/organism/brand-form/test/fixtures.js.map +1 -1
- package/lib/organism/course-selection/index.js +70 -0
- package/lib/organism/course-selection/index.js.map +1 -0
- package/lib/organism/course-selection/style.css +23 -0
- package/lib/organism/course-selection/test/fixtures/default.js +47 -0
- package/lib/organism/course-selection/test/fixtures/default.js.map +1 -0
- package/lib/organism/course-selection/test/fixtures/empty.js +23 -0
- package/lib/organism/course-selection/test/fixtures/empty.js.map +1 -0
- package/lib/organism/course-selection/test/fixtures/filtered.js +36 -0
- package/lib/organism/course-selection/test/fixtures/filtered.js.map +1 -0
- package/lib/organism/course-selection/test/fixtures/sorted-selected.js +44 -0
- package/lib/organism/course-selection/test/fixtures/sorted-selected.js.map +1 -0
- package/lib/organism/course-selection/test/fixtures/unsorted-selected.js +44 -0
- package/lib/organism/course-selection/test/fixtures/unsorted-selected.js.map +1 -0
- package/lib/organism/course-selection/test/fixtures.js +34 -0
- package/lib/organism/course-selection/test/fixtures.js.map +1 -0
- package/lib/organism/playlist-translation/style.css +9 -2
- package/lib/organism/search-and-chips-results/index.js +4 -8
- package/lib/organism/search-and-chips-results/index.js.map +1 -1
- package/lib/organism/search-and-chips-results/style.css +0 -22
- package/lib/organism/setup-header/index.js +2 -2
- package/lib/organism/setup-header/index.js.map +1 -1
- package/package.json +2 -2
- package/es/atom/tag/test/fixtures/revision.js.map +0 -1
- package/lib/atom/tag/test/fixtures/revision.js.map +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
search: {
|
|
4
|
+
title: 'Search...',
|
|
5
|
+
placeholder: 'Search...',
|
|
6
|
+
value: 'Xoxoxo',
|
|
7
|
+
description: 'Type to find the courses',
|
|
8
|
+
onChange: value => console.log(value)
|
|
9
|
+
},
|
|
10
|
+
'courses-selection-aria-label': 'Courses results',
|
|
11
|
+
courses: [],
|
|
12
|
+
emptyMessages: {
|
|
13
|
+
firstMessage: 'No results...',
|
|
14
|
+
secondMessage: 'Try something else'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=empty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/empty.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","courses","emptyMessages","firstMessage","secondMessage"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,QAHD;AAINC,MAAAA,WAAW,EAAE,0BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,EATJ;AAULC,IAAAA,aAAa,EAAE;AACbC,MAAAA,YAAY,EAAE,eADD;AAEbC,MAAAA,aAAa,EAAE;AAFF;AAVV;AADM,CAAf","sourcesContent":["export default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: 'Xoxoxo',\n description: 'Type to find the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [],\n emptyMessages: {\n firstMessage: 'No results...',\n secondMessage: 'Try something else'\n }\n }\n};\n"],"file":"empty.js"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';
|
|
4
|
+
import SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';
|
|
5
|
+
import Article from '../../../../molecule/card/test/fixtures/article';
|
|
6
|
+
import Scorm from '../../../../molecule/card/test/fixtures/scorm';
|
|
7
|
+
export default {
|
|
8
|
+
props: {
|
|
9
|
+
search: {
|
|
10
|
+
title: 'Search...',
|
|
11
|
+
placeholder: 'Search...',
|
|
12
|
+
value: 'from',
|
|
13
|
+
description: 'Type to filter the courses',
|
|
14
|
+
onChange: value => console.log(value)
|
|
15
|
+
},
|
|
16
|
+
'courses-selection-aria-label': 'Courses results',
|
|
17
|
+
courses: [SelectedCard.props, _extends(_extends({}, Scorm.props), {}, {
|
|
18
|
+
isSelected: true
|
|
19
|
+
}), SelectedCard.props, UnSelectedCard.props, _extends(_extends({}, Article.props), {}, {
|
|
20
|
+
isSelected: false
|
|
21
|
+
})]
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=filtered.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/filtered.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","props","search","title","placeholder","value","description","onChange","console","log","courses","isSelected"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,MAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPZ,YAAY,CAACG,KADN,wBAEHD,KAAK,CAACC,KAFH;AAEUU,MAAAA,UAAU,EAAE;AAFtB,QAGPb,YAAY,CAACG,KAHN,EAIPJ,cAAc,CAACI,KAJR,wBAKHF,OAAO,CAACE,KALL;AAKYU,MAAAA,UAAU,EAAE;AALxB;AATJ;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';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: 'from',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false}\n ]\n }\n};\n"],"file":"filtered.js"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';
|
|
4
|
+
import SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';
|
|
5
|
+
import Article from '../../../../molecule/card/test/fixtures/article';
|
|
6
|
+
import Scorm from '../../../../molecule/card/test/fixtures/scorm';
|
|
7
|
+
import ExternalContent from '../../../../molecule/card/test/fixtures/external-content';
|
|
8
|
+
export default {
|
|
9
|
+
props: {
|
|
10
|
+
search: {
|
|
11
|
+
title: 'Search...',
|
|
12
|
+
placeholder: 'Search...',
|
|
13
|
+
value: '',
|
|
14
|
+
description: 'Type to filter the courses',
|
|
15
|
+
onChange: value => console.log(value)
|
|
16
|
+
},
|
|
17
|
+
'courses-selection-aria-label': 'Courses results',
|
|
18
|
+
courses: [SelectedCard.props, _extends(_extends({}, Scorm.props), {}, {
|
|
19
|
+
isSelected: true
|
|
20
|
+
}), SelectedCard.props, UnSelectedCard.props, _extends(_extends({}, Article.props), {}, {
|
|
21
|
+
isSelected: false
|
|
22
|
+
}), _extends(_extends({}, UnSelectedCard.props), {}, {
|
|
23
|
+
isSelected: false
|
|
24
|
+
}), _extends(_extends({}, ExternalContent.props), {}, {
|
|
25
|
+
isSelected: false
|
|
26
|
+
}), _extends(_extends({}, Scorm.props), {}, {
|
|
27
|
+
isSelected: false
|
|
28
|
+
})]
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=sorted-selected.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/sorted-selected.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","ExternalContent","props","search","title","placeholder","value","description","onChange","console","log","courses","isSelected"],"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;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPb,YAAY,CAACI,KADN,wBAEHF,KAAK,CAACE,KAFH;AAEUU,MAAAA,UAAU,EAAE;AAFtB,QAGPd,YAAY,CAACI,KAHN,EAIPL,cAAc,CAACK,KAJR,wBAKHH,OAAO,CAACG,KALL;AAKYU,MAAAA,UAAU,EAAE;AALxB,8BAMHf,cAAc,CAACK,KANZ;AAMmBU,MAAAA,UAAU,EAAE;AAN/B,8BAOHX,eAAe,CAACC,KAPb;AAOoBU,MAAAA,UAAU,EAAE;AAPhC,8BAQHZ,KAAK,CAACE,KARH;AAQUU,MAAAA,UAAU,EAAE;AARtB;AATJ;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';\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 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false},\n {...UnSelectedCard.props, isSelected: false},\n {...ExternalContent.props, isSelected: false},\n {...Scorm.props, isSelected: false}\n ]\n }\n};\n"],"file":"sorted-selected.js"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';
|
|
4
|
+
import SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';
|
|
5
|
+
import Article from '../../../../molecule/card/test/fixtures/article';
|
|
6
|
+
import Scorm from '../../../../molecule/card/test/fixtures/scorm';
|
|
7
|
+
import ExternalContent from '../../../../molecule/card/test/fixtures/external-content';
|
|
8
|
+
export default {
|
|
9
|
+
props: {
|
|
10
|
+
search: {
|
|
11
|
+
title: 'Search...',
|
|
12
|
+
placeholder: 'Search...',
|
|
13
|
+
value: '',
|
|
14
|
+
description: 'Type to filter the courses',
|
|
15
|
+
onChange: value => console.log(value)
|
|
16
|
+
},
|
|
17
|
+
'courses-selection-aria-label': 'Courses results',
|
|
18
|
+
courses: [SelectedCard.props, UnSelectedCard.props, _extends(_extends({}, Article.props), {}, {
|
|
19
|
+
isSelected: false
|
|
20
|
+
}), SelectedCard.props, _extends(_extends({}, Scorm.props), {}, {
|
|
21
|
+
isSelected: true
|
|
22
|
+
}), _extends(_extends({}, UnSelectedCard.props), {}, {
|
|
23
|
+
isSelected: false
|
|
24
|
+
}), _extends(_extends({}, ExternalContent.props), {}, {
|
|
25
|
+
isSelected: false
|
|
26
|
+
}), _extends(_extends({}, Scorm.props), {}, {
|
|
27
|
+
isSelected: false
|
|
28
|
+
})]
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=unsorted-selected.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/unsorted-selected.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","ExternalContent","props","search","title","placeholder","value","description","onChange","console","log","courses","isSelected"],"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;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPb,YAAY,CAACI,KADN,EAEPL,cAAc,CAACK,KAFR,wBAGHH,OAAO,CAACG,KAHL;AAGYU,MAAAA,UAAU,EAAE;AAHxB,QAIPd,YAAY,CAACI,KAJN,wBAKHF,KAAK,CAACE,KALH;AAKUU,MAAAA,UAAU,EAAE;AALtB,8BAMHf,cAAc,CAACK,KANZ;AAMmBU,MAAAA,UAAU,EAAE;AAN/B,8BAOHX,eAAe,CAACC,KAPb;AAOoBU,MAAAA,UAAU,EAAE;AAPhC,8BAQHZ,KAAK,CAACE,KARH;AAQUU,MAAAA,UAAU,EAAE;AARtB;AATJ;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';\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 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false},\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n {...UnSelectedCard.props, isSelected: false},\n {...ExternalContent.props, isSelected: false},\n {...Scorm.props, isSelected: false}\n ]\n }\n};\n"],"file":"unsorted-selected.js"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import OrganismCourseSelection from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureEmpty from './fixtures/empty';
|
|
7
|
+
import fixtureFiltered from './fixtures/filtered';
|
|
8
|
+
import fixtureSortedSelected from './fixtures/sorted-selected';
|
|
9
|
+
import fixtureUnsortedSelected from './fixtures/unsorted-selected';
|
|
10
|
+
test('Organism › OrganismCourseSelection > should have valid propTypes', t => {
|
|
11
|
+
t.pass();
|
|
12
|
+
forEach(OrganismCourseSelection.propTypes, (value, key) => {
|
|
13
|
+
t.not(value, undefined, `PropType for "Organism.OrganismCourseSelection.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
test('Organism › OrganismCourseSelection › Default › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureDefault);
|
|
17
|
+
test('Organism › OrganismCourseSelection › Empty › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureEmpty);
|
|
18
|
+
test('Organism › OrganismCourseSelection › Filtered › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureFiltered);
|
|
19
|
+
test('Organism › OrganismCourseSelection › SortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSortedSelected);
|
|
20
|
+
test('Organism › OrganismCourseSelection › UnsortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureUnsortedSelected);
|
|
21
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +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;AAEAR,IAAI,CAAC,kEAAD,EAAqES,CAAC,IAAI;AAC5EA,EAAAA,CAAC,CAACC,IAAF;AACAT,EAAAA,OAAO,CAACE,uBAAuB,CAACQ,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;AAOAb,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,4EAAD,EAA+EE,oBAA/E,EAAqGC,uBAArG,EAA8HK,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 fixtureUnsortedSelected from './fixtures/unsorted-selected';\n\ntest('Organism › OrganismCourseSelection > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismCourseSelection.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismCourseSelection.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismCourseSelection › Default › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureDefault);\ntest('Organism › OrganismCourseSelection › Empty › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureEmpty);\ntest('Organism › OrganismCourseSelection › Filtered › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureFiltered);\ntest('Organism › OrganismCourseSelection › SortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSortedSelected);\ntest('Organism › OrganismCourseSelection › UnsortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureUnsortedSelected);\n"],"file":"fixtures.js"}
|
|
@@ -9,13 +9,19 @@
|
|
|
9
9
|
.container {
|
|
10
10
|
display: flex;
|
|
11
11
|
background-color: cm_grey_50;
|
|
12
|
+
position: relative;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
.menu {
|
|
15
16
|
background-color: cm_grey_50;
|
|
16
|
-
height:
|
|
17
|
+
height: auto;
|
|
17
18
|
width: 200px;
|
|
18
19
|
margin: 24px 8px 24px 24px;
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 0;
|
|
22
|
+
left: 0;
|
|
23
|
+
z-index: 1;
|
|
24
|
+
bottom: 0;
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
.horizontalSection{
|
|
@@ -24,6 +30,7 @@
|
|
|
24
30
|
padding: 24px 24px 24px 8px;
|
|
25
31
|
width: 100%;
|
|
26
32
|
align-items: end;
|
|
33
|
+
margin-left: 240px;
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
.input {
|
|
@@ -33,7 +40,7 @@
|
|
|
33
40
|
|
|
34
41
|
.button {
|
|
35
42
|
width: 170px;
|
|
36
|
-
margin-top:
|
|
43
|
+
margin-top: 24px;
|
|
37
44
|
}
|
|
38
45
|
|
|
39
46
|
.binButton {
|
|
@@ -4,6 +4,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
+
import EmptySearchResult from '../../atom/empty-search-result';
|
|
7
8
|
import Search from '../../atom/input-search';
|
|
8
9
|
import ButtonLink from '../../atom/button-link';
|
|
9
10
|
import Chips from '../../atom/chips';
|
|
@@ -11,13 +12,7 @@ import style from './style.css';
|
|
|
11
12
|
|
|
12
13
|
const buildResultView = (results, resultsAriaLabel, emptyMessages) => {
|
|
13
14
|
if (_isEmpty(results)) {
|
|
14
|
-
return /*#__PURE__*/React.createElement(
|
|
15
|
-
className: style.errorSection
|
|
16
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
17
|
-
className: style.firstErrorMessage
|
|
18
|
-
}, emptyMessages.firstMessage), /*#__PURE__*/React.createElement("span", {
|
|
19
|
-
className: style.secondErrorMessage
|
|
20
|
-
}, emptyMessages.secondMessage));
|
|
15
|
+
return /*#__PURE__*/React.createElement(EmptySearchResult, emptyMessages);
|
|
21
16
|
}
|
|
22
17
|
|
|
23
18
|
const items = results.map((result, index) => {
|
|
@@ -25,7 +20,7 @@ const buildResultView = (results, resultsAriaLabel, emptyMessages) => {
|
|
|
25
20
|
className: style.result,
|
|
26
21
|
key: `result-${index}`
|
|
27
22
|
}, /*#__PURE__*/React.createElement(Chips, result));
|
|
28
|
-
}
|
|
23
|
+
});
|
|
29
24
|
return /*#__PURE__*/React.createElement("ul", {
|
|
30
25
|
"aria-label": resultsAriaLabel
|
|
31
26
|
}, items);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/organism/search-and-chips-results/index.js"],"names":["React","PropTypes","Search","ButtonLink","Chips","style","buildResultView","results","resultsAriaLabel","emptyMessages","
|
|
1
|
+
{"version":3,"sources":["../../../src/organism/search-and-chips-results/index.js"],"names":["React","PropTypes","EmptySearchResult","Search","ButtonLink","Chips","style","buildResultView","results","resultsAriaLabel","emptyMessages","items","map","result","index","SearchAndChipsResults","props","search","selectAllButton","onClick","label","disabled","ariaLabel","resultView","buttonProps","type","icon","position","container","header","button","resultContainer","propTypes","shape","string","func","bool","arrayOf","firstMessage","secondMessage"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,iBAAP,MAA8B,gCAA9B;AACA,OAAOC,MAAP,MAAmB,yBAAnB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,eAAe,GAAG,CAACC,OAAD,EAAUC,gBAAV,EAA4BC,aAA5B,KAA8C;AACpE,MAAI,SAAQF,OAAR,CAAJ,EAAsB;AACpB,wBAAO,oBAAC,iBAAD,EAAuBE,aAAvB,CAAP;AACD;;AAED,QAAMC,KAAK,GAAGH,OAAO,CAACI,GAAR,CAAY,CAACC,MAAD,EAASC,KAAT,KAAmB;AAC3C,wBACE;AAAI,MAAA,SAAS,EAAER,KAAK,CAACO,MAArB;AAA6B,MAAA,GAAG,EAAG,UAASC,KAAM;AAAlD,oBACE,oBAAC,KAAD,EAAWD,MAAX,CADF,CADF;AAKD,GANa,CAAd;AAQA,sBAAO;AAAI,kBAAYJ;AAAhB,KAAmCE,KAAnC,CAAP;AACD,CAdD;;AAgBA,MAAMI,qBAAqB,GAAGC,KAAK,IAAI;AACrC,QAAM;AACJC,IAAAA,MADI;AAEJC,IAAAA,eAFI;AAGJV,IAAAA,OAHI;AAIJE,IAAAA,aAJI;AAKJ,0BAAsBD;AALlB,MAMFO,KANJ;AAQA,QAAM;AAACG,IAAAA,OAAD;AA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ACF,SAAvB,CAPwB;AAQhCO,EAAAA,OAAO,EAAEP,SAAS,CAACoC,OAAV,CAAkBpC,SAAS,CAACgC,KAAV,CAAgB5B,KAAK,CAAC2B,SAAtB,CAAlB,CARuB;AAShC,wBAAsB/B,SAAS,CAACiC,MATA;AAUhCxB,EAAAA,aAAa,EAAET,SAAS,CAACgC,KAAV,CAAgB;AAC7BK,IAAAA,YAAY,EAAErC,SAAS,CAACiC,MADK;AAE7BK,IAAAA,aAAa,EAAEtC,SAAS,CAACiC;AAFI,GAAhB;AAViB,CAAlC;AAgBA,eAAenB,qBAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty} from 'lodash/fp';\nimport EmptySearchResult from '../../atom/empty-search-result';\nimport Search from '../../atom/input-search';\nimport ButtonLink from '../../atom/button-link';\nimport Chips from '../../atom/chips';\nimport style from './style.css';\n\nconst buildResultView = (results, resultsAriaLabel, emptyMessages) => {\n if (isEmpty(results)) {\n return <EmptySearchResult {...emptyMessages} />;\n }\n\n const items = results.map((result, index) => {\n return (\n <li className={style.result} key={`result-${index}`}>\n <Chips {...result} />\n </li>\n );\n });\n\n return <ul aria-label={resultsAriaLabel}>{items}</ul>;\n};\n\nconst SearchAndChipsResults = props => {\n const {\n search,\n selectAllButton,\n results,\n emptyMessages,\n 'results-aria-label': resultsAriaLabel\n } = props;\n\n const {onClick, label, disabled = false, 'aria-label': ariaLabel} = selectAllButton;\n const resultView = buildResultView(results, resultsAriaLabel, emptyMessages);\n const buttonProps = {\n type: 'secondary',\n label,\n 'aria-label': ariaLabel,\n 'data-name': `select-all-button`,\n icon: {\n position: 'right',\n type: 'add'\n },\n onClick,\n disabled\n };\n\n return (\n <div className={style.container}>\n <div className={style.header}>\n <div className={style.button}>\n <ButtonLink {...buttonProps} />\n </div>\n <div className={style.search}>\n <Search {...search} theme=\"coorpmanager\" />\n </div>\n </div>\n <div className={style.resultContainer}>{resultView}</div>\n </div>\n );\n};\n\nSearchAndChipsResults.propTypes = {\n selectAllButton: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func,\n disabled: PropTypes.bool,\n 'aria-label': PropTypes.string\n }),\n search: PropTypes.shape(Search.PropTypes),\n results: PropTypes.arrayOf(PropTypes.shape(Chips.propTypes)),\n 'results-aria-label': PropTypes.string,\n emptyMessages: PropTypes.shape({\n firstMessage: PropTypes.string,\n secondMessage: PropTypes.string\n })\n};\n\nexport default SearchAndChipsResults;\n"],"file":"index.js"}
|
|
@@ -32,26 +32,4 @@
|
|
|
32
32
|
max-width: 268px;
|
|
33
33
|
display: inline-block;
|
|
34
34
|
margin: 0 16px 16px 0px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.errorSection {
|
|
38
|
-
margin: 48px 0;
|
|
39
|
-
width: 100%;
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
align-items: center;
|
|
43
|
-
font-size: 16px;
|
|
44
|
-
font-weight: bold;
|
|
45
|
-
font-family: Gilroy;
|
|
46
|
-
font-size: 16px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.firstErrorMessage {
|
|
50
|
-
color: cm_grey_900;
|
|
51
|
-
display: block;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.secondErrorMessage {
|
|
55
|
-
color: cm_primary_blue;
|
|
56
|
-
display: block;
|
|
57
35
|
}
|
|
@@ -65,7 +65,7 @@ const SetupHeader = props => {
|
|
|
65
65
|
type: 'analytics'
|
|
66
66
|
}
|
|
67
67
|
} : null;
|
|
68
|
-
const myPlatformButtonProps =
|
|
68
|
+
const myPlatformButtonProps = {
|
|
69
69
|
type: 'primary',
|
|
70
70
|
label: items.platformList.label,
|
|
71
71
|
'aria-label': items.platformList.label,
|
|
@@ -117,7 +117,7 @@ const SetupHeader = props => {
|
|
|
117
117
|
className: style.list
|
|
118
118
|
}, goAnalyticsButtonProps ? /*#__PURE__*/React.createElement("div", {
|
|
119
119
|
className: style.button
|
|
120
|
-
}, /*#__PURE__*/React.createElement(ButtonLink, goAnalyticsButtonProps)) : null,
|
|
120
|
+
}, /*#__PURE__*/React.createElement(ButtonLink, goAnalyticsButtonProps)) : null, isDashboard || isHome ? null : /*#__PURE__*/React.createElement("div", {
|
|
121
121
|
className: style.button
|
|
122
122
|
}, /*#__PURE__*/React.createElement(ButtonLink, myPlatformButtonProps)), /*#__PURE__*/React.createElement("li", {
|
|
123
123
|
onMouseEnter: onMouseEnter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/organism/setup-header/index.js"],"names":["React","PropTypes","classnames","Picture","Link","ButtonLink","IconLink","style","SetupHeader","props","show","updateShow","useState","platformName","items","href","user","logo","logoMobile","isHome","isDashboard","image","onMouseEnter","onMouseLeave","platformListButtonProps","type","label","platformList","link","icon","position","platformListIconButtonProps","goAnalyticsButtonProps","globalAnalytics","myPlatformButtonProps","logoutButtonProps","logOut","container","wrapper","logoDesktop","list","button","platformListIcon","element","profilePicture","arrowUp","propTypes","shape","seeMyPlatform","string","bool","username","src"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,OAAP,MAAoB,oBAApB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,QAAP,MAAqB,kCAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAGC,KAAK,IAAI;AAC3B,QAAM,CAACC,IAAD,EAAOC,UAAP,IAAqBX,KAAK,CAACY,QAAN,CAAe,KAAf,CAA3B;AACA,QAAM;AACJC,IAAAA,YADI;AAEJC,IAAAA,KAFI;AAGJC,IAAAA,IAHI;AAIJC,IAAAA,IAAI,GAAG,EAJH;AAKJC,IAAAA,IALI;AAMJC,IAAAA,UANI;AAOJC,IAAAA,MAAM,GAAG,KAPL;AAQJC,IAAAA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5B,IAAAA,KAAK,EAAEpB,SAAS,CAACgD;AAFG,GAAhB,CAXgB;AAetBhC,EAAAA,IAAI,EAAEd,OAAO,CAAC2C,SAAR,CAAkBM,GAfF;AAgBtBlC,EAAAA,UAAU,EAAEf,OAAO,CAAC2C,SAAR,CAAkBM;AAhBR,CAAxB;AAmBA,eAAe5C,WAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Picture from '../../atom/picture';\nimport Link from '../../atom/link';\nimport ButtonLink from '../../atom/button-link';\nimport IconLink from '../../atom/button-link-icon-only';\nimport style from './style.css';\n\nconst SetupHeader = props => {\n const [show, updateShow] = React.useState(false);\n const {\n platformName,\n items,\n href,\n user = {},\n logo,\n logoMobile,\n isHome = false,\n isDashboard = false\n } = props;\n const {image = ''} = user;\n\n function onMouseEnter() {\n updateShow(true);\n }\n\n function onMouseLeave() {\n updateShow(false);\n }\n\n const platformListButtonProps = {\n type: 'tertiary',\n label: items.platformList.label,\n 'aria-label': items.platformList.label,\n 'data-name': `platform-list-button`,\n link: {\n href: items.platformList.href\n },\n icon: {\n position: 'left',\n type: 'list'\n }\n };\n\n const platformListIconButtonProps = {\n 'aria-label': items.platformList.label,\n 'data-name': `platform-list-button`,\n link: {\n href: items.platformList.href\n },\n icon: 'list'\n };\n\n const goAnalyticsButtonProps =\n items.globalAnalytics && isDashboard === false\n ? {\n type: 'secondary',\n label: items.globalAnalytics.label,\n 'aria-label': items.globalAnalytics.label,\n 'data-name': `platform-list-button`,\n link: {\n href: items.globalAnalytics.href\n },\n icon: {\n position: 'left',\n type: 'analytics'\n }\n }\n : null;\n\n const myPlatformButtonProps =\n isHome || isDashboard\n ? null\n : {\n type: 'primary',\n label: items.platformList.label,\n 'aria-label': items.platformList.label,\n 'data-name': `platform-list-button`,\n link: {\n href\n },\n icon: {\n position: 'left',\n type: 'see'\n }\n };\n\n const logoutButtonProps = {\n type: 'text',\n label: items.logOut.label,\n 'aria-label': items.logOut.label,\n 'data-name': `logout-list-button`,\n link: {\n href: items.logOut.href\n },\n icon: {\n position: 'left',\n type: 'logout'\n }\n };\n return (\n <div className={style.container}>\n <div className={style.wrapper}>\n {isHome ? (\n <div className={style.logo}>\n <Link href={href}>\n <Picture className={style.logoDesktop} src={logo} />\n <Picture className={style.logoMobile} src={logoMobile} />\n </Link>\n </div>\n ) : (\n <ul className={style.list}>\n <div className={classnames([style.button, style.platformList])}>\n <ButtonLink {...platformListButtonProps} />\n </div>\n <div className={style.platformListIcon}>\n <IconLink {...platformListIconButtonProps} />\n </div>\n {!isDashboard ? (\n <li className={classnames(style.element, style.platformName)}>{platformName}</li>\n ) : null}\n </ul>\n )}\n <ul className={style.list}>\n {goAnalyticsButtonProps ? (\n <div className={style.button}>\n <ButtonLink {...goAnalyticsButtonProps} />\n </div>\n ) : null}\n {myPlatformButtonProps ? null : (\n <div className={style.button}>\n <ButtonLink {...myPlatformButtonProps} />\n </div>\n )}\n <li onMouseEnter={onMouseEnter} className={style.profilePicture}>\n <img src={image} />\n </li>\n <div className={style.logOut}>\n <ButtonLink {...logoutButtonProps} />\n </div>\n </ul>\n </div>\n <div data-name={`logout-${show ? 'show' : 'hide'}`}>\n <div className={style.arrowUp} />\n <div className={style.logOut} onMouseLeave={onMouseLeave}>\n <ButtonLink {...logoutButtonProps} />\n </div>\n </div>\n </div>\n );\n};\n\nSetupHeader.propTypes = {\n items: PropTypes.shape({\n seeMyPlatform: PropTypes.shape({href: PropTypes.string, label: PropTypes.string}),\n logOut: PropTypes.shape({href: PropTypes.string, label: PropTypes.string}),\n globalAnalytics: PropTypes.shape({href: PropTypes.string, label: PropTypes.string}),\n platformList: PropTypes.shape({href: PropTypes.string, label: PropTypes.string})\n }),\n platformName: PropTypes.string,\n isDashboard: PropTypes.bool,\n isHome: PropTypes.bool,\n href: Link.propTypes.href,\n user: PropTypes.shape({\n username: PropTypes.string,\n image: PropTypes.string\n }),\n logo: Picture.propTypes.src,\n logoMobile: Picture.propTypes.src\n};\n\nexport default SetupHeader;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/organism/setup-header/index.js"],"names":["React","PropTypes","classnames","Picture","Link","ButtonLink","IconLink","style","SetupHeader","props","show","updateShow","useState","platformName","items","href","user","logo","logoMobile","isHome","isDashboard","image","onMouseEnter","onMouseLeave","platformListButtonProps","type","label","platformList","link","icon","position","platformListIconButtonProps","goAnalyticsButtonProps","globalAnalytics","myPlatformButtonProps","logoutButtonProps","logOut","container","wrapper","logoDesktop","list","button","platformListIcon","element","profilePicture","arrowUp","propTypes","shape","seeMyPlatform","string","bool","username","src"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,OAAP,MAAoB,oBAApB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,QAAP,MAAqB,kCAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAGC,KAAK,IAAI;AAC3B,QAAM,CAACC,IAAD,EAAOC,UAAP,IAAqBX,KAAK,CAACY,QAAN,CAAe,KAAf,CAA3B;AACA,QAAM;AACJC,IAAAA,YADI;AAEJC,IAAAA,KAFI;AAGJC,IAAAA,IAHI;AAIJC,IAAAA,IAAI,GAAG,EAJH;AAKJC,IAAAA,IALI;AAMJC,IAAAA,UANI;AAOJC,IAAAA,MAAM,GAAG,KAPL;AAQJC,IAAAA,WAAW,GAAG;AARV,MASFX,KATJ;AAUA,QAAM;AAACY,IAAAA,KAAK,GAAG;AAAT,MAAeL,IAArB;;AAEA,WAASM,YAAT,GAAwB;AACtBX,IAAAA,UAAU,CAAC,IAAD,CAAV;AACD;;AAED,WAASY,YAAT,GAAwB;AACtBZ,IAAAA,UAAU,CAAC,KAAD,CAAV;AACD;;AAED,QAAMa,uBAAuB,GAAG;AAC9BC,IAAAA,IAA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IAAI,EAAEd,SAAS,CAACgD,MAAjB;AAAyBvB,MAAAA,KAAK,EAAEzB,SAAS,CAACgD;AAA1C,KAAhB,CADM;AAErBb,IAAAA,MAAM,EAAEnC,SAAS,CAAC8C,KAAV,CAAgB;AAAChC,MAAAA,IAAI,EAAEd,SAAS,CAACgD,MAAjB;AAAyBvB,MAAAA,KAAK,EAAEzB,SAAS,CAACgD;AAA1C,KAAhB,CAFa;AAGrBhB,IAAAA,eAAe,EAAEhC,SAAS,CAAC8C,KAAV,CAAgB;AAAChC,MAAAA,IAAI,EAAEd,SAAS,CAACgD,MAAjB;AAAyBvB,MAAAA,KAAK,EAAEzB,SAAS,CAACgD;AAA1C,KAAhB,CAHI;AAIrBtB,IAAAA,YAAY,EAAE1B,SAAS,CAAC8C,KAAV,CAAgB;AAAChC,MAAAA,IAAI,EAAEd,SAAS,CAACgD,MAAjB;AAAyBvB,MAAAA,KAAK,EAAEzB,SAAS,CAACgD;AAA1C,KAAhB;AAJO,GAAhB,CADe;AAOtBpC,EAAAA,YAAY,EAAEZ,SAAS,CAACgD,MAPF;AAQtB7B,EAAAA,WAAW,EAAEnB,SAAS,CAACiD,IARD;AAStB/B,EAAAA,MAAM,EAAElB,SAAS,CAACiD,IATI;AAUtBnC,EAAAA,IAAI,EAAEX,IAAI,CAAC0C,SAAL,CAAe/B,IAVC;AAWtBC,EAAAA,IAAI,EAAEf,SAAS,CAAC8C,KAAV,CAAgB;AACpBI,IAAAA,QAAQ,EAAElD,SAAS,CAACgD,MADA;AAEpB5B,IAAAA,KAAK,EAAEpB,SAAS,CAACgD;AAFG,GAAhB,CAXgB;AAetBhC,EAAAA,IAAI,EAAEd,OAAO,CAAC2C,SAAR,CAAkBM,GAfF;AAgBtBlC,EAAAA,UAAU,EAAEf,OAAO,CAAC2C,SAAR,CAAkBM;AAhBR,CAAxB;AAmBA,eAAe5C,WAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Picture from '../../atom/picture';\nimport Link from '../../atom/link';\nimport ButtonLink from '../../atom/button-link';\nimport IconLink from '../../atom/button-link-icon-only';\nimport style from './style.css';\n\nconst SetupHeader = props => {\n const [show, updateShow] = React.useState(false);\n const {\n platformName,\n items,\n href,\n user = {},\n logo,\n logoMobile,\n isHome = false,\n isDashboard = false\n } = props;\n const {image = ''} = user;\n\n function onMouseEnter() {\n updateShow(true);\n }\n\n function onMouseLeave() {\n updateShow(false);\n }\n\n const platformListButtonProps = {\n type: 'tertiary',\n label: items.platformList.label,\n 'aria-label': items.platformList.label,\n 'data-name': `platform-list-button`,\n link: {\n href: items.platformList.href\n },\n icon: {\n position: 'left',\n type: 'list'\n }\n };\n\n const platformListIconButtonProps = {\n 'aria-label': items.platformList.label,\n 'data-name': `platform-list-button`,\n link: {\n href: items.platformList.href\n },\n icon: 'list'\n };\n\n const goAnalyticsButtonProps =\n items.globalAnalytics && isDashboard === false\n ? {\n type: 'secondary',\n label: items.globalAnalytics.label,\n 'aria-label': items.globalAnalytics.label,\n 'data-name': `platform-list-button`,\n link: {\n href: items.globalAnalytics.href\n },\n icon: {\n position: 'left',\n type: 'analytics'\n }\n }\n : null;\n\n const myPlatformButtonProps = {\n type: 'primary',\n label: items.platformList.label,\n 'aria-label': items.platformList.label,\n 'data-name': `platform-list-button`,\n link: {\n href\n },\n icon: {\n position: 'left',\n type: 'see'\n }\n };\n\n const logoutButtonProps = {\n type: 'text',\n label: items.logOut.label,\n 'aria-label': items.logOut.label,\n 'data-name': `logout-list-button`,\n link: {\n href: items.logOut.href\n },\n icon: {\n position: 'left',\n type: 'logout'\n }\n };\n\n return (\n <div className={style.container}>\n <div className={style.wrapper}>\n {isHome ? (\n <div className={style.logo}>\n <Link href={href}>\n <Picture className={style.logoDesktop} src={logo} />\n <Picture className={style.logoMobile} src={logoMobile} />\n </Link>\n </div>\n ) : (\n <ul className={style.list}>\n <div className={classnames([style.button, style.platformList])}>\n <ButtonLink {...platformListButtonProps} />\n </div>\n <div className={style.platformListIcon}>\n <IconLink {...platformListIconButtonProps} />\n </div>\n {!isDashboard ? (\n <li className={classnames(style.element, style.platformName)}>{platformName}</li>\n ) : null}\n </ul>\n )}\n <ul className={style.list}>\n {goAnalyticsButtonProps ? (\n <div className={style.button}>\n <ButtonLink {...goAnalyticsButtonProps} />\n </div>\n ) : null}\n {isDashboard || isHome ? null : (\n <div className={style.button}>\n <ButtonLink {...myPlatformButtonProps} />\n </div>\n )}\n <li onMouseEnter={onMouseEnter} className={style.profilePicture}>\n <img src={image} />\n </li>\n <div className={style.logOut}>\n <ButtonLink {...logoutButtonProps} />\n </div>\n </ul>\n </div>\n <div data-name={`logout-${show ? 'show' : 'hide'}`}>\n <div className={style.arrowUp} />\n <div className={style.logOut} onMouseLeave={onMouseLeave}>\n <ButtonLink {...logoutButtonProps} />\n </div>\n </div>\n </div>\n );\n};\n\nSetupHeader.propTypes = {\n items: PropTypes.shape({\n seeMyPlatform: PropTypes.shape({href: PropTypes.string, label: PropTypes.string}),\n logOut: PropTypes.shape({href: PropTypes.string, label: PropTypes.string}),\n globalAnalytics: PropTypes.shape({href: PropTypes.string, label: PropTypes.string}),\n platformList: PropTypes.shape({href: PropTypes.string, label: PropTypes.string})\n }),\n platformName: PropTypes.string,\n isDashboard: PropTypes.bool,\n isHome: PropTypes.bool,\n href: Link.propTypes.href,\n user: PropTypes.shape({\n username: PropTypes.string,\n image: PropTypes.string\n }),\n logo: Picture.propTypes.src,\n logoMobile: Picture.propTypes.src\n};\n\nexport default SetupHeader;\n"],"file":"index.js"}
|
|
@@ -18,8 +18,6 @@ var _buttonSecondaryNoIconDisabled = _interopRequireDefault(require("./fixtures/
|
|
|
18
18
|
|
|
19
19
|
var _buttonTertiaryIconLeft = _interopRequireDefault(require("./fixtures/button-tertiary-icon-left"));
|
|
20
20
|
|
|
21
|
-
var _iconButton = _interopRequireDefault(require("./fixtures/icon-button"));
|
|
22
|
-
|
|
23
21
|
var _linkPrimaryDisabledIconRight = _interopRequireDefault(require("./fixtures/link-primary-disabled-icon-right"));
|
|
24
22
|
|
|
25
23
|
var _linkSecondaryIconRight = _interopRequireDefault(require("./fixtures/link-secondary-icon-right"));
|
|
@@ -43,7 +41,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
43
41
|
(0, _ava.default)('Atom › AtomButtonLink › ButtonPrimaryNoIcon › should be rendered', _renderComponent.default, _.default, _buttonPrimaryNoIcon.default);
|
|
44
42
|
(0, _ava.default)('Atom › AtomButtonLink › ButtonSecondaryNoIconDisabled › should be rendered', _renderComponent.default, _.default, _buttonSecondaryNoIconDisabled.default);
|
|
45
43
|
(0, _ava.default)('Atom › AtomButtonLink › ButtonTertiaryIconLeft › should be rendered', _renderComponent.default, _.default, _buttonTertiaryIconLeft.default);
|
|
46
|
-
(0, _ava.default)('Atom › AtomButtonLink › IconButton › should be rendered', _renderComponent.default, _.default, _iconButton.default);
|
|
47
44
|
(0, _ava.default)('Atom › AtomButtonLink › LinkPrimaryDisabledIconRight › should be rendered', _renderComponent.default, _.default, _linkPrimaryDisabledIconRight.default);
|
|
48
45
|
(0, _ava.default)('Atom › AtomButtonLink › LinkSecondaryIconRight › should be rendered', _renderComponent.default, _.default, _linkSecondaryIconRight.default);
|
|
49
46
|
(0, _ava.default)('Atom › AtomButtonLink › LinkTertiaryNoIcon › should be rendered', _renderComponent.default, _.default, _linkTertiaryNoIcon.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/button-link/test/fixtures.js"],"names":["t","pass","AtomButtonLink","propTypes","value","key","not","undefined","renderComponentMacro","fixtureButtonDangerousNoIcon","fixtureButtonPrimaryIconLeft","fixtureButtonPrimaryNoIcon","fixtureButtonSecondaryNoIconDisabled","fixtureButtonTertiaryIconLeft","
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/button-link/test/fixtures.js"],"names":["t","pass","AtomButtonLink","propTypes","value","key","not","undefined","renderComponentMacro","fixtureButtonDangerousNoIcon","fixtureButtonPrimaryIconLeft","fixtureButtonPrimaryNoIcon","fixtureButtonSecondaryNoIconDisabled","fixtureButtonTertiaryIconLeft","fixtureLinkPrimaryDisabledIconRight","fixtureLinkSecondaryIconRight","fixtureLinkTertiaryNoIcon","fixtureLinkTextIconRightTargetBlank","fixtureLinkTextNoIconDownload"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,qDAAL,EAA4DA,CAAC,IAAI;AAC/DA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAeC,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,+CAA8CF,GAAI,mEAA3E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,oEAAL,EAA2EG,wBAA3E,EAAiGN,SAAjG,EAAiHO,8BAAjH;AACA,kBAAK,oEAAL,EAA2ED,wBAA3E,EAAiGN,SAAjG,EAAiHQ,8BAAjH;AACA,kBAAK,kEAAL,EAAyEF,wBAAzE,EAA+FN,SAA/F,EAA+GS,4BAA/G;AACA,kBAAK,4EAAL,EAAmFH,wBAAnF,EAAyGN,SAAzG,EAAyHU,sCAAzH;AACA,kBAAK,qEAAL,EAA4EJ,wBAA5E,EAAkGN,SAAlG,EAAkHW,+BAAlH;AACA,kBAAK,2EAAL,EAAkFL,wBAAlF,EAAwGN,SAAxG,EAAwHY,qCAAxH;AACA,kBAAK,qEAAL,EAA4EN,wBAA5E,EAAkGN,SAAlG,EAAkHa,+BAAlH;AACA,kBAAK,iEAAL,EAAwEP,wBAAxE,EAA8FN,SAA9F,EAA8Gc,2BAA9G;AACA,kBAAK,2EAAL,EAAkFR,wBAAlF,EAAwGN,SAAxG,EAAwHe,qCAAxH;AACA,kBAAK,qEAAL,EAA4ET,wBAA5E,EAAkGN,SAAlG,EAAkHgB,+BAAlH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomButtonLink from '..';\nimport fixtureButtonDangerousNoIcon from './fixtures/button-dangerous-no-icon';\nimport fixtureButtonPrimaryIconLeft from './fixtures/button-primary-icon-left';\nimport fixtureButtonPrimaryNoIcon from './fixtures/button-primary-no-icon';\nimport fixtureButtonSecondaryNoIconDisabled from './fixtures/button-secondary-no-icon-disabled';\nimport fixtureButtonTertiaryIconLeft from './fixtures/button-tertiary-icon-left';\nimport fixtureLinkPrimaryDisabledIconRight from './fixtures/link-primary-disabled-icon-right';\nimport fixtureLinkSecondaryIconRight from './fixtures/link-secondary-icon-right';\nimport fixtureLinkTertiaryNoIcon from './fixtures/link-tertiary-no-icon';\nimport fixtureLinkTextIconRightTargetBlank from './fixtures/link-text-icon-right-target-blank';\nimport fixtureLinkTextNoIconDownload from './fixtures/link-text-no-icon-download';\n\ntest('Atom › AtomButtonLink > should have valid propTypes', t => {\n t.pass();\n forEach(AtomButtonLink.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomButtonLink.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomButtonLink › ButtonDangerousNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonDangerousNoIcon);\ntest('Atom › AtomButtonLink › ButtonPrimaryIconLeft › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonPrimaryIconLeft);\ntest('Atom › AtomButtonLink › ButtonPrimaryNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonPrimaryNoIcon);\ntest('Atom › AtomButtonLink › ButtonSecondaryNoIconDisabled › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonSecondaryNoIconDisabled);\ntest('Atom › AtomButtonLink › ButtonTertiaryIconLeft › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonTertiaryIconLeft);\ntest('Atom › AtomButtonLink › LinkPrimaryDisabledIconRight › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkPrimaryDisabledIconRight);\ntest('Atom › AtomButtonLink › LinkSecondaryIconRight › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkSecondaryIconRight);\ntest('Atom › AtomButtonLink › LinkTertiaryNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTertiaryNoIcon);\ntest('Atom › AtomButtonLink › LinkTextIconRightTargetBlank › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTextIconRightTargetBlank);\ntest('Atom › AtomButtonLink › LinkTextNoIconDownload › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTextNoIconDownload);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _buttonIconBullet = _interopRequireDefault(require("./fixtures/button-icon-bullet"));
|
|
12
|
+
|
|
13
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
14
|
+
|
|
15
|
+
var _noIcon = _interopRequireDefault(require("./fixtures/no-icon"));
|
|
16
|
+
|
|
17
|
+
var _smallButtonDisabled = _interopRequireDefault(require("./fixtures/small-button-disabled"));
|
|
18
|
+
|
|
19
|
+
var _smallLinkDownload = _interopRequireDefault(require("./fixtures/small-link-download"));
|
|
20
|
+
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
|
|
23
|
+
(0, _ava.default)('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {
|
|
24
|
+
t.pass();
|
|
25
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
26
|
+
t.not(value, undefined, `PropType for "Atom.AtomButtonLinkIconOnly.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
(0, _ava.default)('Atom › AtomButtonLinkIconOnly › ButtonIconBullet › should be rendered', _renderComponent.default, _.default, _buttonIconBullet.default);
|
|
30
|
+
(0, _ava.default)('Atom › AtomButtonLinkIconOnly › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
31
|
+
(0, _ava.default)('Atom › AtomButtonLinkIconOnly › NoIcon › should be rendered', _renderComponent.default, _.default, _noIcon.default);
|
|
32
|
+
(0, _ava.default)('Atom › AtomButtonLinkIconOnly › SmallButtonDisabled › should be rendered', _renderComponent.default, _.default, _smallButtonDisabled.default);
|
|
33
|
+
(0, _ava.default)('Atom › AtomButtonLinkIconOnly › SmallLinkDownload › should be rendered', _renderComponent.default, _.default, _smallLinkDownload.default);
|
|
34
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/button-link-icon-only/test/fixtures.js"],"names":["t","pass","AtomButtonLinkIconOnly","propTypes","value","key","not","undefined","renderComponentMacro","fixtureButtonIconBullet","fixtureDefault","fixtureNoIcon","fixtureSmallButtonDisabled","fixtureSmallLinkDownload"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,6DAAL,EAAoEA,CAAC,IAAI;AACvEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uDAAsDF,GAAI,mEAAnF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,uEAAL,EAA8EG,wBAA9E,EAAoGN,SAApG,EAA4HO,yBAA5H;AACA,kBAAK,8DAAL,EAAqED,wBAArE,EAA2FN,SAA3F,EAAmHQ,gBAAnH;AACA,kBAAK,6DAAL,EAAoEF,wBAApE,EAA0FN,SAA1F,EAAkHS,eAAlH;AACA,kBAAK,0EAAL,EAAiFH,wBAAjF,EAAuGN,SAAvG,EAA+HU,4BAA/H;AACA,kBAAK,wEAAL,EAA+EJ,wBAA/E,EAAqGN,SAArG,EAA6HW,0BAA7H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomButtonLinkIconOnly from '..';\nimport fixtureButtonIconBullet from './fixtures/button-icon-bullet';\nimport fixtureDefault from './fixtures/default';\nimport fixtureNoIcon from './fixtures/no-icon';\nimport fixtureSmallButtonDisabled from './fixtures/small-button-disabled';\nimport fixtureSmallLinkDownload from './fixtures/small-link-download';\n\ntest('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {\n t.pass();\n forEach(AtomButtonLinkIconOnly.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomButtonLinkIconOnly.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomButtonLinkIconOnly › ButtonIconBullet › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureButtonIconBullet);\ntest('Atom › AtomButtonLinkIconOnly › Default › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureDefault);\ntest('Atom › AtomButtonLinkIconOnly › NoIcon › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureNoIcon);\ntest('Atom › AtomButtonLinkIconOnly › SmallButtonDisabled › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallButtonDisabled);\ntest('Atom › AtomButtonLinkIconOnly › SmallLinkDownload › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallLinkDownload);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
12
|
+
|
|
13
|
+
var _multipleButtons = _interopRequireDefault(require("./fixtures/multiple-buttons"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
|
|
17
|
+
(0, _ava.default)('Atom › AtomButtonMenu > should have valid propTypes', t => {
|
|
18
|
+
t.pass();
|
|
19
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
20
|
+
t.not(value, undefined, `PropType for "Atom.AtomButtonMenu.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
(0, _ava.default)('Atom › AtomButtonMenu › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
24
|
+
(0, _ava.default)('Atom › AtomButtonMenu › MultipleButtons › should be rendered', _renderComponent.default, _.default, _multipleButtons.default);
|
|
25
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/button-menu/test/fixtures.js"],"names":["t","pass","AtomButtonMenu","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureMultipleButtons"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,qDAAL,EAA4DA,CAAC,IAAI;AAC/DA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAeC,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,+CAA8CF,GAAI,mEAA3E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,sDAAL,EAA6DG,wBAA7D,EAAmFN,SAAnF,EAAmGO,gBAAnG;AACA,kBAAK,8DAAL,EAAqED,wBAArE,EAA2FN,SAA3F,EAA2GQ,wBAA3G","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomButtonMenu from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureMultipleButtons from './fixtures/multiple-buttons';\n\ntest('Atom › AtomButtonMenu > should have valid propTypes', t => {\n t.pass();\n forEach(AtomButtonMenu.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomButtonMenu.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomButtonMenu › Default › should be rendered', renderComponentMacro, AtomButtonMenu, fixtureDefault);\ntest('Atom › AtomButtonMenu › MultipleButtons › should be rendered', renderComponentMacro, AtomButtonMenu, fixtureMultipleButtons);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
const EmptySearchResult = props => {
|
|
15
|
+
const {
|
|
16
|
+
firstMessage,
|
|
17
|
+
secondMessage
|
|
18
|
+
} = props;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
20
|
+
className: _style.default.container
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
22
|
+
className: _style.default.firstMessage
|
|
23
|
+
}, firstMessage), /*#__PURE__*/_react.default.createElement("span", {
|
|
24
|
+
className: _style.default.secondMessage
|
|
25
|
+
}, secondMessage));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
EmptySearchResult.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
29
|
+
firstMessage: _propTypes.default.string.isRequired,
|
|
30
|
+
secondMessage: _propTypes.default.string.isRequired
|
|
31
|
+
} : {};
|
|
32
|
+
var _default = EmptySearchResult;
|
|
33
|
+
exports.default = _default;
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/empty-search-result/index.js"],"names":["EmptySearchResult","props","firstMessage","secondMessage","style","container","propTypes","PropTypes","string","isRequired"],"mappings":";;;;;AAAA;;AACA;;AACA;;;;AAEA,MAAMA,iBAAiB,GAAGC,KAAK,IAAI;AACjC,QAAM;AAACC,IAAAA,YAAD;AAAeC,IAAAA;AAAf,MAAgCF,KAAtC;AACA,sBACE;AAAK,IAAA,SAAS,EAAEG,eAAMC;AAAtB,kBACE;AAAM,IAAA,SAAS,EAAED,eAAMF;AAAvB,KAAsCA,YAAtC,CADF,eAEE;AAAM,IAAA,SAAS,EAAEE,eAAMD;AAAvB,KAAuCA,aAAvC,CAFF,CADF;AAMD,CARD;;AAUAH,iBAAiB,CAACM,SAAlB,2CAA8B;AAC5BJ,EAAAA,YAAY,EAAEK,mBAAUC,MAAV,CAAiBC,UADH;AAE5BN,EAAAA,aAAa,EAAEI,mBAAUC,MAAV,CAAiBC;AAFJ,CAA9B;eAKeT,iB","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport style from './style.css';\n\nconst EmptySearchResult = props => {\n const {firstMessage, secondMessage} = props;\n return (\n <div className={style.container}>\n <span className={style.firstMessage}>{firstMessage}</span>\n <span className={style.secondMessage}>{secondMessage}</span>\n </div>\n );\n};\n\nEmptySearchResult.propTypes = {\n firstMessage: PropTypes.string.isRequired,\n secondMessage: PropTypes.string.isRequired\n};\n\nexport default EmptySearchResult;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value cm_primary_blue from colors;
|
|
3
|
+
@value cm_grey_900 from colors;
|
|
4
|
+
|
|
5
|
+
.container {
|
|
6
|
+
margin: 48px 0;
|
|
7
|
+
width: 100%;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: center;
|
|
11
|
+
font-size: 16px;
|
|
12
|
+
font-weight: bold;
|
|
13
|
+
font-family: Gilroy;
|
|
14
|
+
font-size: 16px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.firstMessage {
|
|
18
|
+
color: cm_grey_900;
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.secondMessage {
|
|
23
|
+
color: cm_primary_blue;
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/empty-search-result/test/fixtures/default.js"],"names":["props","firstMessage","secondMessage"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,YAAY,EAAE,eADT;AAELC,IAAAA,aAAa,EAAE;AAFV;AADM,C","sourcesContent":["export default {\n props: {\n firstMessage: 'No results...',\n secondMessage: 'Try something else'\n }\n};\n"],"file":"default.js"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
(0, _ava.default)('Atom › AtomEmptySearchResult > should have valid propTypes', t => {
|
|
16
|
+
t.pass();
|
|
17
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
18
|
+
t.not(value, undefined, `PropType for "Atom.AtomEmptySearchResult.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
(0, _ava.default)('Atom › AtomEmptySearchResult › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
22
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/empty-search-result/test/fixtures.js"],"names":["t","pass","AtomEmptySearchResult","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,4DAAL,EAAmEA,CAAC,IAAI;AACtEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAsBC,SAA9B,EAAyC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,sDAAqDF,GAAI,mEAAlF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,6DAAL,EAAoEG,wBAApE,EAA0FN,SAA1F,EAAiHO,gBAAjH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomEmptySearchResult from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('Atom › AtomEmptySearchResult > should have valid propTypes', t => {\n t.pass();\n forEach(AtomEmptySearchResult.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomEmptySearchResult.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomEmptySearchResult › Default › should be rendered', renderComponentMacro, AtomEmptySearchResult, fixtureDefault);\n"],"file":"fixtures.js"}
|