@coorpacademy/components 10.5.3 → 10.5.7-alpha.10

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 (207) hide show
  1. package/es/atom/range/handle.css +18 -2
  2. package/es/atom/range/handle.js +7 -3
  3. package/es/atom/range/handle.js.map +1 -1
  4. package/es/atom/range/style.css +2 -2
  5. package/es/atom/select/index.js +38 -20
  6. package/es/atom/select/index.js.map +1 -1
  7. package/es/atom/select/style.css +129 -40
  8. package/es/atom/select/test/fixtures/player.js +11 -0
  9. package/es/atom/select/test/fixtures/player.js.map +1 -0
  10. package/es/atom/select/test/fixtures.js +2 -0
  11. package/es/atom/select/test/fixtures.js.map +1 -1
  12. package/es/atom/select/test/select.js +49 -0
  13. package/es/atom/select/test/select.js.map +1 -0
  14. package/es/molecule/course-section/index.js +5 -3
  15. package/es/molecule/course-section/index.js.map +1 -1
  16. package/es/molecule/course-section/style.css +2 -1
  17. package/es/molecule/course-section/test/fixtures/chapter.js +2 -1
  18. package/es/molecule/course-section/test/fixtures/chapter.js.map +1 -1
  19. package/es/molecule/course-section/test/fixtures/course.js +2 -1
  20. package/es/molecule/course-section/test/fixtures/course.js.map +1 -1
  21. package/es/molecule/course-section/test/fixtures.js +15 -0
  22. package/es/molecule/course-section/test/fixtures.js.map +1 -0
  23. package/es/molecule/course-sections/index.js +40 -0
  24. package/es/molecule/course-sections/index.js.map +1 -0
  25. package/es/molecule/course-sections/style.css +3 -0
  26. package/es/molecule/course-sections/test/fixtures/default.js +149 -0
  27. package/es/molecule/course-sections/test/fixtures/default.js.map +1 -0
  28. package/es/molecule/course-sections/test/fixtures/loading.js +9 -0
  29. package/es/molecule/course-sections/test/fixtures/loading.js.map +1 -0
  30. package/es/molecule/course-sections/test/fixtures.js +15 -0
  31. package/es/molecule/course-sections/test/fixtures.js.map +1 -0
  32. package/es/molecule/draggable/index.js +1 -1
  33. package/es/molecule/draggable/index.js.map +1 -1
  34. package/es/molecule/draggable/style.css +2 -16
  35. package/es/molecule/draggable-list/index.js +56 -0
  36. package/es/molecule/draggable-list/index.js.map +1 -0
  37. package/es/molecule/draggable-list/test/fixtures/course-sections.js +20 -0
  38. package/es/molecule/draggable-list/test/fixtures/course-sections.js.map +1 -0
  39. package/es/molecule/draggable-list/test/fixtures/dashboard-sections.js +26 -0
  40. package/es/molecule/draggable-list/test/fixtures/dashboard-sections.js.map +1 -0
  41. package/es/molecule/draggable-list/test/fixtures.js +15 -0
  42. package/es/molecule/draggable-list/test/fixtures.js.map +1 -0
  43. package/es/molecule/{setup-sections → draggable-list}/test/on-drop.js +17 -17
  44. package/es/molecule/draggable-list/test/on-drop.js.map +1 -0
  45. package/es/molecule/questions/drop-down/index.js +1 -6
  46. package/es/molecule/questions/drop-down/index.js.map +1 -1
  47. package/es/molecule/questions/free-text/index.js +35 -15
  48. package/es/molecule/questions/free-text/index.js.map +1 -1
  49. package/es/molecule/questions/free-text/style.css +34 -15
  50. package/es/molecule/questions/free-text/test/fixtures/default.js +1 -1
  51. package/es/molecule/questions/free-text/test/fixtures/default.js.map +1 -1
  52. package/es/molecule/questions/free-text/test/fixtures/with-value-on-change.js +9 -0
  53. package/es/molecule/questions/free-text/test/fixtures/with-value-on-change.js.map +1 -0
  54. package/es/molecule/questions/free-text/test/fixtures/{with-default-value.js → with-value.js} +2 -2
  55. package/es/molecule/questions/free-text/test/fixtures/with-value.js.map +1 -0
  56. package/es/molecule/questions/free-text/test/fixtures.js +4 -2
  57. package/es/molecule/questions/free-text/test/fixtures.js.map +1 -1
  58. package/es/molecule/questions/free-text/test/free-text.js +106 -0
  59. package/es/molecule/questions/free-text/test/free-text.js.map +1 -0
  60. package/es/molecule/questions/qcm/index.js +37 -25
  61. package/es/molecule/questions/qcm/index.js.map +1 -1
  62. package/es/molecule/questions/qcm/style.css +48 -14
  63. package/es/molecule/questions/qcm/test/fixtures/default.js +8 -0
  64. package/es/molecule/questions/qcm/test/fixtures/default.js.map +1 -1
  65. package/es/molecule/questions/qcm/test/qcm.js +103 -0
  66. package/es/molecule/questions/qcm/test/qcm.js.map +1 -0
  67. package/es/molecule/questions/qcm-graphic/index.js +35 -17
  68. package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
  69. package/es/molecule/questions/qcm-graphic/style.css +64 -13
  70. package/es/molecule/questions/qcm-graphic/test/qcm-graphic.js +65 -0
  71. package/es/molecule/questions/qcm-graphic/test/qcm-graphic.js.map +1 -0
  72. package/es/molecule/questions/question-range/style.css +9 -8
  73. package/es/molecule/questions/template/index.js +13 -10
  74. package/es/molecule/questions/template/index.js.map +1 -1
  75. package/es/molecule/select-multiple/style.css +8 -5
  76. package/es/molecule/setup-section/style.css +1 -0
  77. package/es/molecule/setup-sections/index.js +7 -33
  78. package/es/molecule/setup-sections/index.js.map +1 -1
  79. package/es/molecule/wizard-summary/test/fixtures/organize-courses.js +106 -0
  80. package/es/molecule/wizard-summary/test/fixtures/organize-courses.js.map +1 -0
  81. package/es/molecule/wizard-summary/test/fixtures.js +2 -0
  82. package/es/molecule/wizard-summary/test/fixtures.js.map +1 -1
  83. package/es/organism/brand-form/test/fixtures/wizard-playlists.js +1 -1
  84. package/es/organism/brand-form/test/fixtures/wizard-playlists.js.map +1 -1
  85. package/es/organism/wizard-contents/index.js +6 -0
  86. package/es/organism/wizard-contents/index.js.map +1 -1
  87. package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +45 -0
  88. package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -0
  89. package/es/organism/wizard-contents/test/fixtures.js +2 -0
  90. package/es/organism/wizard-contents/test/fixtures.js.map +1 -1
  91. package/es/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js +22 -0
  92. package/es/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js.map +1 -0
  93. package/es/template/back-office/brand-update/test/fixtures.js +2 -0
  94. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  95. package/es/util/get-shadow-box-color-from-primary.js +4 -0
  96. package/es/util/get-shadow-box-color-from-primary.js.map +1 -0
  97. package/es/util/test/get-shadow-box-color-from-primary.js +33 -0
  98. package/es/util/test/get-shadow-box-color-from-primary.js.map +1 -0
  99. package/es/variables/colors.css +3 -0
  100. package/lib/atom/range/handle.css +18 -2
  101. package/lib/atom/range/handle.js +8 -3
  102. package/lib/atom/range/handle.js.map +1 -1
  103. package/lib/atom/range/style.css +2 -2
  104. package/lib/atom/select/index.js +40 -17
  105. package/lib/atom/select/index.js.map +1 -1
  106. package/lib/atom/select/style.css +129 -40
  107. package/lib/atom/select/test/fixtures/player.js +21 -0
  108. package/lib/atom/select/test/fixtures/player.js.map +1 -0
  109. package/lib/atom/select/test/fixtures.js +3 -0
  110. package/lib/atom/select/test/fixtures.js.map +1 -1
  111. package/lib/atom/select/test/select.js +62 -0
  112. package/lib/atom/select/test/select.js.map +1 -0
  113. package/lib/molecule/course-section/index.js +5 -3
  114. package/lib/molecule/course-section/index.js.map +1 -1
  115. package/lib/molecule/course-section/style.css +2 -1
  116. package/lib/molecule/course-section/test/fixtures/chapter.js +2 -1
  117. package/lib/molecule/course-section/test/fixtures/chapter.js.map +1 -1
  118. package/lib/molecule/course-section/test/fixtures/course.js +2 -1
  119. package/lib/molecule/course-section/test/fixtures/course.js.map +1 -1
  120. package/lib/molecule/course-section/test/fixtures.js +25 -0
  121. package/lib/molecule/course-section/test/fixtures.js.map +1 -0
  122. package/lib/molecule/course-sections/index.js +54 -0
  123. package/lib/molecule/course-sections/index.js.map +1 -0
  124. package/lib/molecule/course-sections/style.css +3 -0
  125. package/lib/molecule/course-sections/test/fixtures/default.js +154 -0
  126. package/lib/molecule/course-sections/test/fixtures/default.js.map +1 -0
  127. package/lib/molecule/course-sections/test/fixtures/loading.js +14 -0
  128. package/lib/molecule/course-sections/test/fixtures/loading.js.map +1 -0
  129. package/lib/molecule/course-sections/test/fixtures.js +25 -0
  130. package/lib/molecule/course-sections/test/fixtures.js.map +1 -0
  131. package/lib/molecule/draggable/index.js +1 -1
  132. package/lib/molecule/draggable/index.js.map +1 -1
  133. package/lib/molecule/draggable/style.css +2 -16
  134. package/lib/molecule/draggable-list/index.js +73 -0
  135. package/lib/molecule/draggable-list/index.js.map +1 -0
  136. package/lib/molecule/draggable-list/test/fixtures/course-sections.js +29 -0
  137. package/lib/molecule/draggable-list/test/fixtures/course-sections.js.map +1 -0
  138. package/lib/molecule/draggable-list/test/fixtures/dashboard-sections.js +37 -0
  139. package/lib/molecule/draggable-list/test/fixtures/dashboard-sections.js.map +1 -0
  140. package/lib/molecule/draggable-list/test/fixtures.js +25 -0
  141. package/lib/molecule/draggable-list/test/fixtures.js.map +1 -0
  142. package/lib/molecule/{setup-sections → draggable-list}/test/on-drop.js +19 -19
  143. package/lib/molecule/draggable-list/test/on-drop.js.map +1 -0
  144. package/lib/molecule/questions/drop-down/index.js +1 -5
  145. package/lib/molecule/questions/drop-down/index.js.map +1 -1
  146. package/lib/molecule/questions/free-text/index.js +32 -14
  147. package/lib/molecule/questions/free-text/index.js.map +1 -1
  148. package/lib/molecule/questions/free-text/style.css +34 -15
  149. package/lib/molecule/questions/free-text/test/fixtures/default.js +1 -1
  150. package/lib/molecule/questions/free-text/test/fixtures/default.js.map +1 -1
  151. package/lib/molecule/questions/free-text/test/fixtures/with-value-on-change.js +14 -0
  152. package/lib/molecule/questions/free-text/test/fixtures/with-value-on-change.js.map +1 -0
  153. package/lib/molecule/questions/free-text/test/fixtures/{with-default-value.js → with-value.js} +2 -2
  154. package/lib/molecule/questions/free-text/test/fixtures/with-value.js.map +1 -0
  155. package/lib/molecule/questions/free-text/test/fixtures.js +5 -2
  156. package/lib/molecule/questions/free-text/test/fixtures.js.map +1 -1
  157. package/lib/molecule/questions/free-text/test/free-text.js +119 -0
  158. package/lib/molecule/questions/free-text/test/free-text.js.map +1 -0
  159. package/lib/molecule/questions/qcm/index.js +44 -23
  160. package/lib/molecule/questions/qcm/index.js.map +1 -1
  161. package/lib/molecule/questions/qcm/style.css +48 -14
  162. package/lib/molecule/questions/qcm/test/fixtures/default.js +8 -0
  163. package/lib/molecule/questions/qcm/test/fixtures/default.js.map +1 -1
  164. package/lib/molecule/questions/qcm/test/qcm.js +115 -0
  165. package/lib/molecule/questions/qcm/test/qcm.js.map +1 -0
  166. package/lib/molecule/questions/qcm-graphic/index.js +33 -15
  167. package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
  168. package/lib/molecule/questions/qcm-graphic/style.css +64 -13
  169. package/lib/molecule/questions/qcm-graphic/test/qcm-graphic.js +76 -0
  170. package/lib/molecule/questions/qcm-graphic/test/qcm-graphic.js.map +1 -0
  171. package/lib/molecule/questions/question-range/style.css +9 -8
  172. package/lib/molecule/questions/template/index.js +13 -10
  173. package/lib/molecule/questions/template/index.js.map +1 -1
  174. package/lib/molecule/select-multiple/style.css +8 -5
  175. package/lib/molecule/setup-section/style.css +1 -0
  176. package/lib/molecule/setup-sections/index.js +7 -37
  177. package/lib/molecule/setup-sections/index.js.map +1 -1
  178. package/lib/molecule/wizard-summary/test/fixtures/organize-courses.js +111 -0
  179. package/lib/molecule/wizard-summary/test/fixtures/organize-courses.js.map +1 -0
  180. package/lib/molecule/wizard-summary/test/fixtures.js +3 -0
  181. package/lib/molecule/wizard-summary/test/fixtures.js.map +1 -1
  182. package/lib/organism/brand-form/test/fixtures/wizard-playlists.js +1 -1
  183. package/lib/organism/brand-form/test/fixtures/wizard-playlists.js.map +1 -1
  184. package/lib/organism/wizard-contents/index.js +7 -0
  185. package/lib/organism/wizard-contents/index.js.map +1 -1
  186. package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +54 -0
  187. package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -0
  188. package/lib/organism/wizard-contents/test/fixtures.js +3 -0
  189. package/lib/organism/wizard-contents/test/fixtures.js.map +1 -1
  190. package/lib/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js +32 -0
  191. package/lib/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js.map +1 -0
  192. package/lib/template/back-office/brand-update/test/fixtures.js +3 -0
  193. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  194. package/lib/util/get-shadow-box-color-from-primary.js +12 -0
  195. package/lib/util/get-shadow-box-color-from-primary.js.map +1 -0
  196. package/lib/util/test/get-shadow-box-color-from-primary.js +40 -0
  197. package/lib/util/test/get-shadow-box-color-from-primary.js.map +1 -0
  198. package/lib/variables/colors.css +3 -0
  199. package/package.json +2 -2
  200. package/es/molecule/questions/free-text/test/fixtures/with-default-value.js.map +0 -1
  201. package/es/molecule/search/test/fixtures.js +0 -15
  202. package/es/molecule/search/test/fixtures.js.map +0 -1
  203. package/es/molecule/setup-sections/test/on-drop.js.map +0 -1
  204. package/lib/molecule/questions/free-text/test/fixtures/with-default-value.js.map +0 -1
  205. package/lib/molecule/search/test/fixtures.js +0 -25
  206. package/lib/molecule/search/test/fixtures.js.map +0 -1
  207. package/lib/molecule/setup-sections/test/on-drop.js.map +0 -1
