@coorpacademy/components 10.1.15 → 10.2.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.
Files changed (101) hide show
  1. package/es/atom/button-link/index.js +1 -1
  2. package/es/atom/button-link/index.js.map +1 -1
  3. package/es/atom/button-link-icon-only/index.js +1 -1
  4. package/es/atom/button-link-icon-only/index.js.map +1 -1
  5. package/es/atom/button-menu/index.js +2 -4
  6. package/es/atom/button-menu/index.js.map +1 -1
  7. package/es/atom/chips/style.css +1 -2
  8. package/es/atom/image-upload/index.js +5 -3
  9. package/es/atom/image-upload/index.js.map +1 -1
  10. package/es/atom/input-color/style.css +1 -1
  11. package/es/hoc/transition/index.js +10 -3
  12. package/es/hoc/transition/index.js.map +1 -1
  13. package/es/molecule/banner/test/fixtures.js +8 -0
  14. package/es/molecule/banner/test/fixtures.js.map +1 -1
  15. package/es/molecule/brand-create-form/index.js +4 -1
  16. package/es/molecule/brand-create-form/index.js.map +1 -1
  17. package/es/molecule/card/index.js +1 -1
  18. package/es/molecule/card/index.js.map +1 -1
  19. package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
  20. package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  21. package/es/molecule/select-multiple/index.js +1 -1
  22. package/es/molecule/select-multiple/index.js.map +1 -1
  23. package/es/molecule/select-multiple/test/fixtures.js +8 -0
  24. package/es/molecule/select-multiple/test/fixtures.js.map +1 -1
  25. package/es/molecule/share/index.js +3 -2
  26. package/es/molecule/share/index.js.map +1 -1
  27. package/es/molecule/wizard-summary/index.js +16 -10
  28. package/es/molecule/wizard-summary/index.js.map +1 -1
  29. package/es/organism/accordion/container/index.js +1 -1
  30. package/es/organism/accordion/container/index.js.map +1 -1
  31. package/es/organism/accordion/coorp-manager/index.js +1 -1
  32. package/es/organism/accordion/coorp-manager/index.js.map +1 -1
  33. package/es/organism/list-item/test/fixtures.js +19 -0
  34. package/es/organism/list-item/test/fixtures.js.map +1 -0
  35. package/es/organism/list-items/index.js +40 -0
  36. package/es/organism/list-items/index.js.map +1 -0
  37. package/es/organism/list-items/style.css +39 -0
  38. package/es/organism/list-items/test/fixtures/archived.js +24 -0
  39. package/es/organism/list-items/test/fixtures/archived.js.map +1 -0
  40. package/es/organism/list-items/test/fixtures/draft.js +24 -0
  41. package/es/organism/list-items/test/fixtures/draft.js.map +1 -0
  42. package/es/organism/list-items/test/fixtures/published.js +26 -0
  43. package/es/organism/list-items/test/fixtures/published.js.map +1 -0
  44. package/es/template/back-office/brand-update/index.js +13 -6
  45. package/es/template/back-office/brand-update/index.js.map +1 -1
  46. package/es/template/back-office/brand-update/style.css +57 -13
  47. package/es/template/back-office/brand-update/test/fixtures.js +0 -2
  48. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  49. package/es/template/teams-dashboard/index.js +4 -6
  50. package/es/template/teams-dashboard/index.js.map +1 -1
  51. package/lib/atom/button-link/index.js +1 -1
  52. package/lib/atom/button-link/index.js.map +1 -1
  53. package/lib/atom/button-link-icon-only/index.js +1 -1
  54. package/lib/atom/button-link-icon-only/index.js.map +1 -1
  55. package/lib/atom/button-menu/index.js +2 -4
  56. package/lib/atom/button-menu/index.js.map +1 -1
  57. package/lib/atom/chips/style.css +1 -2
  58. package/lib/atom/image-upload/index.js +5 -2
  59. package/lib/atom/image-upload/index.js.map +1 -1
  60. package/lib/atom/input-color/style.css +1 -1
  61. package/lib/hoc/transition/index.js +10 -3
  62. package/lib/hoc/transition/index.js.map +1 -1
  63. package/lib/molecule/banner/test/fixtures.js +12 -0
  64. package/lib/molecule/banner/test/fixtures.js.map +1 -1
  65. package/lib/molecule/brand-create-form/index.js +4 -1
  66. package/lib/molecule/brand-create-form/index.js.map +1 -1
  67. package/lib/molecule/card/index.js +1 -1
  68. package/lib/molecule/card/index.js.map +1 -1
  69. package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
  70. package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  71. package/lib/molecule/select-multiple/index.js +1 -1
  72. package/lib/molecule/select-multiple/index.js.map +1 -1
  73. package/lib/molecule/select-multiple/test/fixtures.js +12 -0
  74. package/lib/molecule/select-multiple/test/fixtures.js.map +1 -1
  75. package/lib/molecule/share/index.js +2 -1
  76. package/lib/molecule/share/index.js.map +1 -1
  77. package/lib/molecule/wizard-summary/index.js +16 -10
  78. package/lib/molecule/wizard-summary/index.js.map +1 -1
  79. package/lib/organism/accordion/container/index.js +1 -1
  80. package/lib/organism/accordion/container/index.js.map +1 -1
  81. package/lib/organism/accordion/coorp-manager/index.js +1 -1
  82. package/lib/organism/accordion/coorp-manager/index.js.map +1 -1
  83. package/lib/organism/list-item/test/fixtures.js +31 -0
  84. package/lib/organism/list-item/test/fixtures.js.map +1 -0
  85. package/lib/organism/list-items/index.js +53 -0
  86. package/lib/organism/list-items/index.js.map +1 -0
  87. package/lib/organism/list-items/style.css +39 -0
  88. package/lib/organism/list-items/test/fixtures/archived.js +33 -0
  89. package/lib/organism/list-items/test/fixtures/archived.js.map +1 -0
  90. package/lib/organism/list-items/test/fixtures/draft.js +33 -0
  91. package/lib/organism/list-items/test/fixtures/draft.js.map +1 -0
  92. package/lib/organism/list-items/test/fixtures/published.js +36 -0
  93. package/lib/organism/list-items/test/fixtures/published.js.map +1 -0
  94. package/lib/template/back-office/brand-update/index.js +14 -6
  95. package/lib/template/back-office/brand-update/index.js.map +1 -1
  96. package/lib/template/back-office/brand-update/style.css +57 -13
  97. package/lib/template/back-office/brand-update/test/fixtures.js +0 -3
  98. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  99. package/lib/template/teams-dashboard/index.js +4 -6
  100. package/lib/template/teams-dashboard/index.js.map +1 -1
  101. package/package.json +3 -2
