@coorpacademy/components 10.2.2 → 10.3.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 (135) hide show
  1. package/es/atom/wizard-steps/index.js +1 -1
  2. package/es/atom/wizard-steps/index.js.map +1 -1
  3. package/es/atom/wizard-steps/style.css +1 -6
  4. package/es/molecule/banner/test/fixtures.js +8 -0
  5. package/es/molecule/banner/test/fixtures.js.map +1 -1
  6. package/es/molecule/brand-form-group/style.css +1 -2
  7. package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
  8. package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  9. package/es/molecule/select-multiple/index.js +2 -2
  10. package/es/molecule/select-multiple/index.js.map +1 -1
  11. package/es/molecule/select-multiple/style.css +33 -16
  12. package/es/molecule/select-multiple/test/fixtures.js +8 -0
  13. package/es/molecule/select-multiple/test/fixtures.js.map +1 -1
  14. package/es/molecule/wizard-summary/index.js +4 -1
  15. package/es/molecule/wizard-summary/index.js.map +1 -1
  16. package/es/molecule/wizard-summary/style.css +18 -8
  17. package/es/molecule/wizard-summary/test/fixtures/three-sections.js +2 -2
  18. package/es/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -1
  19. package/es/organism/brand-form/index.js +39 -29
  20. package/es/organism/brand-form/index.js.map +1 -1
  21. package/es/organism/brand-form/style.css +8 -3
  22. package/es/organism/{playlist-translation → content-translation}/index.js +0 -0
  23. package/es/organism/content-translation/index.js.map +1 -0
  24. package/es/organism/{playlist-translation → content-translation}/style.css +0 -0
  25. package/es/organism/{playlist-translation → content-translation}/test/fixtures/default.js +0 -0
  26. package/es/organism/content-translation/test/fixtures/default.js.map +1 -0
  27. package/es/organism/{playlist-translation → content-translation}/test/fixtures/delete.js +0 -0
  28. package/es/organism/content-translation/test/fixtures/delete.js.map +1 -0
  29. package/es/organism/content-translation/test/fixtures.js +15 -0
  30. package/es/organism/content-translation/test/fixtures.js.map +1 -0
  31. package/es/organism/list-item/test/fixtures.js +19 -0
  32. package/es/organism/list-item/test/fixtures.js.map +1 -0
  33. package/es/organism/list-items/test/fixtures.js +17 -0
  34. package/es/organism/list-items/test/fixtures.js.map +1 -0
  35. package/es/organism/wizard-contents/index.js +146 -0
  36. package/es/organism/wizard-contents/index.js.map +1 -0
  37. package/es/organism/wizard-contents/style.css +118 -0
  38. package/es/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js +40 -0
  39. package/es/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js.map +1 -0
  40. package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js +36 -0
  41. package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js.map +1 -0
  42. package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js +36 -0
  43. package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js.map +1 -0
  44. package/es/organism/wizard-contents/test/fixtures/playlist-populations-create.js +40 -0
  45. package/es/organism/wizard-contents/test/fixtures/playlist-populations-create.js.map +1 -0
  46. package/es/organism/wizard-contents/test/fixtures/playlist-translate-edit.js +40 -0
  47. package/es/organism/wizard-contents/test/fixtures/playlist-translate-edit.js.map +1 -0
  48. package/es/organism/wizard-contents/test/fixtures.js +21 -0
  49. package/es/organism/wizard-contents/test/fixtures.js.map +1 -0
  50. package/es/template/back-office/brand-update/index.js +8 -1
  51. package/es/template/back-office/brand-update/index.js.map +1 -1
  52. package/es/template/back-office/brand-update/style.css +3 -15
  53. package/es/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js +21 -0
  54. package/es/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js.map +1 -0
  55. package/es/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js +21 -0
  56. package/es/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js.map +1 -0
  57. package/es/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js +22 -0
  58. package/es/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js.map +1 -0
  59. package/es/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js +21 -0
  60. package/es/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js.map +1 -0
  61. package/es/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js +21 -0
  62. package/es/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js.map +1 -0
  63. package/es/template/back-office/brand-update/test/fixtures.js +10 -2
  64. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  65. package/lib/atom/wizard-steps/index.js +1 -1
  66. package/lib/atom/wizard-steps/index.js.map +1 -1
  67. package/lib/atom/wizard-steps/style.css +1 -6
  68. package/lib/molecule/banner/test/fixtures.js +12 -0
  69. package/lib/molecule/banner/test/fixtures.js.map +1 -1
  70. package/lib/molecule/brand-form-group/style.css +1 -2
  71. package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
  72. package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  73. package/lib/molecule/select-multiple/index.js +2 -2
  74. package/lib/molecule/select-multiple/index.js.map +1 -1
  75. package/lib/molecule/select-multiple/style.css +33 -16
  76. package/lib/molecule/select-multiple/test/fixtures.js +12 -0
  77. package/lib/molecule/select-multiple/test/fixtures.js.map +1 -1
  78. package/lib/molecule/wizard-summary/index.js +5 -3
  79. package/lib/molecule/wizard-summary/index.js.map +1 -1
  80. package/lib/molecule/wizard-summary/style.css +18 -8
  81. package/lib/molecule/wizard-summary/test/fixtures/three-sections.js +2 -2
  82. package/lib/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -1
  83. package/lib/organism/brand-form/index.js +39 -29
  84. package/lib/organism/brand-form/index.js.map +1 -1
  85. package/lib/organism/brand-form/style.css +8 -3
  86. package/lib/organism/{playlist-translation → content-translation}/index.js +0 -0
  87. package/lib/organism/content-translation/index.js.map +1 -0
  88. package/lib/organism/{playlist-translation → content-translation}/style.css +0 -0
  89. package/lib/organism/{playlist-translation → content-translation}/test/fixtures/default.js +0 -0
  90. package/lib/organism/content-translation/test/fixtures/default.js.map +1 -0
  91. package/lib/organism/{playlist-translation → content-translation}/test/fixtures/delete.js +0 -0
  92. package/lib/organism/content-translation/test/fixtures/delete.js.map +1 -0
  93. package/lib/organism/content-translation/test/fixtures.js +25 -0
  94. package/lib/organism/content-translation/test/fixtures.js.map +1 -0
  95. package/lib/organism/list-item/test/fixtures.js +31 -0
  96. package/lib/organism/list-item/test/fixtures.js.map +1 -0
  97. package/lib/organism/list-items/test/fixtures.js +28 -0
  98. package/lib/organism/list-items/test/fixtures.js.map +1 -0
  99. package/lib/organism/wizard-contents/index.js +164 -0
  100. package/lib/organism/wizard-contents/index.js.map +1 -0
  101. package/lib/organism/wizard-contents/style.css +118 -0
  102. package/lib/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js +49 -0
  103. package/lib/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js.map +1 -0
  104. package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js +45 -0
  105. package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js.map +1 -0
  106. package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js +45 -0
  107. package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js.map +1 -0
  108. package/lib/organism/wizard-contents/test/fixtures/playlist-populations-create.js +49 -0
  109. package/lib/organism/wizard-contents/test/fixtures/playlist-populations-create.js.map +1 -0
  110. package/lib/organism/wizard-contents/test/fixtures/playlist-translate-edit.js +49 -0
  111. package/lib/organism/wizard-contents/test/fixtures/playlist-translate-edit.js.map +1 -0
  112. package/lib/organism/wizard-contents/test/fixtures.js +34 -0
  113. package/lib/organism/wizard-contents/test/fixtures.js.map +1 -0
  114. package/lib/template/back-office/brand-update/index.js +9 -1
  115. package/lib/template/back-office/brand-update/index.js.map +1 -1
  116. package/lib/template/back-office/brand-update/style.css +3 -15
  117. package/lib/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js +31 -0
  118. package/lib/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js.map +1 -0
  119. package/lib/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js +31 -0
  120. package/lib/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js.map +1 -0
  121. package/lib/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js +33 -0
  122. package/lib/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js.map +1 -0
  123. package/lib/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js +31 -0
  124. package/lib/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js.map +1 -0
  125. package/lib/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js +31 -0
  126. package/lib/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js.map +1 -0
  127. package/lib/template/back-office/brand-update/test/fixtures.js +15 -3
  128. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  129. package/package.json +2 -2
  130. package/es/organism/playlist-translation/index.js.map +0 -1
  131. package/es/organism/playlist-translation/test/fixtures/default.js.map +0 -1
  132. package/es/organism/playlist-translation/test/fixtures/delete.js.map +0 -1
  133. package/lib/organism/playlist-translation/index.js.map +0 -1
  134. package/lib/organism/playlist-translation/test/fixtures/default.js.map +0 -1
  135. package/lib/organism/playlist-translation/test/fixtures/delete.js.map +0 -1