@@ -2,9 +2,10 @@
2
2
  @value mobile from breakpoints;
3
3
  @value colors: "../../../variables/colors.css";
4
4
  @value white from colors;
5
- @value xtraLightGrey from colors;
6
- @value light from colors;
7
5
  @value black from colors;
6
+ @value cm_grey_75 from colors;
7
+ @value cm_primary_blue from colors;
8
+ @value cm_blue_900 from colors;
8
9
 
9
10
  .wrapper {
10
11
  display: flex;
@@ -15,16 +16,34 @@
15
16
  }
16
17
 
17
18
  .answer {
18
- color: black;
19
+ position: relative;
20
+ color: cm_blue_900;
19
21
  background-color: white;
20
- border: 1px solid color(black lightness(85%));
21
- border-radius: 3px;
22
22
  box-sizing: border-box;
23
23
  cursor: pointer;
24
24
  padding: 8px;
25
25
  width: 200px;
26
26
  min-height: 245px;
27
27
  margin: 0 4px 8px;
28
+ box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12);
29
+ border-radius: 16px;
30
+ transition: background-color 0.25s linear;
31
+ }
32
+
33
+ .background {
34
+ top: 0;
35
+ left: 0;
36
+ position: absolute;
37
+ border-radius: 16px;
38
+ height: 100%;
39
+ width: 100%;
40
+ transition: opacity 0.25s linear, background-color 0.25s linear;
41
+ }
42
+
43
+ .content {
44
+ height: 100%;
45
+ width: 100%;
46
+ position: relative;
28
47
  }