@@ -0,0 +1,31 @@
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 _archived = _interopRequireDefault(require("./fixtures/archived"));
12
+
13
+ var _draft = _interopRequireDefault(require("./fixtures/draft"));
14
+
15
+ var _published = _interopRequireDefault(require("./fixtures/published"));
16
+
17
+ var _revised = _interopRequireDefault(require("./fixtures/revised"));
18
+
19
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
+
21
+ (0, _ava.default)('Organism › OrganismListItem > should have valid propTypes', t => {
22
+ t.pass();
23
+ (0, _forEach.default)(_.default.propTypes, (value, key) => {
24
+ t.not(value, undefined, `PropType for "Organism.OrganismListItem.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
25
+ });
26
+ });
27
+ (0, _ava.default)('Organism › OrganismListItem › Archived › should be rendered', _renderComponent.default, _.default, _archived.default);
28
+ (0, _ava.default)('Organism › OrganismListItem › Draft › should be rendered', _renderComponent.default, _.default, _draft.default);
29
+ (0, _ava.default)('Organism › OrganismListItem › Published › should be rendered', _renderComponent.default, _.default, _published.default);
30
+ (0, _ava.default)('Organism › OrganismListItem › Revised › should be rendered', _renderComponent.default, _.default, _revised.default);
31
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/organism/list-item/test/fixtures.js"],"names":["t","pass","OrganismListItem","propTypes","value","key","not","undefined","renderComponentMacro","fixtureArchived","fixtureDraft","fixturePublished","fixtureRevised"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,2DAAL,EAAkEA,CAAC,IAAI;AACrEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAiBC,SAAzB,EAAoC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAClDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,qDAAoDF,GAAI,mEAAjF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,6DAAL,EAAoEG,wBAApE,EAA0FN,SAA1F,EAA4GO,iBAA5G;AACA,kBAAK,0DAAL,EAAiED,wBAAjE,EAAuFN,SAAvF,EAAyGQ,cAAzG;AACA,kBAAK,8DAAL,EAAqEF,wBAArE,EAA2FN,SAA3F,EAA6GS,kBAA7G;AACA,kBAAK,4DAAL,EAAmEH,wBAAnE,EAAyFN,SAAzF,EAA2GU,gBAA3G","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"}
@@ -0,0 +1,53 @@
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 _listItem = _interopRequireDefault(require("../list-item"));
11
+
12
+ var _title = _interopRequireDefault(require("../../atom/title"));
13
+
14
+ var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
15
+
16
+ var _style = _interopRequireDefault(require("./style.css"));
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+
20
+ const ListItems = ({
21
+ title,
22
+ buttonLink,
23
+ items,
24
+ 'aria-label': ariaLabel
25
+ }) => {
26
+ const itemsView = items.map(item => /*#__PURE__*/_react.default.createElement("li", {
27
+ key: item.id,
28
+ className: _style.default.item
29
+ }, /*#__PURE__*/_react.default.createElement(_listItem.default, item)));
30
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
31
+ className: _style.default.header
32
+ }, /*#__PURE__*/_react.default.createElement("div", {
33
+ className: _style.default.title
34
+ }, /*#__PURE__*/_react.default.createElement(_title.default, {
35
+ title: title,
36
+ type: 'form-group'
37
+ })), /*#__PURE__*/_react.default.createElement("div", {
38
+ className: _style.default.buttonCreate
39
+ }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonLink))), /*#__PURE__*/_react.default.createElement("ul", {
40
+ className: _style.default.list,
41
+ "aria-label": ariaLabel
42
+ }, itemsView));
43
+ };
44
+
45
+ ListItems.propTypes = process.env.NODE_ENV !== "production" ? {
46
+ 'aria-label': _propTypes.default.string,
47
+ buttonLink: _propTypes.default.shape(_buttonLink.default.propTypes),
48
+ items: _propTypes.default.arrayOf(_propTypes.default.shape(_listItem.default.propTypes)),
49
+ title: _propTypes.default.string
50
+ } : {};
51
+ var _default = ListItems;
52
+ exports.default = _default;
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/organism/list-items/index.js"],"names":["ListItems","title","buttonLink","items","ariaLabel","itemsView","map","item","id","style","header","buttonCreate","list","propTypes","PropTypes","string","shape","ButtonLink","arrayOf","ListItem"],"mappings":";;;;;AAAA;;AACA;;AAEA;;AACA;;AAEA;;AACA;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;AAACC,EAAAA,KAAD;AAAQC,EAAAA,UAAR;AAAoBC,EAAAA,KAApB;AAA2B,gBAAcC;AAAzC,CAAD,KAAyD;AACzE,QAAMC,SAAS,GAAGF,KAAK,CAACG,GAAN,CAAUC,IAAI,iBAC9B;AAAI,IAAA,GAAG,EAAEA,IAAI,CAACC,EAAd;AAAkB,IAAA,SAAS,EAAEC,eAAMF;AAAnC,kBACE,6BAAC,iBAAD,EAAcA,IAAd,CADF,CADgB,CAAlB;AAMA,sBACE,uDACE;AAAK,IAAA,SAAS,EAAEE,eAAMC;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAED,eAAMR;AAAtB,kBACE,6BAAC,cAAD;AAAO,IAAA,KAAK,EAAEA,KAAd;AAAqB,IAAA,IAAI,EAAE;AAA3B,IADF,CADF,eAIE;AAAK,IAAA,SAAS,EAAEQ,eAAME;AAAtB,kBACE,6BAAC,mBAAD,EAAgBT,UAAhB,CADF,CAJF,CADF,eASE;AAAI,IAAA,SAAS,EAAEO,eAAMG,IAArB;AAA2B,kBAAYR;AAAvC,KACGC,SADH,CATF,CADF;AAeD,CAtBD;;AAwBAL,SAAS,CAACa,SAAV,2CAAsB;AACpB,gBAAcC,mBAAUC,MADJ;AAEpBb,EAAAA,UAAU,EAAEY,mBAAUE,KAAV,CAAgBC,oBAAWJ,SAA3B,CAFQ;AAGpBV,EAAAA,KAAK,EAAEW,mBAAUI,OAAV,CAAkBJ,mBAAUE,KAAV,CAAgBG,kBAASN,SAAzB,CAAlB,CAHa;AAIpBZ,EAAAA,KAAK,EAAEa,mBAAUC;AAJG,CAAtB;eAOef,S","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport ListItem from '../list-item';\nimport Title from '../../atom/title';\n\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel}) => {\n const itemsView = items.map(item => (\n <li key={item.id} className={style.item}>\n <ListItem {...item} />\n </li>\n ));\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} />\n </div>\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n <ul className={style.list} aria-label={ariaLabel}>\n {itemsView}\n </ul>\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string\n};\n\nexport default ListItems;\n"],"file":"index.js"}
@@ -0,0 +1,39 @@
1
+ @value breakpoints: "../../variables/breakpoints.css";
2
+ @value mobile from breakpoints;
3
+ @value colors: "../../variables/colors.css";
4
+ @value medium from colors;
5
+ @value xtraLightGrey from colors;
6
+ @value dark from colors;
7
+
8
+ .header {
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ padding: 0 24px;
13
+ margin-bottom: 24px;
14
+ }
15
+
16
+ .title {
17
+ font-family: Gilroy;
18
+ font-size: 20px;
19
+ font-weight: bold;
20
+ font-stretch: normal;
21
+ font-style: normal;
22
+ line-height: 1.4;
23
+ letter-spacing: normal;
24
+ text-align: left;
25
+ }
26
+
27
+ .buttonCreate {
28
+ width: 194px;
29
+ }
30
+
31
+ .item {
32
+ margin-bottom: 8px;
33
+ }
34
+
35
+ .list {
36
+ list-style-type: none;
37
+ margin: 0;
38
+ padding: 0;
39
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _archived = _interopRequireDefault(require("../../../list-item/test/fixtures/archived"));
7
+
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+
10
+ 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); }
11
+
12
+ const ids = ['1', '2', '3'];
13
+ const listeItems = ids.map(id => {
14
+ return _extends(_extends({}, _archived.default.props), {}, {
15
+ id
16
+ });
17
+ });
18
+ var _default = {
19
+ props: {
20
+ title: `${listeItems.length} custom playlists`,
21
+ 'aria-label': 'aria list',
22
+ buttonLink: {
23
+ type: 'primary',
24
+ label: 'Create custom playlist',
25
+ 'aria-label': 'aria button',
26
+ 'data-name': 'default-button',
27
+ onClick: () => console.log('click')
28
+ },
29
+ items: listeItems
30
+ }
31
+ };
32
+ exports.default = _default;
33
+ //# sourceMappingURL=archived.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/list-items/test/fixtures/archived.js"],"names":["ids","listeItems","map","id","archivedItem","props","title","length","buttonLink","type","label","onClick","console","log","items"],"mappings":";;;;;AAAA;;;;;;AAEA,MAAMA,GAAG,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,CAAZ;AACA,MAAMC,UAAU,GAAGD,GAAG,CAACE,GAAJ,CAAQC,EAAE,IAAI;AAC/B,+BACKC,kBAAaC,KADlB;AAEEF,IAAAA;AAFF;AAID,CALkB,CAAnB;eAOe;AACbE,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAG,GAAEL,UAAU,CAACM,MAAO,mBADvB;AAEL,kBAAc,WAFT;AAGLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,IAAI,EAAE,SADI;AAEVC,MAAAA,KAAK,EAAE,wBAFG;AAGV,oBAAc,aAHJ;AAIV,mBAAa,gBAJH;AAKVC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AALL,KAHP;AAULC,IAAAA,KAAK,EAAEb;AAVF;AADM,C","sourcesContent":["import archivedItem from '../../../list-item/test/fixtures/archived';\n\nconst ids = ['1', '2', '3'];\nconst listeItems = ids.map(id => {\n return {\n ...archivedItem.props,\n id\n };\n});\n\nexport default {\n props: {\n title: `${listeItems.length} custom playlists`,\n 'aria-label': 'aria list',\n buttonLink: {\n type: 'primary',\n label: 'Create custom playlist',\n 'aria-label': 'aria button',\n 'data-name': 'default-button',\n onClick: () => console.log('click')\n },\n items: listeItems\n }\n};\n"],"file":"archived.js"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _draft = _interopRequireDefault(require("../../../list-item/test/fixtures/draft"));
7
+
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+
10
+ 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); }
11
+
12
+ const ids = ['1', '2', '3'];
13
+ const listeItems = ids.map(id => {
14
+ return _extends(_extends({}, _draft.default.props), {}, {
15
+ id
16
+ });
17
+ });
18
+ var _default = {
19
+ props: {
20
+ title: `${listeItems.length} custom playlists`,
21
+ 'aria-label': 'aria list',
22
+ buttonLink: {
23
+ type: 'primary',
24
+ label: 'Create custom playlist',
25
+ 'aria-label': 'aria button',
26
+ 'data-name': 'default-button',
27
+ onClick: () => console.log('click')
28
+ },
29
+ items: listeItems
30
+ }
31
+ };
32
+ exports.default = _default;
33
+ //# sourceMappingURL=draft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/list-items/test/fixtures/draft.js"],"names":["ids","listeItems","map","id","draftItem","props","title","length","buttonLink","type","label","onClick","console","log","items"],"mappings":";;;;;AAAA;;;;;;AAEA,MAAMA,GAAG,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,CAAZ;AACA,MAAMC,UAAU,GAAGD,GAAG,CAACE,GAAJ,CAAQC,EAAE,IAAI;AAC/B,+BACKC,eAAUC,KADf;AAEEF,IAAAA;AAFF;AAID,CALkB,CAAnB;eAOe;AACbE,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAG,GAAEL,UAAU,CAACM,MAAO,mBADvB;AAEL,kBAAc,WAFT;AAGLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,IAAI,EAAE,SADI;AAEVC,MAAAA,KAAK,EAAE,wBAFG;AAGV,oBAAc,aAHJ;AAIV,mBAAa,gBAJH;AAKVC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AALL,KAHP;AAULC,IAAAA,KAAK,EAAEb;AAVF;AADM,C","sourcesContent":["import draftItem from '../../../list-item/test/fixtures/draft';\n\nconst ids = ['1', '2', '3'];\nconst listeItems = ids.map(id => {\n return {\n ...draftItem.props,\n id\n };\n});\n\nexport default {\n props: {\n title: `${listeItems.length} custom playlists`,\n 'aria-label': 'aria list',\n buttonLink: {\n type: 'primary',\n label: 'Create custom playlist',\n 'aria-label': 'aria button',\n 'data-name': 'default-button',\n onClick: () => console.log('click')\n },\n items: listeItems\n }\n};\n"],"file":"draft.js"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _published = _interopRequireDefault(require("../../../list-item/test/fixtures/published"));
7
+
8
+ var _revised = _interopRequireDefault(require("../../../list-item/test/fixtures/revised"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ 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); }
13
+
14
+ const propsRevised = _revised.default.props;
15
+ const ids = ['1', '2', '3'];
16
+ const listePublishedItems = ids.map(id => {
17
+ return _extends(_extends({}, _published.default.props), {}, {
18
+ id
19
+ });
20
+ });
21
+ var _default = {
22
+ props: {
23
+ title: `${listePublishedItems.length + 1} custom playlists`,
24
+ 'aria-label': 'aria list',
25
+ buttonLink: {
26
+ type: 'primary',
27
+ label: 'Create custom playlist',
28
+ 'aria-label': 'aria button',
29
+ 'data-name': 'default-button',
30
+ onClick: () => console.log('click')
31
+ },
32
+ items: [...listePublishedItems, propsRevised]
33
+ }
34
+ };
35
+ exports.default = _default;
36
+ //# sourceMappingURL=published.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/list-items/test/fixtures/published.js"],"names":["propsRevised","revisedItem","props","ids","listePublishedItems","map","id","publishedItem","title","length","buttonLink","type","label","onClick","console","log","items"],"mappings":";;;;;AAAA;;AACA;;;;;;AAEA,MAAMA,YAAY,GAAGC,iBAAYC,KAAjC;AAEA,MAAMC,GAAG,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,CAAZ;AACA,MAAMC,mBAAmB,GAAGD,GAAG,CAACE,GAAJ,CAAQC,EAAE,IAAI;AACxC,+BACKC,mBAAcL,KADnB;AAEEI,IAAAA;AAFF;AAID,CAL2B,CAA5B;eAOe;AACbJ,EAAAA,KAAK,EAAE;AACLM,IAAAA,KAAK,EAAG,GAAEJ,mBAAmB,CAACK,MAApB,GAA6B,CAAE,mBADpC;AAEL,kBAAc,WAFT;AAGLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,IAAI,EAAE,SADI;AAEVC,MAAAA,KAAK,EAAE,wBAFG;AAGV,oBAAc,aAHJ;AAIV,mBAAa,gBAJH;AAKVC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AALL,KAHP;AAULC,IAAAA,KAAK,EAAE,CAAC,GAAGZ,mBAAJ,EAAyBJ,YAAzB;AAVF;AADM,C","sourcesContent":["import publishedItem from '../../../list-item/test/fixtures/published';\nimport revisedItem from '../../../list-item/test/fixtures/revised';\n\nconst propsRevised = revisedItem.props;\n\nconst ids = ['1', '2', '3'];\nconst listePublishedItems = ids.map(id => {\n return {\n ...publishedItem.props,\n id\n };\n});\n\nexport default {\n props: {\n title: `${listePublishedItems.length + 1} custom playlists`,\n 'aria-label': 'aria list',\n buttonLink: {\n type: 'primary',\n label: 'Create custom playlist',\n 'aria-label': 'aria button',\n 'data-name': 'default-button',\n onClick: () => console.log('click')\n },\n items: [...listePublishedItems, propsRevised]\n }\n};\n"],"file":"published.js"}
@@ -17,6 +17,8 @@ var _isEmpty = _interopRequireDefault(require("lodash/fp/isEmpty"));
17
17
 
18
18
  var _find = _interopRequireDefault(require("lodash/fp/find"));
19
19
 
20
+ var _classnames = _interopRequireDefault(require("classnames"));
21
+
20
22
  var _brandTabs = _interopRequireDefault(require("../../../molecule/brand-tabs"));
21
23
 
22
24
  var _sidebar = require("../../../organism/sidebar");
@@ -82,7 +84,7 @@ const buildLeftNavigation = (logo, items, onItemClick) => {
82
84
  className: _style.default.subTabsView
83
85
  }, subTabsView(tab.tabs)))(items);
84
86
  return /*#__PURE__*/_react.default.createElement("div", {
85
- className: _style.default.leftMenu
87
+ className: _style.default.navigation
86
88
  }, /*#__PURE__*/_react.default.createElement("div", {
87
89
  className: _style.default.logo
88
90
  }, /*#__PURE__*/_react.default.createElement("a", {
@@ -112,10 +114,9 @@ const buildNotifications = notifications => {
112
114
  }, notificationsList);
113
115
  };
114
116
 
115
- const buildHeader = (header, notifications) => {
116
- const headerStyle = (0, _isEmpty.default)(notifications) ? _style.default.header : _style.default.headerForNotifications;
117
+ const buildHeader = header => {
117
118
  return /*#__PURE__*/_react.default.createElement("div", {
118
- className: headerStyle
119
+ className: _style.default.header
119
120
  }, /*#__PURE__*/_react.default.createElement(_setupHeader.default, header));
120
121
  };
121
122
 
@@ -179,11 +180,18 @@ const BrandUpdate = props => {
179
180
  const tabsView = buildTabs(items);
180
181
  const contentView = buildContentView(content);
181
182
  const detailsView = buildDetailsView(details);
183
+ const contentStyle = (0, _classnames.default)([_style.default.content, !(0, _isEmpty.default)(notifications) && _style.default.contentWithNotifications]);
182
184
  return /*#__PURE__*/_react.default.createElement("div", {
183
185
  className: _style.default.container
184
- }, leftNavigation, /*#__PURE__*/_react.default.createElement("div", {
186
+ }, /*#__PURE__*/_react.default.createElement("div", {
187
+ className: _style.default.left
188
+ }, leftNavigation), /*#__PURE__*/_react.default.createElement("div", {
185
189
  className: _style.default.contentWrapper
186
- }, headerView, notificationsView, tabsView, contentView, detailsView));
190
+ }, /*#__PURE__*/_react.default.createElement("div", {
191
+ className: _style.default.headerSticky
192
+ }, headerView), /*#__PURE__*/_react.default.createElement("div", {
193
+ className: contentStyle
194
+ }, notificationsView, tabsView, contentView, detailsView)));
187
195
  };
188
196
 
189
197
  BrandUpdate.defaultProps = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/template/back-office/brand-update/index.js"],"names":["getStyle","isSelected","style","selectedElement","unselectedElement","subTabsView","_subTabs","map","convert","cap","subTab","_index","title","type","selected","buildLeftNavigation","logo","items","onItemClick","formattedTabs","key","href","index","children","iconType","formattedTabsViews","tab","tabs","leftMenu","buildNotifications","notifications","notificationsList","notification","buildHeader","header","headerStyle","headerForNotifications","buildTabs","selectedTab","e","showTabs","subTabs","buildContentView","content","buildDetailsView","details","BrandUpdate","props","leftNavigation","notificationsView","headerView","tabsView","contentView","detailsView","container","contentWrapper","defaultProps","propTypes","PropTypes","arrayOf","shape","Banner","Header","string","isRequired","bool","oneOfType","BrandForm","oneOf","BrandTable","BrandUpload","BrandAnalytics","BrandDashboard","func"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,QAAQ,GAAGC,UAAU,IAAKA,UAAU,GAAGC,eAAMC,eAAT,GAA2BD,eAAME,iBAA3E;;AAEA,MAAMC,WAAW,GAAG,CAACC,QAAQ,GAAG,EAAZ,KAClBC,aAAIC,OAAJ,CAAY;AAACC,EAAAA,GAAG,EAAE;AAAN,CAAZ,EAA0B,CAACC,MAAD,EAASC,MAAT,kBACxB;AAAK,EAAA,GAAG,EAAED,MAAM,CAACE;AAAjB,GACGF,MAAM,CAACG,IAAP,KAAgB,UAAhB,gBACC,6BAAC,qBAAD,eACMH,MADN;AAEE,EAAA,MAAM,EAAEV,QAAQ,CAACU,MAAM,CAACI,QAAR,CAFlB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B,CA5Ba;AAuDtBvB,EAAAA,OAAO,EAAEa,mBAAUE,KAAV,uBACJS,oBAAWZ,SADP;AAEPrC,IAAAA,GAAG,EAAEsC,mBAAUK,MAFR;AAGPlD,IAAAA,IAAI,EAAE6C,mBAAUU,KAAV,CAAgB,CAAC,MAAD,CAAhB;AAHC,KAvDa;AA4DtBlD,EAAAA,WAAW,EAAEwC,mBAAUe;AA5DD,CAAxB;eA+De3B,W","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport map from 'lodash/fp/map';\nimport pipe from 'lodash/fp/pipe';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport find from 'lodash/fp/find';\nimport BrandTabs from '../../../molecule/brand-tabs';\nimport {IconLinkItem, LinkItem} from '../../../organism/sidebar';\nimport BrandForm from '../../../organism/brand-form';\nimport BrandTable from '../../../organism/brand-table';\nimport BrandUpload from '../../../organism/brand-upload';\nimport BrandAnalytics from '../../../organism/brand-analytics';\nimport BrandDashboard from '../../../organism/brand-dashboard';\nimport Banner from '../../../molecule/banner';\nimport Header from '../../../organism/setup-header';\nimport Loader from '../../../atom/loader';\nimport Accordion from '../../../organism/accordion/coorp-manager';\nimport style from './style.css';\n\nconst getStyle = isSelected => (isSelected ? style.selectedElement : style.unselectedElement);\n\nconst subTabsView = (_subTabs = []) =>\n map.convert({cap: false})((subTab, _index) => (\n <div key={subTab.title}>\n {subTab.type === 'iconLink' ? (\n <IconLinkItem\n {...subTab}\n styles={getStyle(subTab.selected)}\n uppercase={false}\n target={'_blank'}\n />\n ) : (\n <LinkItem {...subTab} styles={getStyle(subTab.selected)} uppercase={false} />\n )}\n </div>\n ))(_subTabs);\n\n// TODO: this fonction should be replaced by a molecule to avoid this file to be unreadable\nconst buildLeftNavigation = (logo, items, onItemClick) => {\n const formattedTabs = items.map(({key, title, href, selected, type = 'simpleTab'}, index) => ({\n title,\n selected,\n type,\n href,\n index,\n children: [],\n iconType: key || 'arrow'\n }));\n\n const formattedTabsViews = map(tab => (\n <div key={tab.title} className={style.subTabsView}>\n {subTabsView(tab.tabs)}\n </div>\n ))(items);\n\n return (\n <div className={style.leftMenu}>\n <div className={style.logo}>\n <a href=\"/\">\n <img src={logo} />\n </a>\n </div>\n <Accordion tabProps={formattedTabs} theme={'setup'} onClick={onItemClick}>\n {formattedTabsViews}\n </Accordion>\n </div>\n );\n};\n\nconst buildNotifications = notifications => {\n if (isEmpty(notifications)) {\n return null;\n }\n\n const notificationsList = notifications.map((notification, index) => {\n return (\n <div className={style.notification} key={index}>\n <Banner {...notification} />\n </div>\n );\n });\n return <div className={style.notifications}>{notificationsList}</div>;\n};\n\nconst buildHeader = (header, notifications) => {\n const headerStyle = isEmpty(notifications) ? style.header : style.headerForNotifications;\n return (\n <div className={headerStyle}>\n <Header {...header} />\n </div>\n );\n};\n\nconst buildTabs = items => {\n const selectedTab = pipe(\n find(e => e.selected),\n get('tabs'),\n find(e => e.selected)\n )(items);\n\n const showTabs = selectedTab && !isEmpty(selectedTab.subTabs);\n if (!showTabs) return null;\n return (\n <div className={style.tabs}>\n <BrandTabs type=\"light\" tabs={selectedTab.subTabs} />\n </div>\n );\n};\n\nconst buildContentView = content => {\n if (!content) {\n return (\n <div>\n <Loader />\n </div>\n );\n }\n\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'list':\n return <BrandTable {...content} />;\n case 'upload':\n return <BrandUpload {...content} />;\n case 'analytics-dashboards':\n return <BrandAnalytics {...content} />;\n case 'home':\n return <BrandDashboard {...content} />;\n }\n};\n\nconst buildDetailsView = details => {\n if (!details) return;\n return <BrandTable {...details} />;\n};\n\nconst BrandUpdate = props => {\n const {notifications, header, items, content, details, onItemClick} = props;\n const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';\n\n const leftNavigation = buildLeftNavigation(logo, items, onItemClick);\n const notificationsView = buildNotifications(notifications);\n const headerView = buildHeader(header, notifications);\n const tabsView = buildTabs(items);\n const contentView = buildContentView(content);\n const detailsView = buildDetailsView(details);\n\n return (\n <div className={style.container}>\n {leftNavigation}\n <div className={style.contentWrapper}>\n {headerView}\n {notificationsView}\n {tabsView}\n {contentView}\n {detailsView}\n </div>\n </div>\n );\n};\n\nBrandUpdate.defaultProps = {\n notifications: []\n};\n\nBrandUpdate.propTypes = {\n notifications: PropTypes.arrayOf(PropTypes.shape(Banner.propTypes)),\n header: PropTypes.shape({...Header.propTypes}),\n items: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n subTabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string\n })\n )\n })\n )\n })\n ).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n PropTypes.shape({\n ...BrandUpload.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['upload'])\n }),\n PropTypes.shape({\n ...BrandAnalytics.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['analytics-dashboards'])\n }),\n PropTypes.shape({\n ...BrandDashboard.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['home'])\n })\n ]),\n details: PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n onItemClick: PropTypes.func\n};\n\nexport default BrandUpdate;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../../src/template/back-office/brand-update/index.js"],"names":["getStyle","isSelected","style","selectedElement","unselectedElement","subTabsView","_subTabs","map","convert","cap","subTab","_index","title","type","selected","buildLeftNavigation","logo","items","onItemClick","formattedTabs","key","href","index","children","iconType","formattedTabsViews","tab","tabs","navigation","buildNotifications","notifications","notificationsList","notification","buildHeader","header","buildTabs","selectedTab","e","showTabs","subTabs","buildContentView","content","buildDetailsView","details","BrandUpdate","props","leftNavigation","notificationsView","headerView","tabsView","contentView","detailsView","contentStyle","contentWithNotifications","container","left","contentWrapper","headerSticky","defaultProps","propTypes","PropTypes","arrayOf","shape","Banner","Header","string","isRequired","bool","oneOfType","BrandForm","oneOf","BrandTable","BrandUpload","BrandAnalytics","BrandDashboard","func"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,QAAQ,GAAGC,UAAU,IAAKA,UAAU,GAAGC,eAAMC,eAAT,GAA2BD,eAAME,iBAA3E;;AAEA,MAAMC,WAAW,GAAG,CAACC,QAAQ,GAAG,EAAZ,KAClBC,aAAIC,OAAJ,CAAY;AAACC,EAAAA,GAAG,EAAE;AAAN,CAAZ,EAA0B,CAACC,MAAD,EAASC,MAAT,kBACxB;AAAK,EAAA,GAAG,EAAED,MAAM,CAACE;AAAjB,GACGF,MAAM,CAACG,IAAP,KAAgB,UAAhB,gBACC,6BAAC,qBAAD,eACMH,MADN;AAEE,EAAA,MAAM,EAAEV,QAAQ,CAACU,MAAM,CAACI,QAAR,CAFlB;AAGE,EAAA,SAAS,EAAE,KAHb;AAIE,EAAA,MAAM,EAAE;AAJV,GADD,gBAQC,6BAAC,iBAAD,eAAcJ,MAAd;AAAsB,EAAA,MAAM,EAAEV,QAAQ,CAACU,MAAM,CAACI,QAAR,CAAtC;AAAyD,EAAA,SAAS,EAAE;AAApE,GATJ,CADF,EAaGR,QAbH,CADF,C,CAgBA;;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,mBAAUE,KAAV,uBACJS,oBAAWZ,SADP;AAEPvC,IAAAA,GAAG,EAAEwC,mBAAUK,MAFR;AAGPpD,IAAAA,IAAI,EAAE+C,mBAAUU,KAAV,CAAgB,CAAC,MAAD,CAAhB;AAHC,KAvDa;AA4DtBpD,EAAAA,WAAW,EAAE0C,mBAAUe;AA5DD,CAAxB;eA+De/B,W","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport map from 'lodash/fp/map';\nimport pipe from 'lodash/fp/pipe';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport find from 'lodash/fp/find';\nimport classNames from 'classnames';\nimport BrandTabs from '../../../molecule/brand-tabs';\nimport {IconLinkItem, LinkItem} from '../../../organism/sidebar';\nimport BrandForm from '../../../organism/brand-form';\nimport BrandTable from '../../../organism/brand-table';\nimport BrandUpload from '../../../organism/brand-upload';\nimport BrandAnalytics from '../../../organism/brand-analytics';\nimport BrandDashboard from '../../../organism/brand-dashboard';\nimport Banner from '../../../molecule/banner';\nimport Header from '../../../organism/setup-header';\nimport Loader from '../../../atom/loader';\nimport Accordion from '../../../organism/accordion/coorp-manager';\nimport style from './style.css';\n\nconst getStyle = isSelected => (isSelected ? style.selectedElement : style.unselectedElement);\n\nconst subTabsView = (_subTabs = []) =>\n map.convert({cap: false})((subTab, _index) => (\n <div key={subTab.title}>\n {subTab.type === 'iconLink' ? (\n <IconLinkItem\n {...subTab}\n styles={getStyle(subTab.selected)}\n uppercase={false}\n target={'_blank'}\n />\n ) : (\n <LinkItem {...subTab} styles={getStyle(subTab.selected)} uppercase={false} />\n )}\n </div>\n ))(_subTabs);\n\n// TODO: this fonction should be replaced by a molecule to avoid this file to be unreadable\nconst buildLeftNavigation = (logo, items, onItemClick) => {\n const formattedTabs = items.map(({key, title, href, selected, type = 'simpleTab'}, index) => ({\n title,\n selected,\n type,\n href,\n index,\n children: [],\n iconType: key || 'arrow'\n }));\n\n const formattedTabsViews = map(tab => (\n <div key={tab.title} className={style.subTabsView}>\n {subTabsView(tab.tabs)}\n </div>\n ))(items);\n\n return (\n <div className={style.navigation}>\n <div className={style.logo}>\n <a href=\"/\">\n <img src={logo} />\n </a>\n </div>\n <Accordion tabProps={formattedTabs} theme={'setup'} onClick={onItemClick}>\n {formattedTabsViews}\n </Accordion>\n </div>\n );\n};\n\nconst buildNotifications = notifications => {\n if (isEmpty(notifications)) {\n return null;\n }\n\n const notificationsList = notifications.map((notification, index) => {\n return (\n <div className={style.notification} key={index}>\n <Banner {...notification} />\n </div>\n );\n });\n return <div className={style.notifications}>{notificationsList}</div>;\n};\n\nconst buildHeader = header => {\n return (\n <div className={style.header}>\n <Header {...header} />\n </div>\n );\n};\n\nconst buildTabs = items => {\n const selectedTab = pipe(\n find(e => e.selected),\n get('tabs'),\n find(e => e.selected)\n )(items);\n\n const showTabs = selectedTab && !isEmpty(selectedTab.subTabs);\n if (!showTabs) return null;\n return (\n <div className={style.tabs}>\n <BrandTabs type=\"light\" tabs={selectedTab.subTabs} />\n </div>\n );\n};\n\nconst buildContentView = content => {\n if (!content) {\n return (\n <div>\n <Loader />\n </div>\n );\n }\n\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'list':\n return <BrandTable {...content} />;\n case 'upload':\n return <BrandUpload {...content} />;\n case 'analytics-dashboards':\n return <BrandAnalytics {...content} />;\n case 'home':\n return <BrandDashboard {...content} />;\n }\n};\n\nconst buildDetailsView = details => {\n if (!details) return;\n return <BrandTable {...details} />;\n};\n\nconst BrandUpdate = props => {\n const {notifications, header, items, content, details, onItemClick} = props;\n const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';\n\n const leftNavigation = buildLeftNavigation(logo, items, onItemClick);\n const notificationsView = buildNotifications(notifications);\n const headerView = buildHeader(header, notifications);\n const tabsView = buildTabs(items);\n const contentView = buildContentView(content);\n const detailsView = buildDetailsView(details);\n\n const contentStyle = classNames([\n style.content,\n !isEmpty(notifications) && style.contentWithNotifications\n ]);\n\n return (\n <div className={style.container}>\n <div className={style.left}>{leftNavigation}</div>\n <div className={style.contentWrapper}>\n <div className={style.headerSticky}>{headerView}</div>\n <div className={contentStyle}>\n {notificationsView}\n {tabsView}\n {contentView}\n {detailsView}\n </div>\n </div>\n </div>\n );\n};\n\nBrandUpdate.defaultProps = {\n notifications: []\n};\n\nBrandUpdate.propTypes = {\n notifications: PropTypes.arrayOf(PropTypes.shape(Banner.propTypes)),\n header: PropTypes.shape({...Header.propTypes}),\n items: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n subTabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string\n })\n )\n })\n )\n })\n ).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n PropTypes.shape({\n ...BrandUpload.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['upload'])\n }),\n PropTypes.shape({\n ...BrandAnalytics.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['analytics-dashboards'])\n }),\n PropTypes.shape({\n ...BrandDashboard.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['home'])\n })\n ]),\n details: PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n onItemClick: PropTypes.func\n};\n\nexport default BrandUpdate;\n"],"file":"index.js"}
@@ -1,5 +1,6 @@
1
1
  @value colors: "../../../variables/colors.css";
2
2
  @value light from colors;
3
+ @value white from colors;
3
4
  @value xtraLightGrey from colors;
4
5
  @value cm_grey_100 from colors;
5
6
  @value black from colors;
@@ -11,21 +12,31 @@
11
12
  @value wide from breakpoints;
12
13
 
13
14
  .container {
14
- width: 100%;
15
15
  height: 100%;
16
16
  scroll-behavior: unset;
17
17
  margin: 0 auto;
18
- padding-bottom: 80px 20px;
19
18
  display: flex;
20
- font-family: "Open Sans";
21
19
  }
22
20
 
23
- .header {
24
- margin: 24px 0 56px 0;
21
+ .left {
22
+ width: 223px;
25
23
  }
26
24
 
27
- .headerForNotifications {
28
- margin: 24px 0 0 0;
25
+ .contentWrapper {
26
+ width: calc(100% - 351px);
27
+ padding: 0 64px 0 64px;
28
+ }
29
+
30
+ .headerSticky {
31
+ overflow: hidden;
32
+ background-color: white;
33
+ position: fixed;
34
+ width: calc(100% - 351px);
35
+ z-index: 999;
36
+ }
37
+
38
+ .header {
39
+ padding: 24px 0 5px 0;
29
40
  }
30
41
 
31
42
  .tabs {
@@ -42,7 +53,7 @@
42
53
  }
43
54
 
44
55
  .notifications {
45
- padding: 24px 0 32px 0;
56
+ padding: 0 0 32px 0;
46
57
  }
47
58
 
48
59
  .notification {
@@ -53,18 +64,27 @@
53
64
  margin-bottom: 0;
54
65
  }
55
66
 
56
- .leftMenu {
67
+ .navigation {
57
68
  scroll-behavior: unset;
58
- min-width: 223px;
59
69
  background: xtraLightGrey;
70
+ position: fixed;
71
+ left: 0;
72
+ height: 100%;
73
+ overflow: scroll;
74
+ z-index: 999;
60
75
  }
61
76
 
62
- .contentWrapper {
77
+ .content {
63
78
  width: 100%;
64
- padding: 0 64px;
65
79
  display: flex;
66
80
  flex-direction: column;
67
81
  overflow: auto;
82
+ top: 124px;
83
+ position: relative;
84
+ }
85
+
86
+ .contentWithNotifications {
87
+ top: 100px;
68
88
  }
69
89
 
70
90
  .selectedElement {
@@ -90,11 +110,35 @@
90
110
  margin: 32px 20px 54px 20px;
91
111
  }
92
112
 
113
+ @media desktop {
114
+ .container {
115
+ scroll-behavior: unset;
116
+ margin: 0;
117
+ }
118
+
119
+ .headerSticky {
120
+ width: calc(100% - 287px);
121
+ }
122
+
123
+ .contentWrapper {
124
+ width: calc(100% - 287px);
125
+ padding: 0 32px 0 32px;
126
+ }
127
+ }
128
+
93
129
  @media tablet {
94
130
  .container {
95
131
  scroll-behavior: unset;
96
132
  margin: 0;
97
- padding: 10px 10px;
133
+ }
134
+
135
+ .headerSticky {
136
+ width: calc(100% - 287px);
137
+ }
138
+
139
+ .contentWrapper {
140
+ width: calc(100% - 287px);
141
+ padding: 0 32px 0 32px;
98
142
  }
99
143
  }
100
144
 
@@ -50,8 +50,6 @@ var _manageusersEdit = _interopRequireDefault(require("./fixtures/manageusers-ed
50
50
 
51
51
  var _manageusersList = _interopRequireDefault(require("./fixtures/manageusers-list"));
52
52
 
53
- var _manageusers = _interopRequireDefault(require("./fixtures/manageusers"));
54
-
55
53
  var _quickAccess = _interopRequireDefault(require("./fixtures/quick-access"));
56
54
 
57
55
  var _ssoActivate = _interopRequireDefault(require("./fixtures/sso-activate"));
@@ -93,7 +91,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
93
91
  (0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lookandfeel › should be rendered', _renderComponent.default, _.default, _lookandfeel.default);
94
92
  (0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersEdit › should be rendered', _renderComponent.default, _.default, _manageusersEdit.default);
95
93
  (0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersList › should be rendered', _renderComponent.default, _.default, _manageusersList.default);
96
- (0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Manageusers › should be rendered', _renderComponent.default, _.default, _manageusers.default);
97
94
  (0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › QuickAccess › should be rendered', _renderComponent.default, _.default, _quickAccess.default);
98
95
  (0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › SsoActivate › should be rendered', _renderComponent.default, _.default, _ssoActivate.default);
99
96
  (0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Sso › should be rendered', _renderComponent.default, _.default, _sso.default);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/template/back-office/brand-update/test/fixtures.js"],"names":["t","pass","TemplateBackOfficeBrandUpdate","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAnalytics","fixtureAnimations","fixtureCohortError","fixtureCohort","fixtureDashboard","fixtureDashboardsAnalytics","fixtureDefault","fixtureGeneralSettingsSuccess","fixtureGeneralSettings","fixtureLmsError","fixtureLmsModified","fixtureLmsSuccess","fixtureLms","fixtureLoader","fixtureLookandfeelError","fixtureLookandfeelModified","fixtureLookandfeelPending","fixtureLookandfeelSuccess","fixtureLookandfeel","fixtureManageusersEdit","fixtureManageusersList","fixtureManageusers","fixtureQuickAccess","fixtureSsoActivate","fixtureSso","fixtureUploadusersLoading","fixtureUploadusersSuccessful","fixtureUploadusers"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,kFAAL,EAAyFA,CAAC,IAAI;AAC5FA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA8BC,SAAtC,EAAiD,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,4EAA2EF,GAAI,mEAAxG;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,qFAAL,EAA4FG,wBAA5F,EAAkHN,SAAlH,EAAiJO,kBAAjJ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,SAApH,EAAmJyB,oBAAnJ;AACA,kBAAK,2FAAL,EAAkGnB,wBAAlG,EAAwHN,SAAxH,EAAuJ0B,wBAAvJ;AACA,kBAAK,2FAAL,EAAkGpB,wBAAlG,EAAwHN,SAAxH,EAAuJ2B,wBAAvJ;AACA,kBAAK,uFAAL,EAA8FrB,wBAA9F,EAAoHN,SAApH,EAAmJ4B,oBAAnJ;AACA,kBAAK,uFAAL,EAA8FtB,wBAA9F,EAAoHN,SAApH,EAAmJ6B,oBAAnJ;AACA,kBAAK,uFAAL,EAA8FvB,wBAA9F,EAAoHN,SAApH,EAAmJ8B,oBAAnJ;AACA,kBAAK,+EAAL,EAAsFxB,wBAAtF,EAA4GN,SAA5G,EAA2I+B,YAA3I;AACA,kBAAK,8FAAL,EAAqGzB,wBAArG,EAA2HN,SAA3H,EAA0JgC,2BAA1J;AACA,kBAAK,iGAAL,EAAwG1B,wBAAxG,EAA8HN,SAA9H,EAA6JiC,8BAA7J;AACA,kBAAK,uFAAL,EAA8F3B,wBAA9F,EAAoHN,SAApH,EAAmJkC,oBAAnJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport TemplateBackOfficeBrandUpdate from '..';\nimport fixtureAnalytics from './fixtures/analytics';\nimport fixtureAnimations from './fixtures/animations';\nimport fixtureCohortError from './fixtures/cohort-error';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureDashboard from './fixtures/dashboard';\nimport fixtureDashboardsAnalytics from './fixtures/dashboards-analytics';\nimport fixtureDefault from './fixtures/default';\nimport fixtureGeneralSettingsSuccess from './fixtures/general-settings-success';\nimport fixtureGeneralSettings from './fixtures/general-settings';\nimport fixtureLmsError from './fixtures/lms-error';\nimport fixtureLmsModified from './fixtures/lms-modified';\nimport fixtureLmsSuccess from './fixtures/lms-success';\nimport fixtureLms from './fixtures/lms';\nimport fixtureLoader from './fixtures/loader';\nimport fixtureLookandfeelError from './fixtures/lookandfeel-error';\nimport fixtureLookandfeelModified from './fixtures/lookandfeel-modified';\nimport fixtureLookandfeelPending from './fixtures/lookandfeel-pending';\nimport fixtureLookandfeelSuccess from './fixtures/lookandfeel-success';\nimport fixtureLookandfeel from './fixtures/lookandfeel';\nimport fixtureManageusersEdit from './fixtures/manageusers-edit';\nimport fixtureManageusersList from './fixtures/manageusers-list';\nimport fixtureManageusers from './fixtures/manageusers';\nimport fixtureQuickAccess from './fixtures/quick-access';\nimport fixtureSsoActivate from './fixtures/sso-activate';\nimport fixtureSso from './fixtures/sso';\nimport fixtureUploadusersLoading from './fixtures/uploadusers-loading';\nimport fixtureUploadusersSuccessful from './fixtures/uploadusers-successful';\nimport fixtureUploadusers from './fixtures/uploadusers';\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate > should have valid propTypes', t => {\n t.pass();\n forEach(TemplateBackOfficeBrandUpdate.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"TemplateBackOffice.TemplateBackOfficeBrandUpdate.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Analytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Animations › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnimations);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › CohortError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohortError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Cohort › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohort);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Dashboard › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboard);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › DashboardsAnalytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboardsAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Default › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDefault);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettingsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettingsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettings › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettings);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lms › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLms);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Loader › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLoader);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelPending › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelPending);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lookandfeel › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeel);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersEdit › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersEdit);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersList › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersList);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Manageusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusers);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › QuickAccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureQuickAccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › SsoActivate › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSsoActivate);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Sso › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSso);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersLoading › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersLoading);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersSuccessful › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersSuccessful);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Uploadusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusers);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../../src/template/back-office/brand-update/test/fixtures.js"],"names":["t","pass","TemplateBackOfficeBrandUpdate","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAnalytics","fixtureAnimations","fixtureCohortError","fixtureCohort","fixtureDashboard","fixtureDashboardsAnalytics","fixtureDefault","fixtureGeneralSettingsSuccess","fixtureGeneralSettings","fixtureLmsError","fixtureLmsModified","fixtureLmsSuccess","fixtureLms","fixtureLoader","fixtureLookandfeelError","fixtureLookandfeelModified","fixtureLookandfeelPending","fixtureLookandfeelSuccess","fixtureLookandfeel","fixtureManageusersEdit","fixtureManageusersList","fixtureQuickAccess","fixtureSsoActivate","fixtureSso","fixtureUploadusersLoading","fixtureUploadusersSuccessful","fixtureUploadusers"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,kFAAL,EAAyFA,CAAC,IAAI;AAC5FA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA8BC,SAAtC,EAAiD,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,4EAA2EF,GAAI,mEAAxG;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,qFAAL,EAA4FG,wBAA5F,EAAkHN,SAAlH,EAAiJO,kBAAjJ;AACA,kBAAK,sFAAL,EAA6FD,wBAA7F,EAAmHN,SAAnH,EAAkJQ,mBAAlJ;AACA,kBAAK,uFAAL,EAA8FF,wBAA9F,EAAoHN,SAApH,EAAmJS,oBAAnJ;AACA,kBAAK,kFAAL,EAAyFH,wBAAzF,EAA+GN,SAA/G,EAA8IU,eAA9I;AACA,kBAAK,qFAAL,EAA4FJ,wBAA5F,EAAkHN,SAAlH,EAAiJW,kBAAjJ;AACA,kBAAK,+FAAL,EAAsGL,wBAAtG,EAA4HN,SAA5H,EAA2JY,4BAA3J;AACA,kBAAK,mFAAL,EAA0FN,wBAA1F,EAAgHN,SAAhH,EAA+Ia,gBAA/I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wBAArG,EAA2HN,SAA3H,EAA0J+B,2BAA1J;AACA,kBAAK,iGAAL,EAAwGzB,wBAAxG,EAA8HN,SAA9H,EAA6JgC,8BAA7J;AACA,kBAAK,uFAAL,EAA8F1B,wBAA9F,EAAoHN,SAApH,EAAmJiC,oBAAnJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport TemplateBackOfficeBrandUpdate from '..';\nimport fixtureAnalytics from './fixtures/analytics';\nimport fixtureAnimations from './fixtures/animations';\nimport fixtureCohortError from './fixtures/cohort-error';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureDashboard from './fixtures/dashboard';\nimport fixtureDashboardsAnalytics from './fixtures/dashboards-analytics';\nimport fixtureDefault from './fixtures/default';\nimport fixtureGeneralSettingsSuccess from './fixtures/general-settings-success';\nimport fixtureGeneralSettings from './fixtures/general-settings';\nimport fixtureLmsError from './fixtures/lms-error';\nimport fixtureLmsModified from './fixtures/lms-modified';\nimport fixtureLmsSuccess from './fixtures/lms-success';\nimport fixtureLms from './fixtures/lms';\nimport fixtureLoader from './fixtures/loader';\nimport fixtureLookandfeelError from './fixtures/lookandfeel-error';\nimport fixtureLookandfeelModified from './fixtures/lookandfeel-modified';\nimport fixtureLookandfeelPending from './fixtures/lookandfeel-pending';\nimport fixtureLookandfeelSuccess from './fixtures/lookandfeel-success';\nimport fixtureLookandfeel from './fixtures/lookandfeel';\nimport fixtureManageusersEdit from './fixtures/manageusers-edit';\nimport fixtureManageusersList from './fixtures/manageusers-list';\nimport fixtureQuickAccess from './fixtures/quick-access';\nimport fixtureSsoActivate from './fixtures/sso-activate';\nimport fixtureSso from './fixtures/sso';\nimport fixtureUploadusersLoading from './fixtures/uploadusers-loading';\nimport fixtureUploadusersSuccessful from './fixtures/uploadusers-successful';\nimport fixtureUploadusers from './fixtures/uploadusers';\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate > should have valid propTypes', t => {\n t.pass();\n forEach(TemplateBackOfficeBrandUpdate.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"TemplateBackOffice.TemplateBackOfficeBrandUpdate.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Analytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Animations › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnimations);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › CohortError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohortError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Cohort › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohort);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Dashboard › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboard);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › DashboardsAnalytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboardsAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Default › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDefault);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettingsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettingsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettings › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettings);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lms › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLms);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Loader › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLoader);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelPending › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelPending);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lookandfeel › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeel);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersEdit › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersEdit);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersList › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersList);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › QuickAccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureQuickAccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › SsoActivate › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSsoActivate);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Sso › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSso);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersLoading › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersLoading);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersSuccessful › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersSuccessful);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Uploadusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusers);\n"],"file":"fixtures.js"}
@@ -34,15 +34,13 @@ const TeamsDashboard = ({
34
34
  isLoading
35
35
  }) => {
36
36
  const [isShadowed, setShadowed] = (0, _react.useState)(false);
37
- const onMenuOpen = (0, _react.useCallback)(() => setShadowed(true));
38
- const onMenuClose = (0, _react.useCallback)(() => setShadowed(false));
39
-
40
- const buildSection = (section, index) => {
37
+ const onMenuOpen = (0, _react.useCallback)(() => setShadowed(true), []);
38
+ const onMenuClose = (0, _react.useCallback)(() => setShadowed(false), []);
39
+ const buildSection = (0, _react.useCallback)((section, index) => {
41
40
  return /*#__PURE__*/_react.default.createElement(_cardsList.default, _extends({}, section, {
42
41
  key: section.title + index
43
42
  }));
44
- };
45
-
43
+ }, []);
46
44
  const sectionsList = (0, _react.useMemo)(() => _map2.default.convert({
47
45
  cap: false
48
46
  })(buildSection, sections), [buildSection, sections]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/template/teams-dashboard/index.js"],"names":["TeamsDashboard","logo","platformLinks","sections","isLoading","isShadowed","setShadowed","onMenuOpen","onMenuClose","buildSection","section","index","title","sectionsList","convert","cap","style","loader","shadowedTeamsDashboard","teamsDashboard","sectionsWrapper","propTypes","MoocHeader","PropTypes","arrayOf","shape","Cta","CardsList","bool"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;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F;AAqBD,CAjCD;;AAmCAb,cAAc,CAACqB,SAAf,2CAA2B;AACzBpB,EAAAA,IAAI,EAAEqB,oBAAWD,SAAX,CAAqBpB,IADF;AAEzBC,EAAAA,aAAa,EAAEqB,mBAAUC,OAAV,CAAkBD,mBAAUE,KAAV,CAAgBC,aAAIL,SAApB,CAAlB,CAFU;AAGzBlB,EAAAA,QAAQ,EAAEoB,mBAAUC,OAAV,CAAkBD,mBAAUE,KAAV,CAAgBE,mBAAUN,SAA1B,CAAlB,CAHe;AAIzBjB,EAAAA,SAAS,EAAEmB,mBAAUK;AAJI,CAA3B;eAOe5B,c","sourcesContent":["import React, {useState, useCallback, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport MoocHeader from '../../organism/mooc-header';\nimport Cta from '../../atom/cta';\nimport Loader from '../../atom/loader';\nimport CardsList from '../../molecule/dashboard/cards-list';\nimport style from './style.css';\n\nconst TeamsDashboard = ({logo, platformLinks, sections, isLoading}) => {\n const [isShadowed, setShadowed] = useState(false);\n const onMenuOpen = useCallback(() => setShadowed(true));\n const onMenuClose = useCallback(() => setShadowed(false));\n\n const buildSection = (section, index) => {\n return <CardsList {...section} key={section.title + index} />;\n };\n const sectionsList = useMemo(() => map.convert({cap: false})(buildSection, sections), [\n buildSection,\n sections\n ]);\n return isLoading ? (\n <div className={style.loader}>\n <Loader data-name=\"teams-dashboard-loader\" />\n </div>\n ) : (\n <div\n data-name=\"teams-dashboard\"\n className={isShadowed ? style.shadowedTeamsDashboard : style.teamsDashboard}\n >\n <MoocHeader\n data-name=\"teams-dashboard-header\"\n logo={logo}\n links={platformLinks}\n onMenuOpen={onMenuOpen}\n onMenuClose={onMenuClose}\n />\n <div data-name=\"sections-wrapper\" className={isShadowed ? style.sectionsWrapper : null}>\n {sectionsList}\n </div>\n </div>\n );\n};\n\nTeamsDashboard.propTypes = {\n logo: MoocHeader.propTypes.logo,\n platformLinks: PropTypes.arrayOf(PropTypes.shape(Cta.propTypes)),\n sections: PropTypes.arrayOf(PropTypes.shape(CardsList.propTypes)),\n isLoading: PropTypes.bool\n};\n\nexport default TeamsDashboard;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/template/teams-dashboard/index.js"],"names":["TeamsDashboard","logo","platformLinks","sections","isLoading","isShadowed","setShadowed","onMenuOpen","onMenuClose","buildSection","section","index","title","sectionsList","convert","cap","style","loader","shadowedTeamsDashboard","teamsDashboard","sectionsWrapper","propTypes","MoocHeader","PropTypes","arrayOf","shape","Cta","CardsList","bool"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,cAAc,GAAG,CAAC;AAACC,EAAAA,IAAD;AAAOC,EAAAA,aAAP;AAAsBC,EAAAA,QAAtB;AAAgCC,EAAAA;AAAhC,CAAD,KAAgD;AACrE,QAAM,CAACC,UAAD,EAAaC,WAAb,IAA4B,qBAAS,KAAT,CAAlC;AACA,QAAMC,UAAU,GAAG,wBAAY,MAAMD,WAAW,CAAC,IAAD,CAA7B,EAAqC,EAArC,CAAnB;AACA,QAAME,WAAW,GAAG,wBAAY,MAAMF,WAAW,CAAC,KAAD,CAA7B,EAAsC,EAAtC,CAApB;AAEA,QAAMG,YAAY,GAAG,wBAAY,CAACC,OAAD,EAAUC,KAAV,KAAoB;AACnD,wBAAO,6BAAC,kBAAD,eAAeD,OAAf;AAAwB,MAAA,GAAG,EAAEA,OAAO,CAACE,KAAR,GAAgBD;AAA7C,OAAP;AACD,GAFoB,EAElB,EAFkB,CAArB;AAIA,QAAME,YAAY,GAAG,oBAAQ,MAAM,cAAIC,OAAJ,CAAY;AAACC,IAAAA,GAAG,EAAE;AAAN,GAAZ,EAA0BN,YAA1B,EAAwCN,QAAxC,CAAd,EAAiE,CACpFM,YADoF,EAEpFN,QAFoF,CAAjE,CAArB;AAKA,SAAOC,SAAS,gBACd;AAAK,IAAA,SAAS,EAAEY,eAAMC;AAAtB,kBACE,6BAAC,eAAD;AAAQ,iBAAU;AAAlB,IADF,CADc,gBAKd;AACE,iBAAU,iBADZ;AAEE,IAAA,SAAS,EAAEZ,UAAU,GAAGW,eAAME,sBAAT,GAAkCF,eAAMG;AAF/D,kBAIE,6BAAC,mBAAD;AACE,iBAAU,wBADZ;AAEE,IAAA,IAAI,EAAElB,IAFR;AAGE,IAAA,KAAK,EAAEC,aAHT;AAIE,IAAA,UAAU,EAAEK,UAJd;AAKE,IAAA,WAAW,EAAEC;AALf,IAJF,eAWE;AAAK,iBAAU,kBAAf;AAAkC,IAAA,SAAS,EAAEH,UAAU,GAAGW,eAAMI,eAAT,GAA2B;AAAlF,KACGP,YADH,CAXF,CALF;AAqBD,CAnCD;;AAqCAb,cAAc,CAACqB,SAAf,2CAA2B;AACzBpB,EAAAA,IAAI,EAAEqB,oBAAWD,SAAX,CAAqBpB,IADF;AAEzBC,EAAAA,aAAa,EAAEqB,mBAAUC,OAAV,CAAkBD,mBAAUE,KAAV,CAAgBC,aAAIL,SAApB,CAAlB,CAFU;AAGzBlB,EAAAA,QAAQ,EAAEoB,mBAAUC,OAAV,CAAkBD,mBAAUE,KAAV,CAAgBE,mBAAUN,SAA1B,CAAlB,CAHe;AAIzBjB,EAAAA,SAAS,EAAEmB,mBAAUK;AAJI,CAA3B;eAOe5B,c","sourcesContent":["import React, {useState, useCallback, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport MoocHeader from '../../organism/mooc-header';\nimport Cta from '../../atom/cta';\nimport Loader from '../../atom/loader';\nimport CardsList from '../../molecule/dashboard/cards-list';\nimport style from './style.css';\n\nconst TeamsDashboard = ({logo, platformLinks, sections, isLoading}) => {\n const [isShadowed, setShadowed] = useState(false);\n const onMenuOpen = useCallback(() => setShadowed(true), []);\n const onMenuClose = useCallback(() => setShadowed(false), []);\n\n const buildSection = useCallback((section, index) => {\n return <CardsList {...section} key={section.title + index} />;\n }, []);\n\n const sectionsList = useMemo(() => map.convert({cap: false})(buildSection, sections), [\n buildSection,\n sections\n ]);\n\n return isLoading ? (\n <div className={style.loader}>\n <Loader data-name=\"teams-dashboard-loader\" />\n </div>\n ) : (\n <div\n data-name=\"teams-dashboard\"\n className={isShadowed ? style.shadowedTeamsDashboard : style.teamsDashboard}\n >\n <MoocHeader\n data-name=\"teams-dashboard-header\"\n logo={logo}\n links={platformLinks}\n onMenuOpen={onMenuOpen}\n onMenuClose={onMenuClose}\n />\n <div data-name=\"sections-wrapper\" className={isShadowed ? style.sectionsWrapper : null}>\n {sectionsList}\n </div>\n </div>\n );\n};\n\nTeamsDashboard.propTypes = {\n logo: MoocHeader.propTypes.logo,\n platformLinks: PropTypes.arrayOf(PropTypes.shape(Cta.propTypes)),\n sections: PropTypes.arrayOf(PropTypes.shape(CardsList.propTypes)),\n isLoading: PropTypes.bool\n};\n\nexport default TeamsDashboard;\n"],"file":"index.js"}