@@ -0,0 +1,118 @@
1
+ @value breakpoints: "../../variables/breakpoints.css";
2
+ @value tablet from breakpoints;
3
+ @value desktop from breakpoints;
4
+
5
+ .container {
6
+ box-sizing: border-box;
7
+ display: flex;
8
+ align-items: stretch;
9
+ justify-content: flex-start;
10
+ flex-wrap: wrap;
11
+ }
12
+
13
+ .leftSection {
14
+ display: block;
15
+ overflow: hidden;
16
+ box-sizing: border-box;
17
+ width: 68%;
18
+ position: relative;
19
+ }
20
+
21
+ .rightSection {
22
+ box-sizing: border-box;
23
+ position: relative;
24
+ display: flex;
25
+ flex-direction: column;
26
+ flex: 0 1 320px;
27
+ }
28
+
29
+ .stickySection {
30
+ box-sizing: border-box;
31
+ position: fixed;
32
+ z-index: 1;
33
+ bottom: 0;
34
+ right: 64px;
35
+ width: 300px;
36
+ }
37
+
38
+ .header {
39
+ display: flex;
40
+ flex-direction: row;
41
+ align-items: center;
42
+ }
43
+
44
+ .headerTitle {
45
+ font-family: Gilroy;
46
+ font-size: 20px;
47
+ font-weight: bold;
48
+ margin: 0 0 0 16px;
49
+ }
50
+
51
+ .form {
52
+ margin: 45px 32px 0 0;
53
+ }
54
+
55
+ .summaryZone {
56
+ width: 100%;
57
+ position: relative;
58
+ min-height: 500px;
59
+ justify-content: space-between;
60
+ }
61
+
62
+ .actionZone {
63
+ width: 100%;
64
+ display: flex;
65
+ justify-content: space-between;
66
+ margin: 16px 0;
67
+ }
68
+
69
+ .button {
70
+ width: calc(50% - 8px);
71
+ }
72
+
73
+ .footer {
74
+ width: 100%;
75
+ bottom: 0px;
76
+ display: none;
77
+ position: inherit;
78
+ }
79
+
80
+ @media desktop, tablet {
81
+ .leftSection {
82
+ width: 100%;
83
+ min-height: 500px;
84
+ }
85
+
86
+ .rightSection {
87
+ display: none;
88
+ }
89
+
90
+ .footer {
91
+ display: flex;
92
+ align-items: end;
93
+ bottom: 10px;
94
+ position: sticky;
95
+ z-index: 1;
96
+ }
97
+ .footer::before {
98
+ content: '';
99
+ background: linear-gradient(to top,white 64px, #ffffff00 );
100
+ bottom: -10px;
101
+ left: 0px;
102
+ right: 0px;
103
+ height: 84px;
104
+ position: absolute;
105
+ z-index: -1;
106
+ }
107
+
108
+ .summaryFooter {
109
+ width: 57%;
110
+ }
111
+
112
+ .actionFooter {
113
+ width: 43%;
114
+ }
115
+ .actionZone {
116
+ margin: 0;
117
+ }
118
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _threeSections = _interopRequireDefault(require("../../../../molecule/wizard-summary/test/fixtures/three-sections"));
7
+
8
+ var _default2 = _interopRequireDefault(require("../../../course-selection/test/fixtures/default"));
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
+ var _default = {
15
+ props: {
16
+ wizardHeader: {
17
+ title: 'Edit custom playlist',
18
+ onClick: () => console.log('Close')
19
+ },
20
+ steps: [{
21
+ title: 'General Informations',
22
+ done: true
23
+ }, {
24
+ title: 'Translations',
25
+ done: true
26
+ }, {
27
+ title: 'Assign populations',
28
+ done: true
29
+ }, {
30
+ title: 'Add courses',
31
+ done: false,
32
+ current: true
33
+ }],
34
+ summary: _threeSections.default.props,
35
+ content: _extends(_extends({}, _default2.default.props), {}, {
36
+ type: 'courses'
37
+ }),
38
+ previousStep: {
39
+ label: 'Previous Step',
40
+ onClick: () => console.log('Previous Step')
41
+ },
42
+ nextStep: {
43
+ label: 'Next Step',
44
+ onClick: () => console.log('Next Step')
45
+ }
46
+ }
47
+ };
48
+ exports.default = _default;
49
+ //# sourceMappingURL=playlist-add-courses-create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js"],"names":["props","wizardHeader","title","onClick","console","log","steps","done","current","summary","wizardSummary","content","addCoursesForm","type","previousStep","label","nextStep"],"mappings":";;;;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,sBADK;AAEZC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAFH,KADT;AAKLC,IAAAA,KAAK,EAAE,CACL;AACEJ,MAAAA,KAAK,EAAE,sBADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KADK,EAKL;AACEL,MAAAA,KAAK,EAAE,cADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KALK,EASL;AACEL,MAAAA,KAAK,EAAE,oBADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KATK,EAaL;AACEL,MAAAA,KAAK,EAAE,aADT;AAEEK,MAAAA,IAAI,EAAE,KAFR;AAGEC,MAAAA,OAAO,EAAE;AAHX,KAbK,CALF;AAwBLC,IAAAA,OAAO,EAAEC,uBAAcV,KAxBlB;AAyBLW,IAAAA,OAAO,wBACFC,kBAAeZ,KADb;AAELa,MAAAA,IAAI,EAAE;AAFD,MAzBF;AA6BLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,eADK;AAEZZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,eAAZ;AAFH,KA7BT;AAiCLW,IAAAA,QAAQ,EAAE;AACRD,MAAAA,KAAK,EAAE,WADC;AAERZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,WAAZ;AAFP;AAjCL;AADM,C","sourcesContent":["/* eslint-disable no-console */\nimport wizardSummary from '../../../../molecule/wizard-summary/test/fixtures/three-sections';\nimport addCoursesForm from '../../../course-selection/test/fixtures/default';\n\nexport default {\n props: {\n wizardHeader: {\n title: 'Edit custom playlist',\n onClick: () => console.log('Close')\n },\n steps: [\n {\n title: 'General Informations',\n done: true\n },\n {\n title: 'Translations',\n done: true\n },\n {\n title: 'Assign populations',\n done: true\n },\n {\n title: 'Add courses',\n done: false,\n current: true\n }\n ],\n summary: wizardSummary.props,\n content: {\n ...addCoursesForm.props,\n type: 'courses'\n },\n previousStep: {\n label: 'Previous Step',\n onClick: () => console.log('Previous Step')\n },\n nextStep: {\n label: 'Next Step',\n onClick: () => console.log('Next Step')\n }\n }\n};\n"],"file":"playlist-add-courses-create.js"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _threeSections = _interopRequireDefault(require("../../../../molecule/wizard-summary/test/fixtures/three-sections"));
7
+
8
+ var _wizardPlaylists = _interopRequireDefault(require("../../../brand-form/test/fixtures/wizard-playlists"));
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
+ var _default = {
15
+ props: {
16
+ wizardHeader: {
17
+ title: 'Create custom playlist',
18
+ onClick: () => console.log('Close')
19
+ },
20
+ steps: [{
21
+ title: 'General Informations',
22
+ done: false,
23
+ current: true
24
+ }, {
25
+ title: 'Translations',
26
+ done: false
27
+ }, {
28
+ title: 'Assign populations',
29
+ done: false
30
+ }, {
31
+ title: 'Add courses',
32
+ done: false
33
+ }],
34
+ summary: _threeSections.default.props,
35
+ content: _extends(_extends({}, _wizardPlaylists.default.props), {}, {
36
+ type: 'form'
37
+ }),
38
+ nextStep: {
39
+ label: 'Next step',
40
+ onClick: () => console.log('Next Step')
41
+ }
42
+ }
43
+ };
44
+ exports.default = _default;
45
+ //# sourceMappingURL=playlist-general-settings-create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js"],"names":["props","wizardHeader","title","onClick","console","log","steps","done","current","summary","wizardSummary","content","generalInformation","type","nextStep","label"],"mappings":";;;;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,wBADK;AAEZC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAFH,KADT;AAKLC,IAAAA,KAAK,EAAE,CACL;AACEJ,MAAAA,KAAK,EAAE,sBADT;AAEEK,MAAAA,IAAI,EAAE,KAFR;AAGEC,MAAAA,OAAO,EAAE;AAHX,KADK,EAML;AACEN,MAAAA,KAAK,EAAE,cADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KANK,EAUL;AACEL,MAAAA,KAAK,EAAE,oBADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KAVK,EAcL;AACEL,MAAAA,KAAK,EAAE,aADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KAdK,CALF;AAwBLE,IAAAA,OAAO,EAAEC,uBAAcV,KAxBlB;AAyBLW,IAAAA,OAAO,wBACFC,yBAAmBZ,KADjB;AAELa,MAAAA,IAAI,EAAE;AAFD,MAzBF;AA6BLC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,KAAK,EAAE,WADC;AAERZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,WAAZ;AAFP;AA7BL;AADM,C","sourcesContent":["/* eslint-disable no-console */\nimport wizardSummary from '../../../../molecule/wizard-summary/test/fixtures/three-sections';\nimport generalInformation from '../../../brand-form/test/fixtures/wizard-playlists';\n\nexport default {\n props: {\n wizardHeader: {\n title: 'Create custom playlist',\n onClick: () => console.log('Close')\n },\n steps: [\n {\n title: 'General Informations',\n done: false,\n current: true\n },\n {\n title: 'Translations',\n done: false\n },\n {\n title: 'Assign populations',\n done: false\n },\n {\n title: 'Add courses',\n done: false\n }\n ],\n summary: wizardSummary.props,\n content: {\n ...generalInformation.props,\n type: 'form'\n },\n nextStep: {\n label: 'Next step',\n onClick: () => console.log('Next Step')\n }\n }\n};\n"],"file":"playlist-general-settings-create.js"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _oneSection = _interopRequireDefault(require("../../../../molecule/wizard-summary/test/fixtures/one-section"));
7
+
8
+ var _wizardPlaylists = _interopRequireDefault(require("../../../brand-form/test/fixtures/wizard-playlists"));
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
+ var _default = {
15
+ props: {
16
+ wizardHeader: {
17
+ title: 'Edit custom playlist',
18
+ onClick: () => console.log('Close')
19
+ },
20
+ steps: [{
21
+ title: 'General Informations',
22
+ done: false,
23
+ current: true
24
+ }, {
25
+ title: 'Translations',
26
+ done: false
27
+ }, {
28
+ title: 'Assign populations',
29
+ done: false
30
+ }, {
31
+ title: 'Add courses',
32
+ done: false
33
+ }],
34
+ summary: _oneSection.default.props,
35
+ content: _extends(_extends({}, _wizardPlaylists.default.props), {}, {
36
+ type: 'form'
37
+ }),
38
+ nextStep: {
39
+ label: 'Next Step',
40
+ onClick: () => console.log('Next Step')
41
+ }
42
+ }
43
+ };
44
+ exports.default = _default;
45
+ //# sourceMappingURL=playlist-general-settings-edit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js"],"names":["props","wizardHeader","title","onClick","console","log","steps","done","current","summary","wizardSummary","content","generalInformation","type","nextStep","label"],"mappings":";;;;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,sBADK;AAEZC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAFH,KADT;AAKLC,IAAAA,KAAK,EAAE,CACL;AACEJ,MAAAA,KAAK,EAAE,sBADT;AAEEK,MAAAA,IAAI,EAAE,KAFR;AAGEC,MAAAA,OAAO,EAAE;AAHX,KADK,EAML;AACEN,MAAAA,KAAK,EAAE,cADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KANK,EAUL;AACEL,MAAAA,KAAK,EAAE,oBADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KAVK,EAcL;AACEL,MAAAA,KAAK,EAAE,aADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KAdK,CALF;AAwBLE,IAAAA,OAAO,EAAEC,oBAAcV,KAxBlB;AAyBLW,IAAAA,OAAO,wBACFC,yBAAmBZ,KADjB;AAELa,MAAAA,IAAI,EAAE;AAFD,MAzBF;AA6BLC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,KAAK,EAAE,WADC;AAERZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,WAAZ;AAFP;AA7BL;AADM,C","sourcesContent":["/* eslint-disable no-console */\nimport wizardSummary from '../../../../molecule/wizard-summary/test/fixtures/one-section';\nimport generalInformation from '../../../brand-form/test/fixtures/wizard-playlists';\n\nexport default {\n props: {\n wizardHeader: {\n title: 'Edit custom playlist',\n onClick: () => console.log('Close')\n },\n steps: [\n {\n title: 'General Informations',\n done: false,\n current: true\n },\n {\n title: 'Translations',\n done: false\n },\n {\n title: 'Assign populations',\n done: false\n },\n {\n title: 'Add courses',\n done: false\n }\n ],\n summary: wizardSummary.props,\n content: {\n ...generalInformation.props,\n type: 'form'\n },\n nextStep: {\n label: 'Next Step',\n onClick: () => console.log('Next Step')\n }\n }\n};\n"],"file":"playlist-general-settings-edit.js"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _threeSections = _interopRequireDefault(require("../../../../molecule/wizard-summary/test/fixtures/three-sections"));
7
+
8
+ var _sortedSelected = _interopRequireDefault(require("../../../search-and-chips-results/test/fixtures/sorted-selected"));
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
+ var _default = {
15
+ props: {
16
+ wizardHeader: {
17
+ title: 'Create custom playlist',
18
+ onClick: () => console.log('Close')
19
+ },
20
+ steps: [{
21
+ title: 'General Informations',
22
+ done: true
23
+ }, {
24
+ title: 'Translations',
25
+ done: true
26
+ }, {
27
+ title: 'Assign populations',
28
+ done: false,
29
+ current: true
30
+ }, {
31
+ title: 'Add courses',
32
+ done: false
33
+ }],
34
+ summary: _threeSections.default.props,
35
+ content: _extends(_extends({}, _sortedSelected.default.props), {}, {
36
+ type: 'populations'
37
+ }),
38
+ previousStep: {
39
+ label: 'Previous Step',
40
+ onClick: () => console.log('Previous Step')
41
+ },
42
+ nextStep: {
43
+ label: 'Next Step',
44
+ onClick: () => console.log('Next Step')
45
+ }
46
+ }
47
+ };
48
+ exports.default = _default;
49
+ //# sourceMappingURL=playlist-populations-create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/wizard-contents/test/fixtures/playlist-populations-create.js"],"names":["props","wizardHeader","title","onClick","console","log","steps","done","current","summary","wizardSummary","content","populationsForm","type","previousStep","label","nextStep"],"mappings":";;;;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,wBADK;AAEZC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAFH,KADT;AAKLC,IAAAA,KAAK,EAAE,CACL;AACEJ,MAAAA,KAAK,EAAE,sBADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KADK,EAKL;AACEL,MAAAA,KAAK,EAAE,cADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KALK,EASL;AACEL,MAAAA,KAAK,EAAE,oBADT;AAEEK,MAAAA,IAAI,EAAE,KAFR;AAGEC,MAAAA,OAAO,EAAE;AAHX,KATK,EAcL;AACEN,MAAAA,KAAK,EAAE,aADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KAdK,CALF;AAwBLE,IAAAA,OAAO,EAAEC,uBAAcV,KAxBlB;AAyBLW,IAAAA,OAAO,wBACFC,wBAAgBZ,KADd;AAELa,MAAAA,IAAI,EAAE;AAFD,MAzBF;AA6BLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,eADK;AAEZZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,eAAZ;AAFH,KA7BT;AAiCLW,IAAAA,QAAQ,EAAE;AACRD,MAAAA,KAAK,EAAE,WADC;AAERZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,WAAZ;AAFP;AAjCL;AADM,C","sourcesContent":["/* eslint-disable no-console */\nimport wizardSummary from '../../../../molecule/wizard-summary/test/fixtures/three-sections';\nimport populationsForm from '../../../search-and-chips-results/test/fixtures/sorted-selected';\n\nexport default {\n props: {\n wizardHeader: {\n title: 'Create custom playlist',\n onClick: () => console.log('Close')\n },\n steps: [\n {\n title: 'General Informations',\n done: true\n },\n {\n title: 'Translations',\n done: true\n },\n {\n title: 'Assign populations',\n done: false,\n current: true\n },\n {\n title: 'Add courses',\n done: false\n }\n ],\n summary: wizardSummary.props,\n content: {\n ...populationsForm.props,\n type: 'populations'\n },\n previousStep: {\n label: 'Previous Step',\n onClick: () => console.log('Previous Step')\n },\n nextStep: {\n label: 'Next Step',\n onClick: () => console.log('Next Step')\n }\n }\n};\n"],"file":"playlist-populations-create.js"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _threeSections = _interopRequireDefault(require("../../../../molecule/wizard-summary/test/fixtures/three-sections"));
7
+
8
+ var _default2 = _interopRequireDefault(require("../../../content-translation/test/fixtures/default"));
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
+ var _default = {
15
+ props: {
16
+ wizardHeader: {
17
+ title: 'Edit custom playlist',
18
+ onClick: () => console.log('Close')
19
+ },
20
+ steps: [{
21
+ title: 'General Informations',
22
+ done: true
23
+ }, {
24
+ title: 'Translations',
25
+ done: false,
26
+ current: true
27
+ }, {
28
+ title: 'Assign populations',
29
+ done: false
30
+ }, {
31
+ title: 'Add courses',
32
+ done: false
33
+ }],
34
+ summary: _threeSections.default.props,
35
+ content: _extends(_extends({}, _default2.default.props), {}, {
36
+ type: 'translate'
37
+ }),
38
+ previousStep: {
39
+ label: 'Previous Step',
40
+ onClick: () => console.log('Previous Step')
41
+ },
42
+ nextStep: {
43
+ label: 'Next Step',
44
+ onClick: () => console.log('Next Step')
45
+ }
46
+ }
47
+ };
48
+ exports.default = _default;
49
+ //# sourceMappingURL=playlist-translate-edit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/wizard-contents/test/fixtures/playlist-translate-edit.js"],"names":["props","wizardHeader","title","onClick","console","log","steps","done","current","summary","wizardSummary","content","translateForm","type","previousStep","label","nextStep"],"mappings":";;;;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,sBADK;AAEZC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAFH,KADT;AAKLC,IAAAA,KAAK,EAAE,CACL;AACEJ,MAAAA,KAAK,EAAE,sBADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KADK,EAKL;AACEL,MAAAA,KAAK,EAAE,cADT;AAEEK,MAAAA,IAAI,EAAE,KAFR;AAGEC,MAAAA,OAAO,EAAE;AAHX,KALK,EAUL;AACEN,MAAAA,KAAK,EAAE,oBADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KAVK,EAcL;AACEL,MAAAA,KAAK,EAAE,aADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KAdK,CALF;AAwBLE,IAAAA,OAAO,EAAEC,uBAAcV,KAxBlB;AAyBLW,IAAAA,OAAO,wBACFC,kBAAcZ,KADZ;AAELa,MAAAA,IAAI,EAAE;AAFD,MAzBF;AA6BLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,eADK;AAEZZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,eAAZ;AAFH,KA7BT;AAiCLW,IAAAA,QAAQ,EAAE;AACRD,MAAAA,KAAK,EAAE,WADC;AAERZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,WAAZ;AAFP;AAjCL;AADM,C","sourcesContent":["/* eslint-disable no-console */\nimport wizardSummary from '../../../../molecule/wizard-summary/test/fixtures/three-sections';\nimport translateForm from '../../../content-translation/test/fixtures/default';\n\nexport default {\n props: {\n wizardHeader: {\n title: 'Edit custom playlist',\n onClick: () => console.log('Close')\n },\n steps: [\n {\n title: 'General Informations',\n done: true\n },\n {\n title: 'Translations',\n done: false,\n current: true\n },\n {\n title: 'Assign populations',\n done: false\n },\n {\n title: 'Add courses',\n done: false\n }\n ],\n summary: wizardSummary.props,\n content: {\n ...translateForm.props,\n type: 'translate'\n },\n previousStep: {\n label: 'Previous Step',\n onClick: () => console.log('Previous Step')\n },\n nextStep: {\n label: 'Next Step',\n onClick: () => console.log('Next Step')\n }\n }\n};\n"],"file":"playlist-translate-edit.js"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ var _ava = _interopRequireDefault(require("ava"));
4
+
5
+ var _forEach = _interopRequireDefault(require("lodash/forEach"));
6
+
7
+ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
8
+
9
+ var _ = _interopRequireDefault(require(".."));
10
+
11
+ var _playlistAddCoursesCreate = _interopRequireDefault(require("./fixtures/playlist-add-courses-create"));
12
+
13
+ var _playlistGeneralSettingsCreate = _interopRequireDefault(require("./fixtures/playlist-general-settings-create"));
14
+
15
+ var _playlistGeneralSettingsEdit = _interopRequireDefault(require("./fixtures/playlist-general-settings-edit"));
16
+
17
+ var _playlistPopulationsCreate = _interopRequireDefault(require("./fixtures/playlist-populations-create"));
18
+
19
+ var _playlistTranslateEdit = _interopRequireDefault(require("./fixtures/playlist-translate-edit"));
20
+
21
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
+
23
+ (0, _ava.default)('Organism › OrganismWizardContents > should have valid propTypes', t => {
24
+ t.pass();
25
+ (0, _forEach.default)(_.default.propTypes, (value, key) => {
26
+ t.not(value, undefined, `PropType for "Organism.OrganismWizardContents.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
27
+ });
28
+ });
29
+ (0, _ava.default)('Organism › OrganismWizardContents › PlaylistAddCoursesCreate › should be rendered', _renderComponent.default, _.default, _playlistAddCoursesCreate.default);
30
+ (0, _ava.default)('Organism › OrganismWizardContents › PlaylistGeneralSettingsCreate › should be rendered', _renderComponent.default, _.default, _playlistGeneralSettingsCreate.default);
31
+ (0, _ava.default)('Organism › OrganismWizardContents › PlaylistGeneralSettingsEdit › should be rendered', _renderComponent.default, _.default, _playlistGeneralSettingsEdit.default);
32
+ (0, _ava.default)('Organism › OrganismWizardContents › PlaylistPopulationsCreate › should be rendered', _renderComponent.default, _.default, _playlistPopulationsCreate.default);
33
+ (0, _ava.default)('Organism › OrganismWizardContents › PlaylistTranslateEdit › should be rendered', _renderComponent.default, _.default, _playlistTranslateEdit.default);
34
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/organism/wizard-contents/test/fixtures.js"],"names":["t","pass","OrganismWizardContents","propTypes","value","key","not","undefined","renderComponentMacro","fixturePlaylistAddCoursesCreate","fixturePlaylistGeneralSettingsCreate","fixturePlaylistGeneralSettingsEdit","fixturePlaylistPopulationsCreate","fixturePlaylistTranslateEdit"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iEAAL,EAAwEA,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,mFAAL,EAA0FG,wBAA1F,EAAgHN,SAAhH,EAAwIO,iCAAxI;AACA,kBAAK,wFAAL,EAA+FD,wBAA/F,EAAqHN,SAArH,EAA6IQ,sCAA7I;AACA,kBAAK,sFAAL,EAA6FF,wBAA7F,EAAmHN,SAAnH,EAA2IS,oCAA3I;AACA,kBAAK,oFAAL,EAA2FH,wBAA3F,EAAiHN,SAAjH,EAAyIU,kCAAzI;AACA,kBAAK,gFAAL,EAAuFJ,wBAAvF,EAA6GN,SAA7G,EAAqIW,8BAArI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismWizardContents from '..';\nimport fixturePlaylistAddCoursesCreate from './fixtures/playlist-add-courses-create';\nimport fixturePlaylistGeneralSettingsCreate from './fixtures/playlist-general-settings-create';\nimport fixturePlaylistGeneralSettingsEdit from './fixtures/playlist-general-settings-edit';\nimport fixturePlaylistPopulationsCreate from './fixtures/playlist-populations-create';\nimport fixturePlaylistTranslateEdit from './fixtures/playlist-translate-edit';\n\ntest('Organism › OrganismWizardContents > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismWizardContents.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismWizardContents.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismWizardContents › PlaylistAddCoursesCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistAddCoursesCreate);\ntest('Organism › OrganismWizardContents › PlaylistGeneralSettingsCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistGeneralSettingsCreate);\ntest('Organism › OrganismWizardContents › PlaylistGeneralSettingsEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistGeneralSettingsEdit);\ntest('Organism › OrganismWizardContents › PlaylistPopulationsCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistPopulationsCreate);\ntest('Organism › OrganismWizardContents › PlaylistTranslateEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistTranslateEdit);\n"],"file":"fixtures.js"}
@@ -33,6 +33,8 @@ var _brandAnalytics = _interopRequireDefault(require("../../../organism/brand-an
33
33
 
34
34
  var _brandDashboard = _interopRequireDefault(require("../../../organism/brand-dashboard"));
35
35
 
36
+ var _wizardContents = _interopRequireDefault(require("../../../organism/wizard-contents"));
37
+
36
38
  var _banner = _interopRequireDefault(require("../../../molecule/banner"));
37
39
 
38
40
  var _setupHeader = _interopRequireDefault(require("../../../organism/setup-header"));
@@ -156,6 +158,9 @@ const buildContentView = content => {
156
158
 
157
159
  case 'home':
158
160
  return /*#__PURE__*/_react.default.createElement(_brandDashboard.default, content);
161
+
162
+ case 'wizard':
163
+ return /*#__PURE__*/_react.default.createElement(_wizardContents.default, content);
159
164
  }
160
165
  };
161
166
 
@@ -198,7 +203,7 @@ BrandUpdate.defaultProps = {
198
203
  notifications: []
199
204
  };
200
205
  BrandUpdate.propTypes = process.env.NODE_ENV !== "production" ? {
201
- notifications: _propTypes.default.arrayOf(_propTypes.default.shape(_banner.default.propTypes)),
206
+ notifications: _propTypes.default.arrayOf(_propTypes.default.shape(_extends({}, _banner.default.propTypes))),
202
207
  header: _propTypes.default.shape(_extends({}, _setupHeader.default.propTypes)),
203
208
  items: _propTypes.default.arrayOf(_propTypes.default.shape({
204
209
  key: _propTypes.default.string,
@@ -234,6 +239,9 @@ BrandUpdate.propTypes = process.env.NODE_ENV !== "production" ? {
234
239
  })), _propTypes.default.shape(_extends(_extends({}, _brandDashboard.default.propTypes), {}, {
235
240
  key: _propTypes.default.string,
236
241
  type: _propTypes.default.oneOf(['home'])
242
+ })), _propTypes.default.shape(_extends(_extends({}, _wizardContents.default.propTypes), {}, {
243
+ key: _propTypes.default.string,
244
+ type: _propTypes.default.oneOf(['wizard'])
237
245
  }))]),
238
246
  details: _propTypes.default.shape(_extends(_extends({}, _brandTable.default.propTypes), {}, {
239
247
  key: _propTypes.default.string,
@@ -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","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,EAA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3BV,mBAAUE,KAAV,uBACKW,wBAAed,SADpB;AAEEvC,IAAAA,GAAG,EAAEwC,mBAAUK,MAFjB;AAGEpD,IAAAA,IAAI,EAAE+C,mBAAUU,KAAV,CAAgB,CAAC,sBAAD,CAAhB;AAHR,KAhB2B,EAqB3BV,mBAAUE,KAAV,uBACKY,wBAAef,SADpB;AAEEvC,IAAAA,GAAG,EAAEwC,mBAAUK,MAFjB;AAGEpD,IAAAA,IAAI,EAAE+C,mBAAUU,KAAV,CAAgB,CAAC,MAAD,CAAhB;AAHR,KArB2B,CAApB,CA5Ba;AAuDtB3B,EAAAA,OAAO,EAAEiB,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
+ {"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","WizardContents","func"],"mappings":";;;;;AAAA;;AACA;;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,CA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,mBAAUK,MAFjB;AAGEpD,IAAAA,IAAI,EAAE+C,mBAAUU,KAAV,CAAgB,CAAC,QAAD,CAAhB;AAHR,KAX2B,EAgB3BV,mBAAUE,KAAV,uBACKW,wBAAed,SADpB;AAEEvC,IAAAA,GAAG,EAAEwC,mBAAUK,MAFjB;AAGEpD,IAAAA,IAAI,EAAE+C,mBAAUU,KAAV,CAAgB,CAAC,sBAAD,CAAhB;AAHR,KAhB2B,EAqB3BV,mBAAUE,KAAV,uBACKY,wBAAef,SADpB;AAEEvC,IAAAA,GAAG,EAAEwC,mBAAUK,MAFjB;AAGEpD,IAAAA,IAAI,EAAE+C,mBAAUU,KAAV,CAAgB,CAAC,MAAD,CAAhB;AAHR,KArB2B,EA0B3BV,mBAAUE,KAAV,uBACKa,wBAAehB,SADpB;AAEEvC,IAAAA,GAAG,EAAEwC,mBAAUK,MAFjB;AAGEpD,IAAAA,IAAI,EAAE+C,mBAAUU,KAAV,CAAgB,CAAC,QAAD,CAAhB;AAHR,KA1B2B,CAApB,CAhCa;AAgEtB3B,EAAAA,OAAO,EAAEiB,mBAAUE,KAAV,uBACJS,oBAAWZ,SADP;AAEPvC,IAAAA,GAAG,EAAEwC,mBAAUK,MAFR;AAGPpD,IAAAA,IAAI,EAAE+C,mBAAUU,KAAV,CAAgB,CAAC,MAAD,CAAhB;AAHC,KAhEa;AAqEtBpD,EAAAA,WAAW,EAAE0C,mBAAUgB;AArED,CAAxB;eAwEehC,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 WizardContents from '../../../organism/wizard-contents';\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 case 'wizard':\n return <WizardContents {...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(\n PropTypes.shape({\n ...Banner.propTypes\n })\n ),\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 PropTypes.shape({\n ...WizardContents.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['wizard'])\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"}
@@ -110,26 +110,14 @@
110
110
  margin: 32px 20px 54px 20px;
111
111
  }
112
112
 
113
- @media desktop {
113
+ @media desktop, tablet {
114
114
  .container {
115
115
  scroll-behavior: unset;
116
116
  margin: 0;
117
117
  }
118
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
-
129
- @media tablet {
130
- .container {
131
- scroll-behavior: unset;
132
- margin: 0;
119
+ .content {
120
+ height: calc(100% - 143px);
133
121
  }
134
122
 
135
123
  .headerSticky {
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _playlistAddCoursesCreate = _interopRequireDefault(require("../../../../../organism/wizard-contents/test/fixtures/playlist-add-courses-create"));
7
+
8
+ var _default2 = _interopRequireDefault(require("./default"));
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 {
15
+ header,
16
+ items
17
+ } = _default2.default.props;
18
+ const form = _playlistAddCoursesCreate.default.props;
19
+ var _default = {
20
+ props: {
21
+ header,
22
+ items,
23
+ notifications: [],
24
+ content: _extends(_extends({}, form), {}, {
25
+ key: 'add-courses',
26
+ type: 'wizard'
27
+ })
28
+ }
29
+ };
30
+ exports.default = _default;
31
+ //# sourceMappingURL=wizard-add-courses-playlist.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js"],"names":["header","items","headerAndMenu","props","form","WizardForm","notifications","content","key","type"],"mappings":";;;;;AAAA;;AACA;;;;;;AAEA,MAAM;AAACA,EAAAA,MAAD;AAASC,EAAAA;AAAT,IAAkBC,kBAAcC,KAAtC;AACA,MAAMC,IAAI,GAAGC,kCAAWF,KAAxB;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLH,IAAAA,MADK;AAELC,IAAAA,KAFK;AAGLK,IAAAA,aAAa,EAAE,EAHV;AAILC,IAAAA,OAAO,wBACFH,IADE;AAELI,MAAAA,GAAG,EAAE,aAFA;AAGLC,MAAAA,IAAI,EAAE;AAHD;AAJF;AADM,C","sourcesContent":["import WizardForm from '../../../../../organism/wizard-contents/test/fixtures/playlist-add-courses-create';\nimport headerAndMenu from './default';\n\nconst {header, items} = headerAndMenu.props;\nconst form = WizardForm.props;\n\nexport default {\n props: {\n header,\n items,\n notifications: [],\n content: {\n ...form,\n key: 'add-courses',\n type: 'wizard'\n }\n }\n};\n"],"file":"wizard-add-courses-playlist.js"}