@coorpacademy/components 10.1.15 → 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 (211) 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/atom/wizard-steps/index.js +1 -1
  12. package/es/atom/wizard-steps/index.js.map +1 -1
  13. package/es/atom/wizard-steps/style.css +1 -6
  14. package/es/hoc/transition/index.js +10 -3
  15. package/es/hoc/transition/index.js.map +1 -1
  16. package/es/molecule/banner/test/fixtures.js +8 -0
  17. package/es/molecule/banner/test/fixtures.js.map +1 -1
  18. package/es/molecule/brand-create-form/index.js +4 -1
  19. package/es/molecule/brand-create-form/index.js.map +1 -1
  20. package/es/molecule/brand-form-group/style.css +1 -2
  21. package/es/molecule/card/index.js +1 -1
  22. package/es/molecule/card/index.js.map +1 -1
  23. package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
  24. package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  25. package/es/molecule/select-multiple/index.js +3 -3
  26. package/es/molecule/select-multiple/index.js.map +1 -1
  27. package/es/molecule/select-multiple/style.css +33 -16
  28. package/es/molecule/select-multiple/test/fixtures.js +8 -0
  29. package/es/molecule/select-multiple/test/fixtures.js.map +1 -1
  30. package/es/molecule/share/index.js +3 -2
  31. package/es/molecule/share/index.js.map +1 -1
  32. package/es/molecule/wizard-summary/index.js +20 -11
  33. package/es/molecule/wizard-summary/index.js.map +1 -1
  34. package/es/molecule/wizard-summary/style.css +18 -8
  35. package/es/molecule/wizard-summary/test/fixtures/three-sections.js +2 -2
  36. package/es/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -1
  37. package/es/organism/accordion/container/index.js +1 -1
  38. package/es/organism/accordion/container/index.js.map +1 -1
  39. package/es/organism/accordion/coorp-manager/index.js +1 -1
  40. package/es/organism/accordion/coorp-manager/index.js.map +1 -1
  41. package/es/organism/brand-form/index.js +39 -29
  42. package/es/organism/brand-form/index.js.map +1 -1
  43. package/es/organism/brand-form/style.css +8 -3
  44. package/es/organism/{playlist-translation → content-translation}/index.js +0 -0
  45. package/es/organism/content-translation/index.js.map +1 -0
  46. package/es/organism/{playlist-translation → content-translation}/style.css +0 -0
  47. package/es/organism/{playlist-translation → content-translation}/test/fixtures/default.js +0 -0
  48. package/es/organism/content-translation/test/fixtures/default.js.map +1 -0
  49. package/es/organism/{playlist-translation → content-translation}/test/fixtures/delete.js +0 -0
  50. package/es/organism/content-translation/test/fixtures/delete.js.map +1 -0
  51. package/es/organism/content-translation/test/fixtures.js +15 -0
  52. package/es/organism/content-translation/test/fixtures.js.map +1 -0
  53. package/es/organism/list-item/test/fixtures.js +19 -0
  54. package/es/organism/list-item/test/fixtures.js.map +1 -0
  55. package/es/organism/list-items/index.js +40 -0
  56. package/es/organism/list-items/index.js.map +1 -0
  57. package/es/organism/list-items/style.css +39 -0
  58. package/es/organism/list-items/test/fixtures/archived.js +24 -0
  59. package/es/organism/list-items/test/fixtures/archived.js.map +1 -0
  60. package/es/organism/list-items/test/fixtures/draft.js +24 -0
  61. package/es/organism/list-items/test/fixtures/draft.js.map +1 -0
  62. package/es/organism/list-items/test/fixtures/published.js +26 -0
  63. package/es/organism/list-items/test/fixtures/published.js.map +1 -0
  64. package/es/organism/list-items/test/fixtures.js +17 -0
  65. package/es/organism/list-items/test/fixtures.js.map +1 -0
  66. package/es/organism/setup-header/index.js +6 -6
  67. package/es/organism/setup-header/index.js.map +1 -1
  68. package/es/organism/wizard-contents/index.js +146 -0
  69. package/es/organism/wizard-contents/index.js.map +1 -0
  70. package/es/organism/wizard-contents/style.css +118 -0
  71. package/es/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js +40 -0
  72. package/es/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js.map +1 -0
  73. package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js +36 -0
  74. package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js.map +1 -0
  75. package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js +36 -0
  76. package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js.map +1 -0
  77. package/es/organism/wizard-contents/test/fixtures/playlist-populations-create.js +40 -0
  78. package/es/organism/wizard-contents/test/fixtures/playlist-populations-create.js.map +1 -0
  79. package/es/organism/wizard-contents/test/fixtures/playlist-translate-edit.js +40 -0
  80. package/es/organism/wizard-contents/test/fixtures/playlist-translate-edit.js.map +1 -0
  81. package/es/organism/wizard-contents/test/fixtures.js +21 -0
  82. package/es/organism/wizard-contents/test/fixtures.js.map +1 -0
  83. package/es/template/back-office/brand-update/index.js +21 -7
  84. package/es/template/back-office/brand-update/index.js.map +1 -1
  85. package/es/template/back-office/brand-update/style.css +46 -14
  86. package/es/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js +21 -0
  87. package/es/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js.map +1 -0
  88. package/es/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js +21 -0
  89. package/es/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js.map +1 -0
  90. package/es/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js +22 -0
  91. package/es/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js.map +1 -0
  92. package/es/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js +21 -0
  93. package/es/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js.map +1 -0
  94. package/es/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js +21 -0
  95. package/es/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js.map +1 -0
  96. package/es/template/back-office/brand-update/test/fixtures.js +10 -2
  97. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  98. package/es/template/back-office/layout/index.js +3 -1
  99. package/es/template/back-office/layout/index.js.map +1 -1
  100. package/es/template/back-office/layout/style.css +4 -0
  101. package/es/template/teams-dashboard/index.js +4 -6
  102. package/es/template/teams-dashboard/index.js.map +1 -1
  103. package/lib/atom/button-link/index.js +1 -1
  104. package/lib/atom/button-link/index.js.map +1 -1
  105. package/lib/atom/button-link-icon-only/index.js +1 -1
  106. package/lib/atom/button-link-icon-only/index.js.map +1 -1
  107. package/lib/atom/button-menu/index.js +2 -4
  108. package/lib/atom/button-menu/index.js.map +1 -1
  109. package/lib/atom/chips/style.css +1 -2
  110. package/lib/atom/image-upload/index.js +5 -2
  111. package/lib/atom/image-upload/index.js.map +1 -1
  112. package/lib/atom/input-color/style.css +1 -1
  113. package/lib/atom/wizard-steps/index.js +1 -1
  114. package/lib/atom/wizard-steps/index.js.map +1 -1
  115. package/lib/atom/wizard-steps/style.css +1 -6
  116. package/lib/hoc/transition/index.js +10 -3
  117. package/lib/hoc/transition/index.js.map +1 -1
  118. package/lib/molecule/banner/test/fixtures.js +12 -0
  119. package/lib/molecule/banner/test/fixtures.js.map +1 -1
  120. package/lib/molecule/brand-create-form/index.js +4 -1
  121. package/lib/molecule/brand-create-form/index.js.map +1 -1
  122. package/lib/molecule/brand-form-group/style.css +1 -2
  123. package/lib/molecule/card/index.js +1 -1
  124. package/lib/molecule/card/index.js.map +1 -1
  125. package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
  126. package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  127. package/lib/molecule/select-multiple/index.js +3 -3
  128. package/lib/molecule/select-multiple/index.js.map +1 -1
  129. package/lib/molecule/select-multiple/style.css +33 -16
  130. package/lib/molecule/select-multiple/test/fixtures.js +12 -0
  131. package/lib/molecule/select-multiple/test/fixtures.js.map +1 -1
  132. package/lib/molecule/share/index.js +2 -1
  133. package/lib/molecule/share/index.js.map +1 -1
  134. package/lib/molecule/wizard-summary/index.js +21 -13
  135. package/lib/molecule/wizard-summary/index.js.map +1 -1
  136. package/lib/molecule/wizard-summary/style.css +18 -8
  137. package/lib/molecule/wizard-summary/test/fixtures/three-sections.js +2 -2
  138. package/lib/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -1
  139. package/lib/organism/accordion/container/index.js +1 -1
  140. package/lib/organism/accordion/container/index.js.map +1 -1
  141. package/lib/organism/accordion/coorp-manager/index.js +1 -1
  142. package/lib/organism/accordion/coorp-manager/index.js.map +1 -1
  143. package/lib/organism/brand-form/index.js +39 -29
  144. package/lib/organism/brand-form/index.js.map +1 -1
  145. package/lib/organism/brand-form/style.css +8 -3
  146. package/lib/organism/{playlist-translation → content-translation}/index.js +0 -0
  147. package/lib/organism/content-translation/index.js.map +1 -0
  148. package/lib/organism/{playlist-translation → content-translation}/style.css +0 -0
  149. package/lib/organism/{playlist-translation → content-translation}/test/fixtures/default.js +0 -0
  150. package/lib/organism/content-translation/test/fixtures/default.js.map +1 -0
  151. package/lib/organism/{playlist-translation → content-translation}/test/fixtures/delete.js +0 -0
  152. package/lib/organism/content-translation/test/fixtures/delete.js.map +1 -0
  153. package/lib/organism/content-translation/test/fixtures.js +25 -0
  154. package/lib/organism/content-translation/test/fixtures.js.map +1 -0
  155. package/lib/organism/list-item/test/fixtures.js +31 -0
  156. package/lib/organism/list-item/test/fixtures.js.map +1 -0
  157. package/lib/organism/list-items/index.js +53 -0
  158. package/lib/organism/list-items/index.js.map +1 -0
  159. package/lib/organism/list-items/style.css +39 -0
  160. package/lib/organism/list-items/test/fixtures/archived.js +33 -0
  161. package/lib/organism/list-items/test/fixtures/archived.js.map +1 -0
  162. package/lib/organism/list-items/test/fixtures/draft.js +33 -0
  163. package/lib/organism/list-items/test/fixtures/draft.js.map +1 -0
  164. package/lib/organism/list-items/test/fixtures/published.js +36 -0
  165. package/lib/organism/list-items/test/fixtures/published.js.map +1 -0
  166. package/lib/organism/list-items/test/fixtures.js +28 -0
  167. package/lib/organism/list-items/test/fixtures.js.map +1 -0
  168. package/lib/organism/setup-header/index.js +6 -6
  169. package/lib/organism/setup-header/index.js.map +1 -1
  170. package/lib/organism/wizard-contents/index.js +164 -0
  171. package/lib/organism/wizard-contents/index.js.map +1 -0
  172. package/lib/organism/wizard-contents/style.css +118 -0
  173. package/lib/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js +49 -0
  174. package/lib/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js.map +1 -0
  175. package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js +45 -0
  176. package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js.map +1 -0
  177. package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js +45 -0
  178. package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js.map +1 -0
  179. package/lib/organism/wizard-contents/test/fixtures/playlist-populations-create.js +49 -0
  180. package/lib/organism/wizard-contents/test/fixtures/playlist-populations-create.js.map +1 -0
  181. package/lib/organism/wizard-contents/test/fixtures/playlist-translate-edit.js +49 -0
  182. package/lib/organism/wizard-contents/test/fixtures/playlist-translate-edit.js.map +1 -0
  183. package/lib/organism/wizard-contents/test/fixtures.js +34 -0
  184. package/lib/organism/wizard-contents/test/fixtures.js.map +1 -0
  185. package/lib/template/back-office/brand-update/index.js +23 -7
  186. package/lib/template/back-office/brand-update/index.js.map +1 -1
  187. package/lib/template/back-office/brand-update/style.css +46 -14
  188. package/lib/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js +31 -0
  189. package/lib/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js.map +1 -0
  190. package/lib/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js +31 -0
  191. package/lib/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js.map +1 -0
  192. package/lib/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js +33 -0
  193. package/lib/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js.map +1 -0
  194. package/lib/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js +31 -0
  195. package/lib/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js.map +1 -0
  196. package/lib/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js +31 -0
  197. package/lib/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js.map +1 -0
  198. package/lib/template/back-office/brand-update/test/fixtures.js +15 -3
  199. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  200. package/lib/template/back-office/layout/index.js +3 -1
  201. package/lib/template/back-office/layout/index.js.map +1 -1
  202. package/lib/template/back-office/layout/style.css +4 -0
  203. package/lib/template/teams-dashboard/index.js +4 -6
  204. package/lib/template/teams-dashboard/index.js.map +1 -1
  205. package/package.json +3 -2
  206. package/es/organism/playlist-translation/index.js.map +0 -1
  207. package/es/organism/playlist-translation/test/fixtures/default.js.map +0 -1
  208. package/es/organism/playlist-translation/test/fixtures/delete.js.map +0 -1
  209. package/lib/organism/playlist-translation/index.js.map +0 -1
  210. package/lib/organism/playlist-translation/test/fixtures/default.js.map +0 -1
  211. package/lib/organism/playlist-translation/test/fixtures/delete.js.map +0 -1