29
48
 
30
49
  .imageWrapper {
@@ -33,12 +52,21 @@
33
52
  align-items: center;
34
53
  height: 110px;
35
54
  margin-bottom: 16px;
36
- background-size: contain;
55
+ background-size: cover;
37
56
  background-repeat: no-repeat;
38
57
  background-position: center center;
58
+ border-radius: 12px;
39
59
  }
40
60
 
41
61
  .titleWrapper {
62
+ display: flex;
63
+ height: calc(100% - 126px);
64
+ width: 100%;
65
+ align-items: center;
66
+ justify-content: center;
67
+ }
68
+
69
+ .title {
42
70
  font-family: 'Gilroy';
43
71
  font-size: 17px;
44
72
  line-height: 20px;
@@ -49,7 +77,16 @@
49
77
  }
50
78
 
51
79
  .answer:hover {
52
- background-color: xtraLightGrey;
80
+ background: cm_grey_75;
81
+ box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12);
82
+ }
83
+
84
+ .answer .background{
85
+ opacity: 0;
86
+ }
87
+
88
+ .answer:hover .background{
89
+ opacity: 1;
53
90
  }
54
91
 
55
92
  .selected {
@@ -57,10 +94,23 @@
57
94
  color: white;
58
95
  }
59
96
 
97
+ .selected .background{
98
+ opacity: 1;
99
+ }
100
+
101
+ .selected:hover .background{
102
+ opacity: 0.8;
103
+ }
104
+
105
+ .selected.answer:hover {
106
+ background-color: black;
107
+ }
108
+
60
109
  @media mobile {
61
110
  .wrapper {
62
111
  flex-direction: column;
63
- align-items: stretch;
112
+ display: flex;
113
+ align-items: center;
64
114
  width: 100%;
65
115
  padding-bottom: 0;
66
116
  }
@@ -69,17 +119,18 @@
69
119
  display: flex;
70
120
  align-items: center;
71
121
  flex-flow: row nowrap;
72
- width: 100%;
122
+ width: calc(100% - 45px);
73
123
  min-height: 82px;
74
124
  height: inherit;
75
125
  margin: 0 0 8px;
76
126
  overflow: hidden;
77
127
  }
78
128
 
79
- .answer:hover {
80
- background-color: white;
129
+ .content {
130
+ display: flex;
131
+ align-items: center;
81
132
  }
82
-
133
+
83
134
  .answer:last-child {
84
135
  margin-bottom: 0;
85
136
  }
@@ -96,7 +147,7 @@
96
147
  white-space: wrap;
97
148
  overflow: hidden;
98
149
  padding: 0;
99
- text-align: left;
150
+ justify-content: left;
100
151
  font-size: 15px;
101
152
  }
102
153
  }
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ var _identity2 = _interopRequireDefault(require("lodash/fp/identity"));
4
+
5
+ var _browserEnv = _interopRequireDefault(require("browser-env"));
6
+
7
+ var _ava = _interopRequireDefault(require("ava"));
8
+
9
+ var _react = _interopRequireDefault(require("react"));
10
+
11
+ var _enzyme = require("enzyme");
12
+
13
+ var _enzymeAdapterReact = _interopRequireDefault(require("enzyme-adapter-react-16"));
14
+
15
+ var _ = _interopRequireDefault(require(".."));
16
+
17
+ var _default = _interopRequireDefault(require("./fixtures/default"));
18
+
19
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
+
21
+ 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); }
22
+
23
+ (0, _browserEnv.default)();
24
+ (0, _enzyme.configure)({
25
+ adapter: new _enzymeAdapterReact.default()
26
+ });
27
+ const translate = _identity2.default;
28
+ (0, _ava.default)('onClick should be reachable, should match given aria-label', t => {
29
+ let answerWasClicked = false;
30
+ _default.default.props.answers[1] = _extends(_extends({}, _default.default.props.answers[1]), {}, {
31
+ onClick: () => {
32
+ answerWasClicked = true;
33
+ }
34
+ });
35
+ const wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react.default.createElement(_.default, _default.default.props), {
36
+ context: {
37
+ translate
38
+ }
39
+ });
40
+ const answersImages = wrapper.find('[data-name="answerImage"]');
41
+ t.true(answersImages.at(1).exists());
42
+ t.is(answersImages.at(1).props()['aria-label'], 'Lorem ipsum');
43
+ const answers = wrapper.find('[data-name="answerGraphic"]');
44
+ answers.at(1).simulate('click');
45
+ t.true(answerWasClicked);
46
+ t.pass();
47
+ });
48
+ (0, _ava.default)("should set: selected's background to Primary, unselected's no background", t => {
49
+ const wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react.default.createElement(_.default, _default.default.props), {
50
+ context: {
51
+ translate
52
+ }
53
+ });
54
+ const answers = wrapper.find('[data-name="answerGraphic"]');
55
+ const firstAnswer = answers.at(0);
56
+ t.true(firstAnswer.exists());
57
+ t.deepEqual(firstAnswer.props().style, {});
58
+ const unselectedBackgroundAnswer = firstAnswer.children().at(0);
59
+ t.true(unselectedBackgroundAnswer.exists());
60
+ t.deepEqual(unselectedBackgroundAnswer.props().style, {
61
+ backgroundColor: '#F4F4F5'
62
+ });
63
+ const firstAnswerText = firstAnswer.children().at(1).children().at(1).children().at(0);
64
+ t.true(firstAnswerText.exists());
65
+ const thirdAnswer = answers.at(2);
66
+ t.true(thirdAnswer.exists());
67
+ t.deepEqual(thirdAnswer.props().style, {
68
+ boxShadow: '0 4px 16px rgba(0, 122, 179, 0.25)'
69
+ });
70
+ const selectedBackgroundAnswer = thirdAnswer.children().at(0);
71
+ t.true(selectedBackgroundAnswer.exists());
72
+ t.deepEqual(selectedBackgroundAnswer.props().style, {
73
+ backgroundColor: '#00B0FF'
74
+ });
75
+ });
76
+ //# sourceMappingURL=qcm-graphic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/molecule/questions/qcm-graphic/test/qcm-graphic.js"],"names":["adapter","Adapter","translate","t","answerWasClicked","defaultFixture","props","answers","onClick","wrapper","context","answersImages","find","true","at","exists","is","simulate","pass","firstAnswer","deepEqual","style","unselectedBackgroundAnswer","children","backgroundColor","firstAnswerText","thirdAnswer","boxShadow","selectedBackgroundAnswer"],"mappings":";;;;AAAA;;AACA;;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B,SAAF,CAAYQ,wBAAwB,CAACtB,KAAzB,GAAiCe,KAA7C,EAAoD;AAACG,IAAAA,eAAe,EAAE;AAAlB,GAApD;AACD,CArBD","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {shallow, configure} from 'enzyme';\nimport {identity} from 'lodash/fp';\nimport Adapter from 'enzyme-adapter-react-16';\nimport QCMImage from '..';\nimport defaultFixture from './fixtures/default';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\nconst translate = identity;\n\ntest('onClick should be reachable, should match given aria-label', t => {\n let answerWasClicked = false;\n defaultFixture.props.answers[1] = {\n ...defaultFixture.props.answers[1],\n onClick: () => {\n answerWasClicked = true;\n }\n };\n\n const wrapper = shallow(<QCMImage {...defaultFixture.props} />, {\n context: {translate}\n });\n\n const answersImages = wrapper.find('[data-name=\"answerImage\"]');\n t.true(answersImages.at(1).exists());\n t.is(answersImages.at(1).props()['aria-label'], 'Lorem ipsum');\n\n const answers = wrapper.find('[data-name=\"answerGraphic\"]');\n answers.at(1).simulate('click');\n t.true(answerWasClicked);\n t.pass();\n});\n\ntest(\"should set: selected's background to Primary, unselected's no background\", t => {\n const wrapper = shallow(<QCMImage {...defaultFixture.props} />, {\n context: {translate}\n });\n const answers = wrapper.find('[data-name=\"answerGraphic\"]');\n\n const firstAnswer = answers.at(0);\n t.true(firstAnswer.exists());\n t.deepEqual(firstAnswer.props().style, {});\n const unselectedBackgroundAnswer = firstAnswer.children().at(0);\n t.true(unselectedBackgroundAnswer.exists());\n t.deepEqual(unselectedBackgroundAnswer.props().style, {backgroundColor: '#F4F4F5'});\n const firstAnswerText = firstAnswer.children().at(1).children().at(1).children().at(0);\n t.true(firstAnswerText.exists());\n\n const thirdAnswer = answers.at(2);\n t.true(thirdAnswer.exists());\n t.deepEqual(thirdAnswer.props().style, {boxShadow: '0 4px 16px rgba(0, 122, 179, 0.25)'});\n const selectedBackgroundAnswer = thirdAnswer.children().at(0);\n t.true(selectedBackgroundAnswer.exists());\n t.deepEqual(selectedBackgroundAnswer.props().style, {backgroundColor: '#00B0FF'});\n});\n"],"file":"qcm-graphic.js"}
@@ -1,19 +1,18 @@
1
1
  @value breakpoints: "../../../variables/breakpoints.css";
