@coorpacademy/components 10.1.10 → 10.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/input-checkbox/index.js +9 -3
- package/es/atom/input-checkbox/index.js.map +1 -1
- package/es/atom/input-checkbox/style.css +15 -0
- package/es/atom/tag/test/fixtures.js +4 -2
- package/es/atom/tag/test/fixtures.js.map +1 -1
- package/es/molecule/banner/index.js +1 -1
- package/es/molecule/banner/index.js.map +1 -1
- package/es/molecule/brand-form-group/style.css +5 -0
- package/es/molecule/brand-tabs/style.css +0 -1
- package/es/molecule/bullet-point-menu-button/index.js +1 -5
- package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
- package/es/molecule/bullet-point-menu-button/style.css +11 -7
- package/es/molecule/select-multiple/index.js +101 -16
- package/es/molecule/select-multiple/index.js.map +1 -1
- package/es/molecule/select-multiple/style.css +292 -11
- package/es/molecule/select-multiple/test/fixtures/checked-cm-theme-multiple.js +32 -0
- package/es/molecule/select-multiple/test/fixtures/checked-cm-theme-multiple.js.map +1 -0
- package/es/molecule/select-multiple/test/fixtures/checked-cm-theme.js +32 -0
- package/es/molecule/select-multiple/test/fixtures/checked-cm-theme.js.map +1 -0
- package/es/molecule/select-multiple/test/fixtures/setup-theme-error.js +1 -1
- package/es/molecule/select-multiple/test/fixtures/setup-theme-error.js.map +1 -1
- package/es/molecule/vertical-tabs/style.css +2 -2
- package/es/organism/accordion/coorp-manager/index.js +5 -2
- package/es/organism/accordion/coorp-manager/index.js.map +1 -1
- package/es/organism/brand-dashboard/index.js +1 -3
- package/es/organism/brand-dashboard/index.js.map +1 -1
- package/es/organism/brand-dashboard/style.css +0 -10
- package/es/organism/list-item/index.js +68 -0
- package/es/organism/list-item/index.js.map +1 -0
- package/es/organism/list-item/style.css +49 -0
- package/es/organism/list-item/test/fixtures/archived.js +39 -0
- package/es/organism/list-item/test/fixtures/archived.js.map +1 -0
- package/es/organism/list-item/test/fixtures/draft.js +39 -0
- package/es/organism/list-item/test/fixtures/draft.js.map +1 -0
- package/es/organism/list-item/test/fixtures/published.js +39 -0
- package/es/organism/list-item/test/fixtures/published.js.map +1 -0
- package/es/organism/list-item/test/fixtures/revised.js +41 -0
- package/es/organism/list-item/test/fixtures/revised.js.map +1 -0
- package/es/organism/list-item/test/fixtures.js +19 -0
- package/es/organism/list-item/test/fixtures.js.map +1 -0
- package/es/organism/playlist-translation/style.css +9 -2
- package/es/organism/setup-header/style.css +16 -7
- package/es/template/back-office/brand-update/index.js +106 -92
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/style.css +22 -66
- package/es/template/back-office/brand-update/test/fixtures/default.js +1 -58
- package/es/template/back-office/brand-update/test/fixtures/default.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/general-settings.js +77 -3
- package/es/template/back-office/brand-update/test/fixtures/general-settings.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/loader.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/loader.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/manageusers-edit.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/manageusers-edit.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/manageusers-list.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/manageusers-list.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/uploadusers.js +1 -1
- package/es/template/back-office/brand-update/test/fixtures/uploadusers.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures.js +0 -2
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/atom/input-checkbox/index.js +10 -3
- package/lib/atom/input-checkbox/index.js.map +1 -1
- package/lib/atom/input-checkbox/style.css +15 -0
- package/lib/atom/tag/test/fixtures.js +5 -2
- package/lib/atom/tag/test/fixtures.js.map +1 -1
- package/lib/molecule/banner/index.js +1 -1
- package/lib/molecule/banner/index.js.map +1 -1
- package/lib/molecule/brand-form-group/style.css +5 -0
- package/lib/molecule/brand-tabs/style.css +0 -1
- package/lib/molecule/bullet-point-menu-button/index.js +1 -5
- package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
- package/lib/molecule/bullet-point-menu-button/style.css +11 -7
- package/lib/molecule/select-multiple/index.js +103 -15
- package/lib/molecule/select-multiple/index.js.map +1 -1
- package/lib/molecule/select-multiple/style.css +292 -11
- package/lib/molecule/select-multiple/test/fixtures/checked-cm-theme-multiple.js +37 -0
- package/lib/molecule/select-multiple/test/fixtures/checked-cm-theme-multiple.js.map +1 -0
- package/lib/molecule/select-multiple/test/fixtures/checked-cm-theme.js +37 -0
- package/lib/molecule/select-multiple/test/fixtures/checked-cm-theme.js.map +1 -0
- package/lib/molecule/select-multiple/test/fixtures/setup-theme-error.js +1 -1
- package/lib/molecule/select-multiple/test/fixtures/setup-theme-error.js.map +1 -1
- package/lib/molecule/vertical-tabs/style.css +2 -2
- package/lib/organism/accordion/coorp-manager/index.js +4 -2
- package/lib/organism/accordion/coorp-manager/index.js.map +1 -1
- package/lib/organism/brand-dashboard/index.js +1 -3
- package/lib/organism/brand-dashboard/index.js.map +1 -1
- package/lib/organism/brand-dashboard/style.css +0 -10
- package/lib/organism/list-item/index.js +82 -0
- package/lib/organism/list-item/index.js.map +1 -0
- package/lib/organism/list-item/style.css +49 -0
- package/lib/organism/list-item/test/fixtures/archived.js +44 -0
- package/lib/organism/list-item/test/fixtures/archived.js.map +1 -0
- package/lib/organism/list-item/test/fixtures/draft.js +44 -0
- package/lib/organism/list-item/test/fixtures/draft.js.map +1 -0
- package/lib/organism/list-item/test/fixtures/published.js +44 -0
- package/lib/organism/list-item/test/fixtures/published.js.map +1 -0
- package/lib/organism/list-item/test/fixtures/revised.js +46 -0
- package/lib/organism/list-item/test/fixtures/revised.js.map +1 -0
- package/lib/organism/list-item/test/fixtures.js +31 -0
- package/lib/organism/list-item/test/fixtures.js.map +1 -0
- package/lib/organism/playlist-translation/style.css +9 -2
- package/lib/organism/setup-header/style.css +16 -7
- package/lib/template/back-office/brand-update/index.js +106 -93
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/style.css +22 -66
- package/lib/template/back-office/brand-update/test/fixtures/default.js +1 -58
- package/lib/template/back-office/brand-update/test/fixtures/default.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/general-settings.js +76 -3
- package/lib/template/back-office/brand-update/test/fixtures/general-settings.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/loader.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/loader.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/manageusers-edit.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/manageusers-edit.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/manageusers-list.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/manageusers-list.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/uploadusers.js +2 -2
- package/lib/template/back-office/brand-update/test/fixtures/uploadusers.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures.js +0 -3
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/package.json +2 -2
- package/es/molecule/search/test/fixtures.js +0 -15
- package/es/molecule/search/test/fixtures.js.map +0 -1
- package/es/template/back-office/brand-update/test/fixtures/manageusers.js +0 -11
- package/es/template/back-office/brand-update/test/fixtures/manageusers.js.map +0 -1
- package/lib/molecule/search/test/fixtures.js +0 -25
- package/lib/molecule/search/test/fixtures.js.map +0 -1
- package/lib/template/back-office/brand-update/test/fixtures/manageusers.js +0 -25
- package/lib/template/back-office/brand-update/test/fixtures/manageusers.js.map +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@value breakpoints: "../../variables/breakpoints.css";
|
|
2
|
+
@value mobile from breakpoints;
|
|
3
|
+
@value colors: "../../variables/colors.css";
|
|
4
|
+
@value xtraLightGrey from colors;
|
|
5
|
+
@value cm_grey_900 from colors;
|
|
6
|
+
@value primaryAdd1 from colors;
|
|
7
|
+
|
|
8
|
+
.wrapper {
|
|
9
|
+
width: 100%;
|
|
10
|
+
border-radius: 7px;
|
|
11
|
+
background-color: color(xtraLightGrey a(90%));
|
|
12
|
+
height: 60px;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
padding: 0 24px;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.title {
|
|
21
|
+
flex-grow: 0;
|
|
22
|
+
font-family: Gilroy;
|
|
23
|
+
font-size: 16px;
|
|
24
|
+
font-weight: bold;
|
|
25
|
+
font-stretch: normal;
|
|
26
|
+
font-style: normal;
|
|
27
|
+
line-height: 1.38;
|
|
28
|
+
letter-spacing: normal;
|
|
29
|
+
text-align: left;
|
|
30
|
+
color: cm_grey_900;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
text-overflow: ellipsis;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.settings {
|
|
37
|
+
display: flex;
|
|
38
|
+
height: 100%;
|
|
39
|
+
align-items: center;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.tag {
|
|
43
|
+
margin: 0 16px 0 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.edit {
|
|
47
|
+
margin: 0 16px 0 0;
|
|
48
|
+
min-width: 93px;
|
|
49
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
id: 'default',
|
|
4
|
+
title: 'Leaders of tomorrow',
|
|
5
|
+
tags: [{
|
|
6
|
+
label: 'Archived',
|
|
7
|
+
type: 'archived'
|
|
8
|
+
}],
|
|
9
|
+
bulletPointMenuButton: {
|
|
10
|
+
buttonAriaLabel: 'aria button',
|
|
11
|
+
menuAriaLabel: 'aria menu',
|
|
12
|
+
buttons: [{
|
|
13
|
+
'data-name': 'CP-publish-button',
|
|
14
|
+
label: 'Publish',
|
|
15
|
+
type: 'default',
|
|
16
|
+
onClick: () => console.log('click')
|
|
17
|
+
}, {
|
|
18
|
+
'data-name': 'CP-delete-button',
|
|
19
|
+
label: 'Delete',
|
|
20
|
+
type: 'dangerous',
|
|
21
|
+
onClick: () => console.log('click')
|
|
22
|
+
}],
|
|
23
|
+
onClick: () => console.log('click')
|
|
24
|
+
},
|
|
25
|
+
buttonLink: {
|
|
26
|
+
type: 'secondary',
|
|
27
|
+
label: 'Edit',
|
|
28
|
+
ariaLabel: 'aria button',
|
|
29
|
+
dataName: 'default-button',
|
|
30
|
+
icon: {
|
|
31
|
+
position: 'left',
|
|
32
|
+
type: 'edit'
|
|
33
|
+
},
|
|
34
|
+
onClick: () => console.log('click')
|
|
35
|
+
},
|
|
36
|
+
bulletPointButtonOnClick: () => console.log('click')
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=archived.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/list-item/test/fixtures/archived.js"],"names":["props","id","title","tags","label","type","bulletPointMenuButton","buttonAriaLabel","menuAriaLabel","buttons","onClick","console","log","buttonLink","ariaLabel","dataName","icon","position","bulletPointButtonOnClick"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,EAAE,EAAE,SADC;AAELC,IAAAA,KAAK,EAAE,qBAFF;AAGLC,IAAAA,IAAI,EAAE,CACJ;AACEC,MAAAA,KAAK,EAAE,UADT;AAEEC,MAAAA,IAAI,EAAE;AAFR,KADI,CAHD;AASLC,IAAAA,qBAAqB,EAAE;AACrBC,MAAAA,eAAe,EAAE,aADI;AAErBC,MAAAA,aAAa,EAAE,WAFM;AAGrBC,MAAAA,OAAO,EAAE,CACP;AACE,qBAAa,mBADf;AAEEL,QAAAA,KAAK,EAAE,SAFT;AAGEC,QAAAA,IAAI,EAAE,SAHR;AAIEK,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OADO,EAOP;AACE,qBAAa,kBADf;AAEER,QAAAA,KAAK,EAAE,QAFT;AAGEC,QAAAA,IAAI,EAAE,WAHR;AAIEK,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OAPO,CAHY;AAiBrBF,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAjBM,KATlB;AA4BLC,IAAAA,UAAU,EAAE;AACVR,MAAAA,IAAI,EAAE,WADI;AAEVD,MAAAA,KAAK,EAAE,MAFG;AAGVU,MAAAA,SAAS,EAAE,aAHD;AAIVC,MAAAA,QAAQ,EAAE,gBAJA;AAKVC,MAAAA,IAAI,EAAE;AACJC,QAAAA,QAAQ,EAAE,MADN;AAEJZ,QAAAA,IAAI,EAAE;AAFF,OALI;AASVK,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AATL,KA5BP;AAuCLM,IAAAA,wBAAwB,EAAE,MAAMP,OAAO,CAACC,GAAR,CAAY,OAAZ;AAvC3B;AADM,CAAf","sourcesContent":["export default {\n props: {\n id: 'default',\n title: 'Leaders of tomorrow',\n tags: [\n {\n label: 'Archived',\n type: 'archived'\n }\n ],\n bulletPointMenuButton: {\n buttonAriaLabel: 'aria button',\n menuAriaLabel: 'aria menu',\n buttons: [\n {\n 'data-name': 'CP-publish-button',\n label: 'Publish',\n type: 'default',\n onClick: () => console.log('click')\n },\n {\n 'data-name': 'CP-delete-button',\n label: 'Delete',\n type: 'dangerous',\n onClick: () => console.log('click')\n }\n ],\n onClick: () => console.log('click')\n },\n buttonLink: {\n type: 'secondary',\n label: 'Edit',\n ariaLabel: 'aria button',\n dataName: 'default-button',\n icon: {\n position: 'left',\n type: 'edit'\n },\n onClick: () => console.log('click')\n },\n bulletPointButtonOnClick: () => console.log('click')\n }\n};\n"],"file":"archived.js"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
id: 'default',
|
|
4
|
+
title: 'Leaders of tomorrow',
|
|
5
|
+
tags: [{
|
|
6
|
+
label: 'Draft',
|
|
7
|
+
type: 'draft'
|
|
8
|
+
}],
|
|
9
|
+
bulletPointMenuButton: {
|
|
10
|
+
buttonAriaLabel: 'aria button',
|
|
11
|
+
menuAriaLabel: 'aria menu',
|
|
12
|
+
buttons: [{
|
|
13
|
+
'data-name': 'CP-publish-button',
|
|
14
|
+
label: 'Publish',
|
|
15
|
+
type: 'default',
|
|
16
|
+
onClick: () => console.log('click')
|
|
17
|
+
}, {
|
|
18
|
+
'data-name': 'CP-delete-button',
|
|
19
|
+
label: 'Delete',
|
|
20
|
+
type: 'dangerous',
|
|
21
|
+
onClick: () => console.log('click')
|
|
22
|
+
}],
|
|
23
|
+
onClick: () => console.log('click')
|
|
24
|
+
},
|
|
25
|
+
buttonLink: {
|
|
26
|
+
type: 'secondary',
|
|
27
|
+
label: 'Edit',
|
|
28
|
+
ariaLabel: 'aria button',
|
|
29
|
+
dataName: 'default-button',
|
|
30
|
+
icon: {
|
|
31
|
+
position: 'left',
|
|
32
|
+
type: 'edit'
|
|
33
|
+
},
|
|
34
|
+
onClick: () => console.log('click')
|
|
35
|
+
},
|
|
36
|
+
bulletPointButtonOnClick: () => console.log('click')
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=draft.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/list-item/test/fixtures/draft.js"],"names":["props","id","title","tags","label","type","bulletPointMenuButton","buttonAriaLabel","menuAriaLabel","buttons","onClick","console","log","buttonLink","ariaLabel","dataName","icon","position","bulletPointButtonOnClick"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,EAAE,EAAE,SADC;AAELC,IAAAA,KAAK,EAAE,qBAFF;AAGLC,IAAAA,IAAI,EAAE,CACJ;AACEC,MAAAA,KAAK,EAAE,OADT;AAEEC,MAAAA,IAAI,EAAE;AAFR,KADI,CAHD;AASLC,IAAAA,qBAAqB,EAAE;AACrBC,MAAAA,eAAe,EAAE,aADI;AAErBC,MAAAA,aAAa,EAAE,WAFM;AAGrBC,MAAAA,OAAO,EAAE,CACP;AACE,qBAAa,mBADf;AAEEL,QAAAA,KAAK,EAAE,SAFT;AAGEC,QAAAA,IAAI,EAAE,SAHR;AAIEK,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OADO,EAOP;AACE,qBAAa,kBADf;AAEER,QAAAA,KAAK,EAAE,QAFT;AAGEC,QAAAA,IAAI,EAAE,WAHR;AAIEK,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OAPO,CAHY;AAiBrBF,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAjBM,KATlB;AA4BLC,IAAAA,UAAU,EAAE;AACVR,MAAAA,IAAI,EAAE,WADI;AAEVD,MAAAA,KAAK,EAAE,MAFG;AAGVU,MAAAA,SAAS,EAAE,aAHD;AAIVC,MAAAA,QAAQ,EAAE,gBAJA;AAKVC,MAAAA,IAAI,EAAE;AACJC,QAAAA,QAAQ,EAAE,MADN;AAEJZ,QAAAA,IAAI,EAAE;AAFF,OALI;AASVK,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AATL,KA5BP;AAuCLM,IAAAA,wBAAwB,EAAE,MAAMP,OAAO,CAACC,GAAR,CAAY,OAAZ;AAvC3B;AADM,CAAf","sourcesContent":["export default {\n props: {\n id: 'default',\n title: 'Leaders of tomorrow',\n tags: [\n {\n label: 'Draft',\n type: 'draft'\n }\n ],\n bulletPointMenuButton: {\n buttonAriaLabel: 'aria button',\n menuAriaLabel: 'aria menu',\n buttons: [\n {\n 'data-name': 'CP-publish-button',\n label: 'Publish',\n type: 'default',\n onClick: () => console.log('click')\n },\n {\n 'data-name': 'CP-delete-button',\n label: 'Delete',\n type: 'dangerous',\n onClick: () => console.log('click')\n }\n ],\n onClick: () => console.log('click')\n },\n buttonLink: {\n type: 'secondary',\n label: 'Edit',\n ariaLabel: 'aria button',\n dataName: 'default-button',\n icon: {\n position: 'left',\n type: 'edit'\n },\n onClick: () => console.log('click')\n },\n bulletPointButtonOnClick: () => console.log('click')\n }\n};\n"],"file":"draft.js"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
id: 'default',
|
|
4
|
+
title: 'Leaders of tomorrow',
|
|
5
|
+
tags: [{
|
|
6
|
+
label: 'Published',
|
|
7
|
+
type: 'published'
|
|
8
|
+
}],
|
|
9
|
+
bulletPointMenuButton: {
|
|
10
|
+
buttonAriaLabel: 'aria button',
|
|
11
|
+
menuAriaLabel: 'aria menu',
|
|
12
|
+
buttons: [{
|
|
13
|
+
'data-name': 'CP-archive-button',
|
|
14
|
+
label: 'Archive',
|
|
15
|
+
type: 'default',
|
|
16
|
+
onClick: () => console.log('click')
|
|
17
|
+
}, {
|
|
18
|
+
'data-name': 'CP-delete-button',
|
|
19
|
+
label: 'Delete',
|
|
20
|
+
type: 'dangerous',
|
|
21
|
+
onClick: () => console.log('click')
|
|
22
|
+
}],
|
|
23
|
+
onClick: () => console.log('click')
|
|
24
|
+
},
|
|
25
|
+
buttonLink: {
|
|
26
|
+
type: 'secondary',
|
|
27
|
+
label: 'Edit',
|
|
28
|
+
ariaLabel: 'aria button',
|
|
29
|
+
dataName: 'default-button',
|
|
30
|
+
icon: {
|
|
31
|
+
position: 'left',
|
|
32
|
+
type: 'edit'
|
|
33
|
+
},
|
|
34
|
+
onClick: () => console.log('click')
|
|
35
|
+
},
|
|
36
|
+
bulletPointButtonOnClick: () => console.log('click')
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=published.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/list-item/test/fixtures/published.js"],"names":["props","id","title","tags","label","type","bulletPointMenuButton","buttonAriaLabel","menuAriaLabel","buttons","onClick","console","log","buttonLink","ariaLabel","dataName","icon","position","bulletPointButtonOnClick"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,EAAE,EAAE,SADC;AAELC,IAAAA,KAAK,EAAE,qBAFF;AAGLC,IAAAA,IAAI,EAAE,CACJ;AACEC,MAAAA,KAAK,EAAE,WADT;AAEEC,MAAAA,IAAI,EAAE;AAFR,KADI,CAHD;AASLC,IAAAA,qBAAqB,EAAE;AACrBC,MAAAA,eAAe,EAAE,aADI;AAErBC,MAAAA,aAAa,EAAE,WAFM;AAGrBC,MAAAA,OAAO,EAAE,CACP;AACE,qBAAa,mBADf;AAEEL,QAAAA,KAAK,EAAE,SAFT;AAGEC,QAAAA,IAAI,EAAE,SAHR;AAIEK,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OADO,EAOP;AACE,qBAAa,kBADf;AAEER,QAAAA,KAAK,EAAE,QAFT;AAGEC,QAAAA,IAAI,EAAE,WAHR;AAIEK,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OAPO,CAHY;AAiBrBF,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAjBM,KATlB;AA4BLC,IAAAA,UAAU,EAAE;AACVR,MAAAA,IAAI,EAAE,WADI;AAEVD,MAAAA,KAAK,EAAE,MAFG;AAGVU,MAAAA,SAAS,EAAE,aAHD;AAIVC,MAAAA,QAAQ,EAAE,gBAJA;AAKVC,MAAAA,IAAI,EAAE;AACJC,QAAAA,QAAQ,EAAE,MADN;AAEJZ,QAAAA,IAAI,EAAE;AAFF,OALI;AASVK,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AATL,KA5BP;AAuCLM,IAAAA,wBAAwB,EAAE,MAAMP,OAAO,CAACC,GAAR,CAAY,OAAZ;AAvC3B;AADM,CAAf","sourcesContent":["export default {\n props: {\n id: 'default',\n title: 'Leaders of tomorrow',\n tags: [\n {\n label: 'Published',\n type: 'published'\n }\n ],\n bulletPointMenuButton: {\n buttonAriaLabel: 'aria button',\n menuAriaLabel: 'aria menu',\n buttons: [\n {\n 'data-name': 'CP-archive-button',\n label: 'Archive',\n type: 'default',\n onClick: () => console.log('click')\n },\n {\n 'data-name': 'CP-delete-button',\n label: 'Delete',\n type: 'dangerous',\n onClick: () => console.log('click')\n }\n ],\n onClick: () => console.log('click')\n },\n buttonLink: {\n type: 'secondary',\n label: 'Edit',\n ariaLabel: 'aria button',\n dataName: 'default-button',\n icon: {\n position: 'left',\n type: 'edit'\n },\n onClick: () => console.log('click')\n },\n bulletPointButtonOnClick: () => console.log('click')\n }\n};\n"],"file":"published.js"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
id: 'default',
|
|
4
|
+
title: 'Leaders of tomorrow',
|
|
5
|
+
tags: [{
|
|
6
|
+
label: 'Ongoing changes',
|
|
7
|
+
type: 'revised'
|
|
8
|
+
}, {
|
|
9
|
+
label: 'Published',
|
|
10
|
+
type: 'published'
|
|
11
|
+
}],
|
|
12
|
+
buttonLink: {
|
|
13
|
+
type: 'secondary',
|
|
14
|
+
label: 'Edit',
|
|
15
|
+
ariaLabel: 'aria button',
|
|
16
|
+
dataName: 'default-button',
|
|
17
|
+
icon: {
|
|
18
|
+
position: 'left',
|
|
19
|
+
type: 'edit'
|
|
20
|
+
},
|
|
21
|
+
onClick: () => console.log('click')
|
|
22
|
+
},
|
|
23
|
+
bulletPointMenuButton: {
|
|
24
|
+
buttonAriaLabel: 'aria button',
|
|
25
|
+
menuAriaLabel: 'aria menu',
|
|
26
|
+
buttons: [{
|
|
27
|
+
'data-name': 'CP-publish-button',
|
|
28
|
+
label: 'Publish',
|
|
29
|
+
type: 'default',
|
|
30
|
+
onClick: () => console.log('click')
|
|
31
|
+
}, {
|
|
32
|
+
'data-name': 'CP-delete-button',
|
|
33
|
+
label: 'Delete',
|
|
34
|
+
type: 'dangerous',
|
|
35
|
+
onClick: () => console.log('click')
|
|
36
|
+
}],
|
|
37
|
+
onClick: () => console.log('click')
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=revised.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/list-item/test/fixtures/revised.js"],"names":["props","id","title","tags","label","type","buttonLink","ariaLabel","dataName","icon","position","onClick","console","log","bulletPointMenuButton","buttonAriaLabel","menuAriaLabel","buttons"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,EAAE,EAAE,SADC;AAELC,IAAAA,KAAK,EAAE,qBAFF;AAGLC,IAAAA,IAAI,EAAE,CACJ;AACEC,MAAAA,KAAK,EAAE,iBADT;AAEEC,MAAAA,IAAI,EAAE;AAFR,KADI,EAKJ;AACED,MAAAA,KAAK,EAAE,WADT;AAEEC,MAAAA,IAAI,EAAE;AAFR,KALI,CAHD;AAcLC,IAAAA,UAAU,EAAE;AACVD,MAAAA,IAAI,EAAE,WADI;AAEVD,MAAAA,KAAK,EAAE,MAFG;AAGVG,MAAAA,SAAS,EAAE,aAHD;AAIVC,MAAAA,QAAQ,EAAE,gBAJA;AAKVC,MAAAA,IAAI,EAAE;AACJC,QAAAA,QAAQ,EAAE,MADN;AAEJL,QAAAA,IAAI,EAAE;AAFF,OALI;AASVM,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AATL,KAdP;AAyBLC,IAAAA,qBAAqB,EAAE;AACrBC,MAAAA,eAAe,EAAE,aADI;AAErBC,MAAAA,aAAa,EAAE,WAFM;AAGrBC,MAAAA,OAAO,EAAE,CACP;AACE,qBAAa,mBADf;AAEEb,QAAAA,KAAK,EAAE,SAFT;AAGEC,QAAAA,IAAI,EAAE,SAHR;AAIEM,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OADO,EAOP;AACE,qBAAa,kBADf;AAEET,QAAAA,KAAK,EAAE,QAFT;AAGEC,QAAAA,IAAI,EAAE,WAHR;AAIEM,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OAPO,CAHY;AAiBrBF,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAjBM;AAzBlB;AADM,CAAf","sourcesContent":["export default {\n props: {\n id: 'default',\n title: 'Leaders of tomorrow',\n tags: [\n {\n label: 'Ongoing changes',\n type: 'revised'\n },\n {\n label: 'Published',\n type: 'published'\n }\n ],\n\n buttonLink: {\n type: 'secondary',\n label: 'Edit',\n ariaLabel: 'aria button',\n dataName: 'default-button',\n icon: {\n position: 'left',\n type: 'edit'\n },\n onClick: () => console.log('click')\n },\n bulletPointMenuButton: {\n buttonAriaLabel: 'aria button',\n menuAriaLabel: 'aria menu',\n buttons: [\n {\n 'data-name': 'CP-publish-button',\n label: 'Publish',\n type: 'default',\n onClick: () => console.log('click')\n },\n {\n 'data-name': 'CP-delete-button',\n label: 'Delete',\n type: 'dangerous',\n onClick: () => console.log('click')\n }\n ],\n onClick: () => console.log('click')\n }\n }\n};\n"],"file":"revised.js"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import OrganismListItem from '..';
|
|
5
|
+
import fixtureArchived from './fixtures/archived';
|
|
6
|
+
import fixtureDraft from './fixtures/draft';
|
|
7
|
+
import fixturePublished from './fixtures/published';
|
|
8
|
+
import fixtureRevised from './fixtures/revised';
|
|
9
|
+
test('Organism › OrganismListItem > should have valid propTypes', t => {
|
|
10
|
+
t.pass();
|
|
11
|
+
forEach(OrganismListItem.propTypes, (value, key) => {
|
|
12
|
+
t.not(value, undefined, `PropType for "Organism.OrganismListItem.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
test('Organism › OrganismListItem › Archived › should be rendered', renderComponentMacro, OrganismListItem, fixtureArchived);
|
|
16
|
+
test('Organism › OrganismListItem › Draft › should be rendered', renderComponentMacro, OrganismListItem, fixtureDraft);
|
|
17
|
+
test('Organism › OrganismListItem › Published › should be rendered', renderComponentMacro, OrganismListItem, fixturePublished);
|
|
18
|
+
test('Organism › OrganismListItem › Revised › should be rendered', renderComponentMacro, OrganismListItem, fixtureRevised);
|
|
19
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/organism/list-item/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismListItem","fixtureArchived","fixtureDraft","fixturePublished","fixtureRevised","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,YAAP,MAAyB,kBAAzB;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAP,IAAI,CAAC,2DAAD,EAA8DQ,CAAC,IAAI;AACrEA,EAAAA,CAAC,CAACC,IAAF;AACAR,EAAAA,OAAO,CAACE,gBAAgB,CAACO,SAAlB,EAA6B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAClDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,qDAAoDF,GAAI,mEAAjF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAZ,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,gBAAtF,EAAwGC,eAAxG,CAAJ;AACAJ,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,gBAAnF,EAAqGE,YAArG,CAAJ;AACAL,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,gBAAvF,EAAyGG,gBAAzG,CAAJ;AACAN,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,gBAArF,EAAuGI,cAAvG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismListItem from '..';\nimport fixtureArchived from './fixtures/archived';\nimport fixtureDraft from './fixtures/draft';\nimport fixturePublished from './fixtures/published';\nimport fixtureRevised from './fixtures/revised';\n\ntest('Organism › OrganismListItem > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismListItem.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismListItem.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismListItem › Archived › should be rendered', renderComponentMacro, OrganismListItem, fixtureArchived);\ntest('Organism › OrganismListItem › Draft › should be rendered', renderComponentMacro, OrganismListItem, fixtureDraft);\ntest('Organism › OrganismListItem › Published › should be rendered', renderComponentMacro, OrganismListItem, fixturePublished);\ntest('Organism › OrganismListItem › Revised › should be rendered', renderComponentMacro, OrganismListItem, fixtureRevised);\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 {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@value breakpoints: "../../variables/breakpoints.css";
|
|
2
2
|
@value mobile from breakpoints;
|
|
3
3
|
@value cm_tablet from breakpoints;
|
|
4
|
+
@value desktop from breakpoints;
|
|
4
5
|
@value colors: "../../variables/colors.css";
|
|
5
6
|
@value light from colors;
|
|
6
7
|
@value medium from colors;
|
|
@@ -17,12 +18,11 @@
|
|
|
17
18
|
|
|
18
19
|
.container {
|
|
19
20
|
background-color: white;
|
|
20
|
-
height: 80px;
|
|
21
21
|
box-sizing: border-box;
|
|
22
22
|
z-index: 1100;
|
|
23
|
-
margin: 24px 40px;
|
|
24
23
|
display: flex;
|
|
25
24
|
flex-direction: column;
|
|
25
|
+
width: 100%;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
[data-name="logout-hide"] {
|
|
@@ -147,6 +147,20 @@
|
|
|
147
147
|
display: none;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
@media desktop {
|
|
151
|
+
.platformListIcon {
|
|
152
|
+
display: flex;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
align-items: center;
|
|
155
|
+
padding: 0 16px 0 0;
|
|
156
|
+
width: 44px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.platformList {
|
|
160
|
+
display: none;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
150
164
|
@media cm_tablet {
|
|
151
165
|
[data-name="logout-show"] {
|
|
152
166
|
position: absolute;
|
|
@@ -206,11 +220,6 @@
|
|
|
206
220
|
.logOut {
|
|
207
221
|
display: none;
|
|
208
222
|
}
|
|
209
|
-
|
|
210
|
-
.container {
|
|
211
|
-
margin: 24px 32px;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
223
|
}
|
|
215
224
|
|
|
216
225
|
@media mobile {
|
|
@@ -6,8 +6,7 @@ import map from 'lodash/fp/map';
|
|
|
6
6
|
import pipe from 'lodash/fp/pipe';
|
|
7
7
|
import get from 'lodash/fp/get';
|
|
8
8
|
import isEmpty from 'lodash/fp/isEmpty';
|
|
9
|
-
import
|
|
10
|
-
import head from 'lodash/fp/head';
|
|
9
|
+
import find from 'lodash/fp/find';
|
|
11
10
|
import BrandTabs from '../../../molecule/brand-tabs';
|
|
12
11
|
import { IconLinkItem, LinkItem } from '../../../organism/sidebar';
|
|
13
12
|
import BrandForm from '../../../organism/brand-form';
|
|
@@ -15,37 +14,29 @@ import BrandTable from '../../../organism/brand-table';
|
|
|
15
14
|
import BrandUpload from '../../../organism/brand-upload';
|
|
16
15
|
import BrandAnalytics from '../../../organism/brand-analytics';
|
|
17
16
|
import BrandDashboard from '../../../organism/brand-dashboard';
|
|
18
|
-
import
|
|
17
|
+
import Banner from '../../../molecule/banner';
|
|
19
18
|
import Header from '../../../organism/setup-header';
|
|
20
19
|
import Loader from '../../../atom/loader';
|
|
21
20
|
import Accordion from '../../../organism/accordion/coorp-manager';
|
|
22
21
|
import style from './style.css';
|
|
23
22
|
|
|
24
|
-
const
|
|
25
|
-
title,
|
|
26
|
-
href,
|
|
27
|
-
selected
|
|
28
|
-
}) => {
|
|
29
|
-
return /*#__PURE__*/React.createElement("h5", null, title);
|
|
30
|
-
};
|
|
23
|
+
const getStyle = isSelected => isSelected ? style.selectedElement : style.unselectedElement;
|
|
31
24
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
25
|
+
const subTabsView = (_subTabs = []) => map.convert({
|
|
26
|
+
cap: false
|
|
27
|
+
})((subTab, _index) => /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
key: subTab.title
|
|
29
|
+
}, subTab.type === 'iconLink' ? /*#__PURE__*/React.createElement(IconLinkItem, _extends({}, subTab, {
|
|
30
|
+
styles: getStyle(subTab.selected),
|
|
31
|
+
uppercase: false,
|
|
32
|
+
target: '_blank'
|
|
33
|
+
})) : /*#__PURE__*/React.createElement(LinkItem, _extends({}, subTab, {
|
|
34
|
+
styles: getStyle(subTab.selected),
|
|
35
|
+
uppercase: false
|
|
36
|
+
}))))(_subTabs); // TODO: this fonction should be replaced by a molecule to avoid this file to be unreadable
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
notifications,
|
|
41
|
-
header,
|
|
42
|
-
items,
|
|
43
|
-
content,
|
|
44
|
-
details,
|
|
45
|
-
onItemClick
|
|
46
|
-
} = props;
|
|
47
|
-
const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';
|
|
48
|
-
const selectedTab = pipe(filter(e => e.selected), head, get('tabs'), filter(e => e.selected), head)(items);
|
|
38
|
+
|
|
39
|
+
const buildLeftNavigation = (logo, items, onItemClick) => {
|
|
49
40
|
const formattedTabs = items.map(({
|
|
50
41
|
key,
|
|
51
42
|
title,
|
|
@@ -61,97 +52,120 @@ const BrandUpdate = props => {
|
|
|
61
52
|
children: [],
|
|
62
53
|
iconType: key || 'arrow'
|
|
63
54
|
}));
|
|
64
|
-
|
|
65
|
-
const getStyle = isSelected => isSelected ? style.selectedElement : style.unselectedElement;
|
|
66
|
-
|
|
67
|
-
const subTabsView = (_subTabs = []) => map.convert({
|
|
68
|
-
cap: false
|
|
69
|
-
})((subTab, _index) => /*#__PURE__*/React.createElement("div", {
|
|
70
|
-
key: subTab.title
|
|
71
|
-
}, subTab.type === 'iconLink' ? /*#__PURE__*/React.createElement(IconLinkItem, _extends({}, subTab, {
|
|
72
|
-
styles: getStyle(subTab.selected),
|
|
73
|
-
uppercase: false,
|
|
74
|
-
target: '_blank'
|
|
75
|
-
})) : /*#__PURE__*/React.createElement(LinkItem, _extends({}, subTab, {
|
|
76
|
-
styles: getStyle(subTab.selected),
|
|
77
|
-
uppercase: false
|
|
78
|
-
}))))(_subTabs);
|
|
79
|
-
|
|
80
55
|
const formattedTabsViews = map(tab => /*#__PURE__*/React.createElement("div", {
|
|
81
56
|
key: tab.title,
|
|
82
|
-
className: style.
|
|
57
|
+
className: style.subTabsView
|
|
83
58
|
}, subTabsView(tab.tabs)))(items);
|
|
59
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
className: style.leftMenu
|
|
61
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: style.logo
|
|
63
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
64
|
+
href: "/"
|
|
65
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
66
|
+
src: logo
|
|
67
|
+
}))), /*#__PURE__*/React.createElement(Accordion, {
|
|
68
|
+
tabProps: formattedTabs,
|
|
69
|
+
theme: 'setup',
|
|
70
|
+
onClick: onItemClick
|
|
71
|
+
}, formattedTabsViews));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const buildNotifications = notifications => {
|
|
75
|
+
if (isEmpty(notifications)) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
|
|
84
79
|
const notificationsList = notifications.map((notification, index) => {
|
|
85
80
|
return /*#__PURE__*/React.createElement("div", {
|
|
86
81
|
className: style.notification,
|
|
87
82
|
key: index
|
|
88
|
-
}, /*#__PURE__*/React.createElement(
|
|
83
|
+
}, /*#__PURE__*/React.createElement(Banner, notification));
|
|
89
84
|
});
|
|
85
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
86
|
+
className: style.notifications
|
|
87
|
+
}, notificationsList);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const buildHeader = (header, notifications) => {
|
|
91
|
+
const headerStyle = isEmpty(notifications) ? style.header : style.headerForNotifications;
|
|
92
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
className: headerStyle
|
|
94
|
+
}, /*#__PURE__*/React.createElement(Header, header));
|
|
95
|
+
};
|
|
90
96
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
const buildTabs = items => {
|
|
98
|
+
const selectedTab = pipe(find(e => e.selected), get('tabs'), find(e => e.selected))(items);
|
|
99
|
+
const showTabs = selectedTab && !isEmpty(selectedTab.subTabs);
|
|
100
|
+
if (!showTabs) return null;
|
|
101
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
102
|
+
className: style.tabs
|
|
103
|
+
}, /*#__PURE__*/React.createElement(BrandTabs, {
|
|
104
|
+
type: "light",
|
|
105
|
+
tabs: selectedTab.subTabs
|
|
106
|
+
}));
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const buildContentView = content => {
|
|
110
|
+
if (!content) {
|
|
111
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Loader, null));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const {
|
|
115
|
+
type
|
|
116
|
+
} = content;
|
|
96
117
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
118
|
+
switch (type) {
|
|
119
|
+
case 'form':
|
|
120
|
+
return /*#__PURE__*/React.createElement(BrandForm, content);
|
|
100
121
|
|
|
101
|
-
|
|
102
|
-
|
|
122
|
+
case 'list':
|
|
123
|
+
return /*#__PURE__*/React.createElement(BrandTable, content);
|
|
103
124
|
|
|
104
|
-
|
|
105
|
-
|
|
125
|
+
case 'upload':
|
|
126
|
+
return /*#__PURE__*/React.createElement(BrandUpload, content);
|
|
106
127
|
|
|
107
|
-
|
|
108
|
-
|
|
128
|
+
case 'analytics-dashboards':
|
|
129
|
+
return /*#__PURE__*/React.createElement(BrandAnalytics, content);
|
|
109
130
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
131
|
+
case 'home':
|
|
132
|
+
return /*#__PURE__*/React.createElement(BrandDashboard, content);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
114
135
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
136
|
+
const buildDetailsView = details => {
|
|
137
|
+
if (!details) return;
|
|
138
|
+
return /*#__PURE__*/React.createElement(BrandTable, details);
|
|
139
|
+
};
|
|
119
140
|
|
|
141
|
+
const BrandUpdate = props => {
|
|
142
|
+
const {
|
|
143
|
+
notifications,
|
|
144
|
+
header,
|
|
145
|
+
items,
|
|
146
|
+
content,
|
|
147
|
+
details,
|
|
148
|
+
onItemClick
|
|
149
|
+
} = props;
|
|
150
|
+
const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';
|
|
151
|
+
const leftNavigation = buildLeftNavigation(logo, items, onItemClick);
|
|
152
|
+
const notificationsView = buildNotifications(notifications);
|
|
153
|
+
const headerView = buildHeader(header, notifications);
|
|
154
|
+
const tabsView = buildTabs(items);
|
|
155
|
+
const contentView = buildContentView(content);
|
|
156
|
+
const detailsView = buildDetailsView(details);
|
|
120
157
|
return /*#__PURE__*/React.createElement("div", {
|
|
121
158
|
className: style.container
|
|
122
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
123
|
-
className: style.dashboardAside
|
|
124
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
125
|
-
className: style.logo
|
|
126
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
127
|
-
href: "/"
|
|
128
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
129
|
-
src: logo
|
|
130
|
-
}))), /*#__PURE__*/React.createElement(Accordion, {
|
|
131
|
-
tabProps: formattedTabs,
|
|
132
|
-
theme: 'setup',
|
|
133
|
-
onClick: onItemClick
|
|
134
|
-
}, formattedTabsViews)), /*#__PURE__*/React.createElement("div", {
|
|
159
|
+
}, leftNavigation, /*#__PURE__*/React.createElement("div", {
|
|
135
160
|
className: style.contentWrapper
|
|
136
|
-
},
|
|
137
|
-
className: style.notifications
|
|
138
|
-
}, notificationsList), content && content.type === 'home' ? contentView(content) : /*#__PURE__*/React.createElement("div", {
|
|
139
|
-
className: style.contentHandler
|
|
140
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
141
|
-
className: style.contentView
|
|
142
|
-
}, selectedTab && !isEmpty(selectedTab.subTabs) ? /*#__PURE__*/React.createElement(BrandTabs, {
|
|
143
|
-
type: "light",
|
|
144
|
-
tabs: selectedTab.subTabs
|
|
145
|
-
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
146
|
-
className: style.dashboardContent
|
|
147
|
-
}, /*#__PURE__*/React.createElement("div", null, contentView(content)), /*#__PURE__*/React.createElement("div", null, detailsView(details)))))));
|
|
161
|
+
}, headerView, notificationsView, tabsView, contentView, detailsView));
|
|
148
162
|
};
|
|
149
163
|
|
|
150
164
|
BrandUpdate.defaultProps = {
|
|
151
165
|
notifications: []
|
|
152
166
|
};
|
|
153
167
|
BrandUpdate.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
154
|
-
notifications: PropTypes.arrayOf(PropTypes.shape(
|
|
168
|
+
notifications: PropTypes.arrayOf(PropTypes.shape(Banner.propTypes)),
|
|
155
169
|
header: PropTypes.shape(_extends({}, Header.propTypes)),
|
|
156
170
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
157
171
|
key: PropTypes.string,
|