@@ -0,0 +1,164 @@
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 _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
11
+
12
+ var _buttonLinkIconOnly = _interopRequireDefault(require("../../atom/button-link-icon-only"));
13
+
14
+ var _wizardSteps = _interopRequireDefault(require("../../atom/wizard-steps"));
15
+
16
+ var _wizardSummary = _interopRequireDefault(require("../../molecule/wizard-summary"));
17
+
18
+ var _brandForm = _interopRequireDefault(require("../brand-form"));
19
+
20
+ var _contentTranslation = _interopRequireDefault(require("../content-translation"));
21
+
22
+ var _searchAndChipsResults = _interopRequireDefault(require("../search-and-chips-results"));
23
+
24
+ var _courseSelection = _interopRequireDefault(require("../course-selection"));
25
+
26
+ var _style = _interopRequireDefault(require("./style.css"));
27
+
28
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
+
30
+ 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); }
31
+
32
+ const buildHeader = (wizardHeader, steps) => {
33
+ const {
34
+ title,
35
+ onClick
36
+ } = wizardHeader;
37
+ const buttonCloseIcon = {
38
+ size: 'small',
39
+ 'data-name': 'close-button',
40
+ 'aria-label': 'close button',
41
+ icon: 'close',
42
+ onClick
43
+ };
44
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
45
+ className: _style.default.header
46
+ }, /*#__PURE__*/_react.default.createElement(_buttonLinkIconOnly.default, buttonCloseIcon), /*#__PURE__*/_react.default.createElement("div", {
47
+ className: _style.default.headerTitle
48
+ }, title)), /*#__PURE__*/_react.default.createElement(_wizardSteps.default, {
49
+ steps: steps
50
+ }));
51
+ };
52
+
53
+ const buildForm = content => {
54
+ const {
55
+ type
56
+ } = content;
57
+
58
+ switch (type) {
59
+ case 'form':
60
+ return /*#__PURE__*/_react.default.createElement(_brandForm.default, content);
61
+
62
+ case 'translate':
63
+ return /*#__PURE__*/_react.default.createElement(_contentTranslation.default, content);
64
+
65
+ case 'populations':
66
+ return /*#__PURE__*/_react.default.createElement(_searchAndChipsResults.default, content);
67
+
68
+ case 'courses':
69
+ return /*#__PURE__*/_react.default.createElement(_courseSelection.default, content);
70
+ }
71
+ };
72
+
73
+ const buildButton = (type, step) => {
74
+ const {
75
+ label,
76
+ onClick
77
+ } = step;
78
+ const buttonProps = {
79
+ type: type === 'next' ? 'primary' : 'secondary',
80
+ 'aria-label': `${type} step button`,
81
+ 'data-name': `${type}-step-button`,
82
+ icon: {
83
+ position: type === 'next' ? 'right' : 'left',
84
+ type: type === 'next' ? 'chevron-right' : 'chevron-left'
85
+ },
86
+ label,
87
+ onClick
88
+ };
89
+ return /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonProps);
90
+ };
91
+
92
+ const buildActionZone = (previousStep, nextStep) => {
93
+ const previousButton = previousStep ? buildButton('previous', previousStep) : null;
94
+ const nextButton = nextStep ? buildButton('next', nextStep) : null;
95
+ return /*#__PURE__*/_react.default.createElement("div", {
96
+ className: _style.default.actionZone
97
+ }, /*#__PURE__*/_react.default.createElement("div", {
98
+ className: _style.default.button
99
+ }, previousButton), /*#__PURE__*/_react.default.createElement("div", {
100
+ className: _style.default.button
101
+ }, nextButton));
102
+ };
103
+
104
+ const WizardContents = props => {
105
+ const {
106
+ wizardHeader,
107
+ steps,
108
+ summary,
109
+ content,
110
+ nextStep,
111
+ previousStep
112
+ } = props;
113
+ const headerView = buildHeader(wizardHeader, steps);
114
+ const formView = buildForm(content);
115
+ const actionView = buildActionZone(previousStep, nextStep);
116
+ return /*#__PURE__*/_react.default.createElement("div", {
117
+ className: _style.default.container
118
+ }, /*#__PURE__*/_react.default.createElement("div", {
119
+ className: _style.default.leftSection
120
+ }, headerView, /*#__PURE__*/_react.default.createElement("div", {
121
+ className: _style.default.form
122
+ }, formView)), /*#__PURE__*/_react.default.createElement("div", {
123
+ className: _style.default.rightSection
124
+ }, /*#__PURE__*/_react.default.createElement("div", {
125
+ className: _style.default.stickySection
126
+ }, /*#__PURE__*/_react.default.createElement("div", {
127
+ className: _style.default.summaryZone
128
+ }, /*#__PURE__*/_react.default.createElement(_wizardSummary.default, summary)), actionView)), /*#__PURE__*/_react.default.createElement("div", {
129
+ className: _style.default.footer
130
+ }, /*#__PURE__*/_react.default.createElement("div", {
131
+ className: _style.default.summaryFooter
132
+ }, /*#__PURE__*/_react.default.createElement(_wizardSummary.default, summary)), /*#__PURE__*/_react.default.createElement("div", {
133
+ className: _style.default.actionFooter
134
+ }, actionView)));
135
+ };
136
+
137
+ WizardContents.propTypes = process.env.NODE_ENV !== "production" ? {
138
+ wizardHeader: _propTypes.default.shape({
139
+ title: _propTypes.default.string,
140
+ onClick: _propTypes.default.func
141
+ }).isRequired,
142
+ steps: _wizardSteps.default.propTypes.steps,
143
+ summary: _propTypes.default.shape(_extends({}, _wizardSummary.default.propTypes)).isRequired,
144
+ content: _propTypes.default.oneOfType([_propTypes.default.shape(_extends(_extends({}, _brandForm.default.propTypes), {}, {
145
+ type: _propTypes.default.oneOf(['form'])
146
+ })), _propTypes.default.shape(_extends(_extends({}, _contentTranslation.default.propTypes), {}, {
147
+ type: _propTypes.default.oneOf(['translate'])
148
+ })), _propTypes.default.shape(_extends(_extends({}, _searchAndChipsResults.default.propTypes), {}, {
149
+ type: _propTypes.default.oneOf(['populations'])
150
+ })), _propTypes.default.shape(_extends(_extends({}, _courseSelection.default.propTypes), {}, {
151
+ type: _propTypes.default.oneOf(['courses'])
152
+ }))]),
153
+ previousStep: _propTypes.default.shape({
154
+ label: _propTypes.default.string,
155
+ onClick: _propTypes.default.func
156
+ }),
157
+ nextStep: _propTypes.default.shape({
158
+ label: _propTypes.default.string,
159
+ onClick: _propTypes.default.func
160
+ })
161
+ } : {};
162
+ var _default = WizardContents;
163
+ exports.default = _default;
164
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/organism/wizard-contents/index.js"],"names":["buildHeader","wizardHeader","steps","title","onClick","buttonCloseIcon","size","icon","style","header","headerTitle","buildForm","content","type","buildButton","step","label","buttonProps","position","buildActionZone","previousStep","nextStep","previousButton","nextButton","actionZone","button","WizardContents","props","summary","headerView","formView","actionView","container","leftSection","form","rightSection","stickySection","summaryZone","footer","summaryFooter","actionFooter","propTypes","PropTypes","shape","string","func","isRequired","WizardSteps","WizardSummary","oneOfType","BrandForm","oneOf","ContentT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AAC,WAAD,CAAhB;AAFR,KAL2B,EAS3BT,mBAAUC,KAAV,uBACKU,+BAA8BZ,SADnC;AAEE5B,IAAAA,IAAI,EAAE6B,mBAAUS,KAAV,CAAgB,CAAC,aAAD,CAAhB;AAFR,KAT2B,EAa3BT,mBAAUC,KAAV,uBACKW,yBAAgBb,SADrB;AAEE5B,IAAAA,IAAI,EAAE6B,mBAAUS,KAAV,CAAgB,CAAC,SAAD,CAAhB;AAFR,KAb2B,CAApB,CATgB;AA2BzB/B,EAAAA,YAAY,EAAEsB,mBAAUC,KAAV,CAAgB;AAC5B3B,IAAAA,KAAK,EAAE0B,mBAAUE,MADW;AAE5BxC,IAAAA,OAAO,EAAEsC,mBAAUG;AAFS,GAAhB,CA3BW;AA+BzBxB,EAAAA,QAAQ,EAAEqB,mBAAUC,KAAV,CAAgB;AACxB3B,IAAAA,KAAK,EAAE0B,mBAAUE,MADO;AAExBxC,IAAAA,OAAO,EAAEsC,mBAAUG;AAFK,GAAhB;AA/Be,CAA3B;eAqCenB,c","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport WizardSteps from '../../atom/wizard-steps';\nimport WizardSummary from '../../molecule/wizard-summary';\nimport BrandForm from '../brand-form';\nimport ContentTranslate from '../content-translation';\nimport OrganismSearchAndChipsResults from '../search-and-chips-results';\nimport CourseSelection from '../course-selection';\nimport style from './style.css';\n\nconst buildHeader = (wizardHeader, steps) => {\n const {title, onClick} = wizardHeader;\n\n const buttonCloseIcon = {\n size: 'small',\n 'data-name': 'close-button',\n 'aria-label': 'close button',\n icon: 'close',\n onClick\n };\n\n return (\n <div>\n <div className={style.header}>\n <ButtonLinkIconOnly {...buttonCloseIcon} />\n <div className={style.headerTitle}>{title}</div>\n </div>\n <WizardSteps steps={steps} />\n </div>\n );\n};\n\nconst buildForm = content => {\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'translate':\n return <ContentTranslate {...content} />;\n case 'populations':\n return <OrganismSearchAndChipsResults {...content} />;\n case 'courses':\n return <CourseSelection {...content} />;\n }\n};\n\nconst buildButton = (type, step) => {\n const {label, onClick} = step;\n const buttonProps = {\n type: type === 'next' ? 'primary' : 'secondary',\n 'aria-label': `${type} step button`,\n 'data-name': `${type}-step-button`,\n icon: {\n position: type === 'next' ? 'right' : 'left',\n type: type === 'next' ? 'chevron-right' : 'chevron-left'\n },\n label,\n onClick\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nconst buildActionZone = (previousStep, nextStep) => {\n const previousButton = previousStep ? buildButton('previous', previousStep) : null;\n const nextButton = nextStep ? buildButton('next', nextStep) : null;\n return (\n <div className={style.actionZone}>\n <div className={style.button}>{previousButton}</div>\n <div className={style.button}>{nextButton}</div>\n </div>\n );\n};\n\nconst WizardContents = props => {\n const {wizardHeader, steps, summary, content, nextStep, previousStep} = props;\n const headerView = buildHeader(wizardHeader, steps);\n const formView = buildForm(content);\n const actionView = buildActionZone(previousStep, nextStep);\n\n return (\n <div className={style.container}>\n <div className={style.leftSection}>\n {headerView}\n <div className={style.form}>{formView}</div>\n </div>\n <div className={style.rightSection}>\n <div className={style.stickySection}>\n <div className={style.summaryZone}>\n <WizardSummary {...summary} />\n </div>\n {actionView}\n </div>\n </div>\n <div className={style.footer}>\n <div className={style.summaryFooter}>\n <WizardSummary {...summary} />\n </div>\n <div className={style.actionFooter}>{actionView}</div>\n </div>\n </div>\n );\n};\n\nWizardContents.propTypes = {\n wizardHeader: PropTypes.shape({\n title: PropTypes.string,\n onClick: PropTypes.func\n }).isRequired,\n steps: WizardSteps.propTypes.steps,\n summary: PropTypes.shape({\n ...WizardSummary.propTypes\n }).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...ContentTranslate.propTypes,\n type: PropTypes.oneOf(['translate'])\n }),\n PropTypes.shape({\n ...OrganismSearchAndChipsResults.propTypes,\n type: PropTypes.oneOf(['populations'])\n }),\n PropTypes.shape({\n ...CourseSelection.propTypes,\n type: PropTypes.oneOf(['courses'])\n })\n ]),\n previousStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n nextStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardContents;\n"],"file":"index.js"}
@@ -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"}