2
2
  @value mobile from breakpoints;
3
3
  @value colors: "../../../variables/colors.css";
4
- @value brand from colors;
5
- @value black from colors;
4
+ @value cm_blue_900 from colors;
6
5
 
7
6
  .wrapper {
8
7
  width: 500px;
9
8
  }
10
9
 
11
10
  .title {
12
- color: brand;
13
11
  display: table;
14
12
  font-family: "Gilroy";
15
- font-size: 24px;
16
- font-weight: 700;
13
+ font-size: 28px;
14
+ font-weight: bold;
15
+ line-height: 36px;
17
16
  margin: 0 auto 15px;
18
17
  text-align: center;
19
18
  user-select: none;
@@ -27,11 +26,13 @@
27
26
 
28
27
  .label {
29
28
  font-family: "Gilroy";
30
- color: black;
31
- font-size: 15px;
32
- font-weight: 700;
29
+ color: cm_blue_900;
30
+ font-size: 18px;
31
+ font-weight: 600;
33
32
  display: inline-block;
33
+ line-height: 24px;
34
34
  user-select: none;
35
+ font-style: normal;
35
36
  }
36
37
 
37
38
  @media mobile {
@@ -23,6 +23,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
23
23
 
24
24
  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); }
25
25
 
26
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
27
+
26
28
  const Template = ({
27
29
  template,
28
30
  answers
@@ -49,10 +51,16 @@ const Template = ({
49
51
  name: part.value
50
52
  }, answers);
51
53
  if (!field) return null;
52
- const fieldView = field.type === 'text' ? /*#__PURE__*/_react.default.createElement(_freeText.default, _extends({}, field, {
54
+
55
+ const {
56
+ type: fieldType
57
+ } = field,
58
+ fieldProps = _objectWithoutPropertiesLoose(field, ["type"]);
59
+
60
+ const fieldView = fieldType === 'text' ? /*#__PURE__*/_react.default.createElement(_freeText.default, _extends({}, fieldProps, {
53
61
  className: _style.default.text
54
- })) : /*#__PURE__*/_react.default.createElement(_dropDown.default, _extends({}, field, {
55
- theme: "template"
62
+ })) : /*#__PURE__*/_react.default.createElement(_dropDown.default, _extends({}, fieldProps, {
63
+ theme: "player"
56
64
  }));
57
65
  return /*#__PURE__*/_react.default.createElement("div", {
58
66
  className: _style.default.answerType,
@@ -68,16 +76,11 @@ const Template = ({
68
76
  };
69
77
 
70
78
  const TextPropTypes = process.env.NODE_ENV !== "production" ? _extends(_extends({}, _dropDown.default.propTypes), {}, {
71
- type: _propTypes.default.string,
72
- name: _propTypes.default.string
73
- }) : {};
74
- const DropDownPropTypes = process.env.NODE_ENV !== "production" ? _extends(_extends({}, _dropDown.default.propTypes), {}, {
75
- type: _propTypes.default.string,
76
- name: _propTypes.default.string
79
+ type: _propTypes.default.string
77
80
  }) : {};
78
81
  Template.propTypes = process.env.NODE_ENV !== "production" ? {
79
82
  template: _propTypes.default.string,
80
- answers: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape(DropDownPropTypes), _propTypes.default.shape(TextPropTypes)]))
83
+ answers: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape(_dropDown.default.propTypes), _propTypes.default.shape(TextPropTypes)]))
81
84
  } : {};
82
85
  var _default = Template;
83
86
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/questions/template/index.js"],"names":["Template","template","answers","totalTemplate","templateCompose","convert","cap","part","key","type","__html","value","field","name","fieldView","style","text","answerType","wrapper","TextPropTypes","DropDown","propTypes","PropTypes","string","DropDownPropTypes","arrayOf","oneOfType","shape"],"mappings":";;;;;;;;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EAAAA,IAAI,EAAEa,mBAAUC,MAFlB;AAGEV,EAAAA,IAAI,EAAES,mBAAUC;AAHlB;AAMA,MAAMC,iBAAN,iEACKJ,kBAASC,SADd;AAEEZ,EAAAA,IAAI,EAAEa,mBAAUC,MAFlB;AAGEV,EAAAA,IAAI,EAAES,mBAAUC;AAHlB;AAMAvB,QAAQ,CAACqB,SAAT,2CAAqB;AACnBpB,EAAAA,QAAQ,EAAEqB,mBAAUC,MADD;AAEnBrB,EAAAA,OAAO,EAAEoB,mBAAUG,OAAV,CACPH,mBAAUI,SAAV,CAAoB,CAACJ,mBAAUK,KAAV,CAAgBH,iBAAhB,CAAD,EAAqCF,mBAAUK,KAAV,CAAgBR,aAAhB,CAArC,CAApB,CADO;AAFU,CAArB;eAOenB,Q","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, find} from 'lodash/fp';\nimport parseTemplateString from '../../../util/parse-template-string';\nimport DropDown from '../drop-down';\nimport FreeText from '../free-text';\nimport style from './style.css';\n\nconst Template = ({template, answers}) => {\n const totalTemplate = parseTemplateString(template);\n const templateCompose = map.convert({cap: false})((part, key) => {\n const type = part.type;\n if (type === 'string') {\n return (\n <span\n key={key}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: part.value}}\n />\n );\n }\n if (type === 'answerField') {\n const field = find({name: part.value}, answers);\n if (!field) return null;\n const fieldView =\n field.type === 'text' ? (\n <FreeText {...field} className={style.text} />\n ) : (\n <DropDown {...field} theme=\"template\" />\n );\n\n return (\n <div className={style.answerType} key={part.value}>\n {fieldView}\n </div>\n );\n }\n }, totalTemplate);\n\n return (\n <div data-name=\"template-wrapper\" className={style.wrapper}>\n {templateCompose}\n </div>\n );\n};\n\nconst TextPropTypes = {\n ...DropDown.propTypes,\n type: PropTypes.string,\n name: PropTypes.string\n};\n\nconst DropDownPropTypes = {\n ...DropDown.propTypes,\n type: PropTypes.string,\n name: PropTypes.string\n};\n\nTemplate.propTypes = {\n template: PropTypes.string,\n answers: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.shape(DropDownPropTypes), PropTypes.shape(TextPropTypes)])\n )\n};\n\nexport default Template;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/questions/template/index.js"],"names":["Template","template","answers","totalTemplate","templateCompose","convert","cap","part","key","type","__html","value","field","name","fieldType","fieldProps","fieldView","style","text","answerType","wrapper","TextPropTypes","DropDown","propTypes","PropTypes","string","arrayOf","oneOfType","shape"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CAAC;AAACC,EAAAA,QAAD;AAAWC,EAAAA;AAAX,CAAD,KAAyB;AACxC,QAAMC,aAAa,GAAG,kCAAoBF,QAApB,CAAtB;;AACA,QAAMG,eAAe,GAAG,cAAIC,OAAJ,CAAY;AAACC,IAAAA,GAAG,EAAE;AAAN,GAAZ,EAA0B,CAACC,IAAD,EAAOC,GAAP,KAAe;AAC/D,UAAMC,IAAI,GAAGF,IAAI,CAACE,IAAlB;;AACA,QAAIA,IAAI,KAAK,QAAb,EAAuB;AACrB,0BACE;AACE,QAAA,GAAG,EAAED,GADP,CAEE;AAFF;AAGE,QAAA,uBAAuB,EAAE;AAACE,UAAAA,MAAM,EAAEH,IAAI,CAACI;AAAd;AAH3B,QADF;AAOD;;AACD,QAAIF,IAAI,KAAK,aAAb,EAA4B;AAC1B,YAAMG,KAAK,GAAG,oBAAK;AAACC,QAAAA,IAAI,EAAEN,IAAI,CAACI;AAAZ,OAAL,EAAyBT,OAAzB,CAAd;AACA,UAAI,CAACU,KAAL,EAAY,OAAO,IAAP;;AACZ,YAAM;AAACH,QAAAA,IAAI,EAAEK;AAAP,UAAmCF,KAAzC;AAAA,YAA2BG,UAA3B,iCAAyCH,KAAzC;;AACA,YAAMI,SAAS,GACbF,SAAS,KAAK,MAAd,gBACE,6BAAC,iBAAD,eAAcC,UAAd;AAA0B,QAAA,SAAS,EAAEE,eAAMC;AAA3C,SADF,gBAGE,6BAAC,iBAAD,eAAcH,UAAd;AAA0B,QAAA,KAAK,EAAC;AAAhC,SAJJ;AAOA,0BACE;AAAK,QAAA,SAAS,EAAEE,eAAME,UAAtB;AAAkC,QAAA,GAAG,EAAEZ,IAAI,CAACI;AAA5C,SACGK,SADH,CADF;AAKD;AACF,GA5BuB,EA4BrBb,aA5BqB,CAAxB;;AA8BA,sBACE;AAAK,iBAAU,kBAAf;AAAkC,IAAA,SAAS,EAAEc,eAAMG;AAAnD,KACGhB,eADH,CADF;AAKD,CArCD;;AAuCA,MAAMiB,aAAN,iEACKC,kBAASC,SADd;AAEEd,EAAAA,IAAI,EAAEe,mBAAUC;AAFlB;AAKAzB,QAAQ,CAACuB,SAAT,2CAAqB;AACnBtB,EAAAA,QAAQ,EAAEuB,mBAAUC,MADD;AAEnBvB,EAAAA,OAAO,EAAEsB,mBAAUE,OAAV,CACPF,mBAAUG,SAAV,CAAoB,CAACH,mBAAUI,KAAV,CAAgBN,kBAASC,SAAzB,CAAD,EAAsCC,mBAAUI,KAAV,CAAgBP,aAAhB,CAAtC,CAApB,CADO;AAFU,CAArB;eAOerB,Q","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, find} from 'lodash/fp';\nimport parseTemplateString from '../../../util/parse-template-string';\nimport DropDown from '../drop-down';\nimport FreeText from '../free-text';\nimport style from './style.css';\n\nconst Template = ({template, answers}) => {\n const totalTemplate = parseTemplateString(template);\n const templateCompose = map.convert({cap: false})((part, key) => {\n const type = part.type;\n if (type === 'string') {\n return (\n <span\n key={key}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: part.value}}\n />\n );\n }\n if (type === 'answerField') {\n const field = find({name: part.value}, answers);\n if (!field) return null;\n const {type: fieldType, ...fieldProps} = field;\n const fieldView =\n fieldType === 'text' ? (\n <FreeText {...fieldProps} className={style.text} />\n ) : (\n <DropDown {...fieldProps} theme=\"player\" />\n );\n\n return (\n <div className={style.answerType} key={part.value}>\n {fieldView}\n </div>\n );\n }\n }, totalTemplate);\n\n return (\n <div data-name=\"template-wrapper\" className={style.wrapper}>\n {templateCompose}\n </div>\n );\n};\n\nconst TextPropTypes = {\n ...DropDown.propTypes,\n type: PropTypes.string\n};\n\nTemplate.propTypes = {\n template: PropTypes.string,\n answers: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.shape(DropDown.propTypes), PropTypes.shape(TextPropTypes)])\n )\n};\n\nexport default Template;\n"],"file":"index.js"}
@@ -352,6 +352,7 @@
352
352
 
353
353
  .coorpmanager .descriptionLabel {
354
354
  margin: 0 1px 18px 0;
355
+ padding: 8px 16px;
355
356
  border-radius: 7px;
356
357
  background-color: cm_grey_700;
357
358
  flex-grow: 0;
@@ -365,14 +366,16 @@
365
366
  text-align: center;
366
367
  color: white;
367
368
  padding: 8px 16px;
368
- max-width: 200px;
369
- position: absolute;
370
- left: -20px;
371
- z-index: 999;
372
- bottom: 18px;
369
+ max-width: 348px;
373
370
  width: max-content;
371
+ position: absolute;
372
+ left: -24px;
373
+ z-index: 3;
374
+ bottom: 5px;
374
375
  visibility: hidden;
375
376
  opacity: 0;
377
+ overflow-wrap: break-word;
378
+ white-space: break-spaces;
376
379
  }
377
380
 
378
381
  .coorpmanager .title.titleWithSelection .descriptionLabel,
@@ -14,6 +14,7 @@
14
14
  justify-content: space-between;
15
15
  padding: 0 24px 0 48px;
16
16
  box-sizing: border-box;
17
+ border-radius: 7px;
17
18
  }
18
19
 
19
20
  .title {
@@ -3,11 +3,11 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
5
 
6
- var _react = _interopRequireWildcard(require("react"));
6
+ var _react = _interopRequireDefault(require("react"));
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _draggable = _interopRequireDefault(require("../draggable"));
10
+ var _draggableList = _interopRequireDefault(require("../draggable-list"));
11
11
 
12
12
  var _setupSection = _interopRequireDefault(require("../setup-section"));
13
13
 
@@ -17,12 +17,6 @@ var _style = _interopRequireDefault(require("./style.css"));
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
21
-
22
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
-
24
- 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); }
25
-
26
20
  const Loading = () => /*#__PURE__*/_react.default.createElement("div", {
27
21
  className: _style.default.loading
28
22
  }, /*#__PURE__*/_react.default.createElement(_loader.default, null));
@@ -32,36 +26,12 @@ const SetupSections = ({
32
26
  loading,
33
27
  onDrop
34
28
  }) => {
35
- const [dragTo, setDragTo] = (0, _react.useState)(null);
36
- const [dragFrom, setDragFrom] = (0, _react.useState)(null);
37
- const dragStartHandler = (0, _react.useCallback)(id => {
38
- setDragFrom(id);
39
- }, [setDragFrom]);
40
- const dragOverHandler = (0, _react.useCallback)(id => {
41
- if (dragTo === id) return;
42
- setDragTo(id);
43
- }, [dragTo, setDragTo]);
44
- const dragLeaveHandler = (0, _react.useCallback)(id => {
45
- setDragTo(null);
46
- }, [setDragTo]);
47
- const dropHandler = (0, _react.useCallback)(id => {
48
- if (onDrop && dragFrom) onDrop(dragFrom, id);
49
- setDragTo(null);
50
- setDragFrom(null);
51
- }, [onDrop, setDragTo, setDragFrom, dragFrom]);
52
29
  if (loading) return /*#__PURE__*/_react.default.createElement(Loading, null);
53
- const sectionsView = sections.map(section => /*#__PURE__*/_react.default.createElement(_draggable.default, {
54
- key: section.id,
55
- id: section.id,
56
- dragging: dragTo === section.id,
57
- onDragStart: dragStartHandler,
58
- onDragOver: dragOverHandler,
59
- onDragLeave: dragLeaveHandler,
60
- onDrop: dropHandler
61
- }, /*#__PURE__*/_react.default.createElement(_setupSection.default, _extends({}, section, {
62
- key: section.id
63
- }))));
64
- return /*#__PURE__*/_react.default.createElement("div", null, sectionsView);
30
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_draggableList.default, {
31
+ itemType: "setup-section",
32
+ items: sections,
33
+ onDrop: onDrop
34
+ }));
65
35
  };
66
36
 
67
37
  SetupSections.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/setup-sections/index.js"],"names":["Loading","style","loading","SetupSections","sections","onDrop","dragTo","setDragTo","dragFrom","setDragFrom","dragStartHandler","id","dragOverHandler","dragLeaveHandler","dropHandler","sectionsView","map","section","propTypes","PropTypes","arrayOf","shape","SetupSection","bool","func"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,OAAO,GAAG,mBACd;AAAK,EAAA,SAAS,EAAEC,eAAMC;AAAtB,gBACE,6BAAC,eAAD,OADF,CADF;;AAMA,MAAMC,aAAa,GAAG,CAAC;AAACC,EAAAA,QAAD;AAAWF,EAAAA,OAAX;AAAoBG,EAAAA;AAApB,CAAD,KAAiC;AACrD,QAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,qBAAS,IAAT,CAA5B;AACA,QAAM,CAACC,QAAD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AEA,OAAO,CAACN;AAAxC,KATF,CADmB,CAArB;AAaA,sBAAO,0CAAMI,YAAN,CAAP;AACD,CApDD;;AAsDAZ,aAAa,CAACe,SAAd,2CAA0B;AACxBd,EAAAA,QAAQ,EAAEe,mBAAUC,OAAV,CAAkBD,mBAAUE,KAAV,CAAgBC,sBAAaJ,SAA7B,CAAlB,CADc;AAExBhB,EAAAA,OAAO,EAAEiB,mBAAUI,IAFK;AAGxBlB,EAAAA,MAAM,EAAEc,mBAAUK;AAHM,CAA1B;eAMerB,a","sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Draggable from '../draggable';\nimport SetupSection from '../setup-section';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst Loading = () => (\n <div className={style.loading}>\n <Loader />\n </div>\n);\n\nconst SetupSections = ({sections, loading, onDrop}) => {\n const [dragTo, setDragTo] = useState(null);\n const [dragFrom, setDragFrom] = useState(null);\n\n const dragStartHandler = useCallback(\n id => {\n setDragFrom(id);\n },\n [setDragFrom]\n );\n\n const dragOverHandler = useCallback(\n id => {\n if (dragTo === id) return;\n setDragTo(id);\n },\n [dragTo, setDragTo]\n );\n\n const dragLeaveHandler = useCallback(\n id => {\n setDragTo(null);\n },\n [setDragTo]\n );\n\n const dropHandler = useCallback(\n id => {\n if (onDrop && dragFrom) onDrop(dragFrom, id);\n\n setDragTo(null);\n setDragFrom(null);\n },\n [onDrop, setDragTo, setDragFrom, dragFrom]\n );\n\n if (loading) return <Loading />;\n\n const sectionsView = sections.map(section => (\n <Draggable\n key={section.id}\n id={section.id}\n dragging={dragTo === section.id}\n onDragStart={dragStartHandler}\n onDragOver={dragOverHandler}\n onDragLeave={dragLeaveHandler}\n onDrop={dropHandler}\n >\n <SetupSection {...section} key={section.id} />\n </Draggable>\n ));\n return <div>{sectionsView}</div>;\n};\n\nSetupSections.propTypes = {\n sections: PropTypes.arrayOf(PropTypes.shape(SetupSection.propTypes)),\n loading: PropTypes.bool,\n onDrop: PropTypes.func\n};\n\nexport default SetupSections;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/setup-sections/index.js"],"names":["Loading","style","loading","SetupSections","sections","onDrop","propTypes","PropTypes","arrayOf","shape","SetupSection","bool","func"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAG,mBACd;AAAK,EAAA,SAAS,EAAEC,eAAMC;AAAtB,gBACE,6BAAC,eAAD,OADF,CADF;;AAMA,MAAMC,aAAa,GAAG,CAAC;AAACC,EAAAA,QAAD;AAAWF,EAAAA,OAAX;AAAoBG,EAAAA;AAApB,CAAD,KAAiC;AACrD,MAAIH,OAAJ,EAAa,oBAAO,6BAAC,OAAD,OAAP;AAEb,sBACE,uDACE,6BAAC,sBAAD;AAAe,IAAA,QAAQ,EAAC,eAAxB;AAAwC,IAAA,KAAK,EAAEE,QAA/C;AAAyD,IAAA,MAAM,EAAEC;AAAjE,IADF,CADF;AAKD,CARD;;AAUAF,aAAa,CAACG,SAAd,2CAA0B;AACxBF,EAAAA,QAAQ,EAAEG,mBAAUC,OAAV,CAAkBD,mBAAUE,KAAV,CAAgBC,sBAAaJ,SAA7B,CAAlB,CADc;AAExBJ,EAAAA,OAAO,EAAEK,mBAAUI,IAFK;AAGxBN,EAAAA,MAAM,EAAEE,mBAAUK;AAHM,CAA1B;eAMeT,a","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport DraggableList from '../draggable-list';\nimport SetupSection from '../setup-section';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst Loading = () => (\n <div className={style.loading}>\n <Loader />\n </div>\n);\n\nconst SetupSections = ({sections, loading, onDrop}) => {\n if (loading) return <Loading />;\n\n return (\n <div>\n <DraggableList itemType=\"setup-section\" items={sections} onDrop={onDrop} />\n </div>\n );\n};\n\nSetupSections.propTypes = {\n sections: PropTypes.arrayOf(PropTypes.shape(SetupSection.propTypes)),\n loading: PropTypes.bool,\n onDrop: PropTypes.func\n};\n\nexport default SetupSections;\n"],"file":"index.js"}
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var _default = {
6
+ props: {
7
+ title: 'Certification summary',
8
+ sections: [{
9
+ items: [{
10
+ type: 'mainElement',
11
+ title: 'Language',
12
+ value: '🇬🇧 English'
13
+ }, {
14
+ type: 'mainElement',
15
+ title: 'Name',
16
+ value: 'Marketing expert'
17
+ }]
18
+ }, {
19
+ title: 'Translation',
20
+ items: [{
21
+ type: 'text',
22
+ text: '🇫🇷 French'
23
+ }, {
24
+ type: 'text',
25
+ text: '🇪🇸 Spanish'
26
+ }, {
27
+ type: 'text',
28
+ text: '🇮🇹 Italian'
29
+ }]
30
+ }, {
31
+ title: 'Populations',
32
+ items: [{
33
+ type: 'text',
34
+ text: 'Population 2'
35
+ }],
36
+ counterText: '1 population'
37
+ }, {
38
+ title: 'Courses',
39
+ items: [{
40
+ type: 'content',
41
+ title: 'Marketing and online advertising Marketing and online advertising Marketing and online advertising Marketing and online advertising',
42
+ author: 'Author',
43
+ category: 'course',
44
+ label: 'Course'
45
+ }, {
46
+ type: 'content',
47
+ title: 'Social networks',
48
+ author: 'Author',
49
+ category: 'chapter',
50
+ label: "5' learning"
51
+ }, {
52
+ type: 'content',
53
+ title: 'Other title',
54
+ author: 'Author 2',
55
+ category: 'course',
56
+ label: 'Course'
57
+ }, {
58
+ type: 'content',
59
+ title: 'Social others',
60
+ author: 'Author XXX',
61
+ category: 'chapter',
62
+ label: "5' learning"
63
+ }, {
64
+ type: 'content',
65
+ title: 'Social others others',
66
+ author: 'Author XXX',
67
+ label: "5' learning",
68
+ category: 'chapter'
69
+ }, {
70
+ type: 'content',
71
+ title: 'Something about empowerment',
72
+ author: 'Author XXX',
73
+ label: 'course',
74
+ category: 'course'
75
+ }, {
76
+ type: 'content',
77
+ title: 'Be a better human being',
78
+ author: 'Author XXX',
79
+ label: "5' learning",
80
+ category: 'chapter'
81
+ }, {
82
+ type: 'content',
83
+ title: 'Stronger faster better',
84
+ author: 'Author XXX',
85
+ label: 'course',
86
+ category: 'course'
87
+ }, {
88
+ type: 'content',
89
+ title: 'Relativity beyond time',
90
+ author: 'Author XXX',
91
+ label: 'course',
92
+ category: 'course'
93
+ }, {
94
+ type: 'content',
95
+ title: 'Are you awake?',
96
+ author: 'Author XXX',
97
+ label: "5' learning",
98
+ category: 'chapter'
99
+ }],
100
+ counterText: '12 courses'
101
+ }],
102
+ action: {
103
+ icon: 'save',
104
+ text: 'Save in drafts',
105
+ 'aria-label': 'Save in drafts',
106
+ onClick: () => console.log('save')
107
+ }
108
+ }
109
+ };
110
+ exports.default = _default;
111
+ //# sourceMappingURL=organize-courses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/molecule/wizard-summary/test/fixtures/organize-courses.js"],"names":["props","title","sections","items","type","value","text","counterText","author","category","label","action","icon","onClick","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,uBADF;AAELC,IAAAA,QAAQ,EAAE,CACR;AACEC,MAAAA,KAAK,EAAE,CACL;AACEC,QAAAA,IAAI,EAAE,aADR;AAEEH,QAAAA,KAAK,EAAE,UAFT;AAGEI,QAAAA,KAAK,EAAE;AAHT,OADK,EAML;AACED,QAAAA,IAAI,EAAE,aADR;AAEEH,QAAAA,KAAK,EAAE,MAFT;AAGEI,QAAAA,KAAK,EAAE;AAHT,OANK;AADT,KADQ,EAeR;AACEJ,MAAAA,KAAK,EAAE,aADT;AAEEE,MAAAA,KAAK,EAAE,CACL;AACEC,QAAAA,IAAI,EAAE,MADR;AAEEE,QAAAA,IAAI,EAAE;AAFR,OADK,EAKL;AACEF,QAAAA,IAAI,EAAE,MADR;AAEEE,QAAAA,IAAI,EAAE;AAFR,OALK,EASL;AACEF,QAAAA,IAAI,EAAE,MADR;AAEEE,QAAAA,IAAI,EAAE;AAFR,OATK;AAFT,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,QAAAA,KAAK,EAAE,QAJT;AAKED,QAAAA,QAAQ,EAAE;AALZ,OArCK,EA4CL;AACEL,QAAAA,IAAI,EAAE,SADR;AAEEH,QAAAA,KAAK,EAAE,yBAFT;AAGEO,QAAAA,MAAM,EAAE,YAHV;AAIEE,QAAAA,KAAK,EAAE,aAJT;AAKED,QAAAA,QAAQ,EAAE;AALZ,OA5CK,EAmDL;AACEL,QAAAA,IAAI,EAAE,SADR;AAEEH,QAAAA,KAAK,EAAE,wBAFT;AAGEO,QAAAA,MAAM,EAAE,YAHV;AAIEE,QAAAA,KAAK,EAAE,QAJT;AAKED,QAAAA,QAAQ,EAAE;AALZ,OAnDK,EA0DL;AACEL,QAAAA,IAAI,EAAE,SADR;AAEEH,QAAAA,KAAK,EAAE,wBAFT;AAGEO,QAAAA,MAAM,EAAE,YAHV;AAIEE,QAAAA,KAAK,EAAE,QAJT;AAKED,QAAAA,QAAQ,EAAE;AALZ,OA1DK,EAiEL;AACEL,QAAAA,IAAI,EAAE,SADR;AAEEH,QAAAA,KAAK,EAAE,gBAFT;AAGEO,QAAAA,MAAM,EAAE,YAHV;AAIEE,QAAAA,KAAK,EAAE,aAJT;AAKED,QAAAA,QAAQ,EAAE;AALZ,OAjEK,CAFT;AA2EEF,MAAAA,WAAW,EAAE;AA3Ef,KA1CQ,CAFL;AA0HLI,IAAAA,MAAM,EAAE;AACNC,MAAAA,IAAI,EAAE,MADA;AAENN,MAAAA,IAAI,EAAE,gBAFA;AAGN,oBAAc,gBAHR;AAINO,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,MAAZ;AAJT;AA1HH;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Certification summary',\n sections: [\n {\n items: [\n {\n type: 'mainElement',\n title: 'Language',\n value: '🇬🇧 English'\n },\n {\n type: 'mainElement',\n title: 'Name',\n value: 'Marketing expert'\n }\n ]\n },\n {\n title: 'Translation',\n items: [\n {\n type: 'text',\n text: '🇫🇷 French'\n },\n {\n type: 'text',\n text: '🇪🇸 Spanish'\n },\n {\n type: 'text',\n text: '🇮🇹 Italian'\n }\n ]\n },\n {\n title: 'Populations',\n items: [\n {\n type: 'text',\n text: 'Population 2'\n }\n ],\n counterText: '1 population'\n },\n {\n title: 'Courses',\n items: [\n {\n type: 'content',\n title:\n 'Marketing and online advertising Marketing and online advertising Marketing and online advertising Marketing and online advertising',\n author: 'Author',\n category: 'course',\n label: 'Course'\n },\n {\n type: 'content',\n title: 'Social networks',\n author: 'Author',\n category: 'chapter',\n label: \"5' learning\"\n },\n {\n type: 'content',\n title: 'Other title',\n author: 'Author 2',\n category: 'course',\n label: 'Course'\n },\n {\n type: 'content',\n title: 'Social others',\n author: 'Author XXX',\n category: 'chapter',\n label: \"5' learning\"\n },\n {\n type: 'content',\n title: 'Social others others',\n author: 'Author XXX',\n label: \"5' learning\",\n category: 'chapter'\n },\n {\n type: 'content',\n title: 'Something about empowerment',\n author: 'Author XXX',\n label: 'course',\n category: 'course'\n },\n {\n type: 'content',\n title: 'Be a better human being',\n author: 'Author XXX',\n label: \"5' learning\",\n category: 'chapter'\n },\n {\n type: 'content',\n title: 'Stronger faster better',\n author: 'Author XXX',\n label: 'course',\n category: 'course'\n },\n {\n type: 'content',\n title: 'Relativity beyond time',\n author: 'Author XXX',\n label: 'course',\n category: 'course'\n },\n {\n type: 'content',\n title: 'Are you awake?',\n author: 'Author XXX',\n label: \"5' learning\",\n category: 'chapter'\n }\n ],\n counterText: '12 courses'\n }\n ],\n action: {\n icon: 'save',\n text: 'Save in drafts',\n 'aria-label': 'Save in drafts',\n onClick: () => console.log('save')\n }\n }\n};\n"],"file":"organize-courses.js"}
@@ -12,6 +12,8 @@ var _default = _interopRequireDefault(require("./fixtures/default"));
12
12
 
13
13
  var _oneSection = _interopRequireDefault(require("./fixtures/one-section"));
14
14
 
15
+ var _organizeCourses = _interopRequireDefault(require("./fixtures/organize-courses"));
16
+
15
17
  var _tabletClosed = _interopRequireDefault(require("./fixtures/tablet-closed"));
16
18
 
17
19
  var _threeSections = _interopRequireDefault(require("./fixtures/three-sections"));
@@ -28,6 +30,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
28
30
  });
29
31
  (0, _ava.default)('Molecule › MoleculeWizardSummary › Default › should be rendered', _renderComponent.default, _.default, _default.default);
30
32
  (0, _ava.default)('Molecule › MoleculeWizardSummary › OneSection › should be rendered', _renderComponent.default, _.default, _oneSection.default);
33
+ (0, _ava.default)('Molecule › MoleculeWizardSummary › OrganizeCourses › should be rendered', _renderComponent.default, _.default, _organizeCourses.default);
31
34
  (0, _ava.default)('Molecule › MoleculeWizardSummary › TabletClosed › should be rendered', _renderComponent.default, _.default, _tabletClosed.default);
32
35
  (0, _ava.default)('Molecule › MoleculeWizardSummary › ThreeSections › should be rendered', _renderComponent.default, _.default, _threeSections.default);
33
36
  (0, _ava.default)('Molecule › MoleculeWizardSummary › TwoSections › should be rendered', _renderComponent.default, _.default, _twoSections.default);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/wizard-summary/test/fixtures.js"],"names":["t","pass","MoleculeWizardSummary","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureOneSection","fixtureTabletClosed","fixtureThreeSections","fixtureTwoSections"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,gEAAL,EAAuEA,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAsBC,SAA9B,EAAyC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,iEAAL,EAAwEG,wBAAxE,EAA8FN,SAA9F,EAAqHO,gBAArH;AACA,kBAAK,oEAAL,EAA2ED,wBAA3E,EAAiGN,SAAjG,EAAwHQ,mBAAxH;AACA,kBAAK,sEAAL,EAA6EF,wBAA7E,EAAmGN,SAAnG,EAA0HS,qBAA1H;AACA,kBAAK,uEAAL,EAA8EH,wBAA9E,EAAoGN,SAApG,EAA2HU,sBAA3H;AACA,kBAAK,qEAAL,EAA4EJ,wBAA5E,EAAkGN,SAAlG,EAAyHW,oBAAzH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeWizardSummary from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureOneSection from './fixtures/one-section';\nimport fixtureTabletClosed from './fixtures/tablet-closed';\nimport fixtureThreeSections from './fixtures/three-sections';\nimport fixtureTwoSections from './fixtures/two-sections';\n\ntest('Molecule › MoleculeWizardSummary > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeWizardSummary.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeWizardSummary.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeWizardSummary › Default › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureDefault);\ntest('Molecule › MoleculeWizardSummary › OneSection › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureOneSection);\ntest('Molecule › MoleculeWizardSummary › TabletClosed › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureTabletClosed);\ntest('Molecule › MoleculeWizardSummary › ThreeSections › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureThreeSections);\ntest('Molecule › MoleculeWizardSummary › TwoSections › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureTwoSections);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/wizard-summary/test/fixtures.js"],"names":["t","pass","MoleculeWizardSummary","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureOneSection","fixtureOrganizeCourses","fixtureTabletClosed","fixtureThreeSections","fixtureTwoSections"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,gEAAL,EAAuEA,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAsBC,SAA9B,EAAyC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,iEAAL,EAAwEG,wBAAxE,EAA8FN,SAA9F,EAAqHO,gBAArH;AACA,kBAAK,oEAAL,EAA2ED,wBAA3E,EAAiGN,SAAjG,EAAwHQ,mBAAxH;AACA,kBAAK,yEAAL,EAAgFF,wBAAhF,EAAsGN,SAAtG,EAA6HS,wBAA7H;AACA,kBAAK,sEAAL,EAA6EH,wBAA7E,EAAmGN,SAAnG,EAA0HU,qBAA1H;AACA,kBAAK,uEAAL,EAA8EJ,wBAA9E,EAAoGN,SAApG,EAA2HW,sBAA3H;AACA,kBAAK,qEAAL,EAA4EL,wBAA5E,EAAkGN,SAAlG,EAAyHY,oBAAzH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeWizardSummary from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureOneSection from './fixtures/one-section';\nimport fixtureOrganizeCourses from './fixtures/organize-courses';\nimport fixtureTabletClosed from './fixtures/tablet-closed';\nimport fixtureThreeSections from './fixtures/three-sections';\nimport fixtureTwoSections from './fixtures/two-sections';\n\ntest('Molecule › MoleculeWizardSummary > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeWizardSummary.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeWizardSummary.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeWizardSummary › Default › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureDefault);\ntest('Molecule › MoleculeWizardSummary › OneSection › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureOneSection);\ntest('Molecule › MoleculeWizardSummary › OrganizeCourses › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureOrganizeCourses);\ntest('Molecule › MoleculeWizardSummary › TabletClosed › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureTabletClosed);\ntest('Molecule › MoleculeWizardSummary › ThreeSections › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureThreeSections);\ntest('Molecule › MoleculeWizardSummary › TwoSections › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureTwoSections);\n"],"file":"fixtures.js"}
@@ -9,7 +9,7 @@ var _default = {
9
9
  type: 'selectMultiple',
10
10
  title: 'Languages',
11
11
  placeholder: 'Language selection',
12
- description: 'This is the tooltip text',
12
+ description: 'The name and description of your custom playlist will be displayed in the selected language. Only the selected language will be saved. You can translate during step 2 "Translations".',
13
13
  theme: 'coorpmanager',
14
14
  hint: '15 / 30 characters',
15
15
  size: 'default',