@coorpacademy/app-review 0.1.16 → 0.1.18

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 (196) hide show
  1. package/es/actions/api/fetch-skills.d.ts +3 -3
  2. package/es/actions/api/fetch-skills.js +7 -2
  3. package/es/actions/api/fetch-slide.d.ts +1 -1
  4. package/es/actions/api/fetch-slide.js +3 -1
  5. package/es/actions/api/post-answer.d.ts +14 -0
  6. package/es/actions/api/post-answer.js +25 -0
  7. package/es/actions/api/post-progression.d.ts +3 -3
  8. package/es/actions/api/post-progression.js +5 -2
  9. package/es/actions/api/test/fetch-skills.test.js +7 -4
  10. package/es/actions/api/test/fetch-slide.test.js +7 -4
  11. package/es/actions/api/test/post-answer.test.d.ts +1 -0
  12. package/es/actions/api/test/post-answer.test.js +82 -0
  13. package/es/actions/api/test/post-progression.test.js +7 -4
  14. package/es/actions/data/test/token.test.d.ts +1 -0
  15. package/es/actions/data/test/token.test.js +25 -0
  16. package/es/actions/index.d.ts +1 -8
  17. package/es/actions/{api/test → test}/create-test-store.d.ts +2 -2
  18. package/es/actions/{api/test → test}/create-test-store.js +1 -1
  19. package/es/actions/ui/answers.d.ts +17 -3
  20. package/es/actions/ui/answers.js +41 -3
  21. package/es/actions/ui/slides.d.ts +0 -5
  22. package/es/actions/ui/slides.js +0 -4
  23. package/es/actions/ui/test/answers.test.d.ts +1 -0
  24. package/es/actions/ui/test/answers.test.js +100 -0
  25. package/es/actions/ui/test/slides.test.d.ts +1 -0
  26. package/es/actions/ui/test/slides.test.js +26 -0
  27. package/es/common/index.d.ts +0 -3
  28. package/es/common/index.js +0 -4
  29. package/es/index.js +1 -3
  30. package/es/reducers/data/index.d.ts +1 -1
  31. package/es/reducers/data/progression.d.ts +3 -3
  32. package/es/reducers/data/progression.js +2 -5
  33. package/es/reducers/data/slides.d.ts +2 -3
  34. package/es/reducers/data/test/progression.test.js +12 -27
  35. package/es/reducers/index.d.ts +2 -1
  36. package/es/reducers/ui/answers.d.ts +2 -2
  37. package/es/reducers/ui/answers.js +4 -8
  38. package/es/reducers/ui/index.d.ts +4 -1
  39. package/es/reducers/ui/index.js +3 -1
  40. package/es/reducers/ui/slide.d.ts +8 -0
  41. package/es/reducers/ui/slide.js +26 -0
  42. package/es/reducers/ui/test/answers.test.js +23 -3
  43. package/es/reducers/ui/test/current-slide-ref.test.js +1 -1
  44. package/es/reducers/ui/test/navigation.test.js +5 -5
  45. package/es/reducers/ui/test/slide.test.d.ts +1 -0
  46. package/es/reducers/ui/test/slide.test.js +12 -0
  47. package/es/test/util/services.mock.d.ts +3 -1
  48. package/es/test/util/services.mock.js +89 -72
  49. package/es/types/common.d.ts +0 -25
  50. package/es/views/skills/index.d.ts +1 -1
  51. package/es/views/skills/index.js +0 -3
  52. package/es/views/skills/test/skills.test.d.ts +1 -0
  53. package/es/views/skills/test/skills.test.js +94 -0
  54. package/es/views/slides/index.d.ts +13 -2
  55. package/es/views/slides/index.js +19 -15
  56. package/es/views/slides/map-api-slide-to-ui.js +65 -68
  57. package/es/views/slides/test/fixtures/free-text.d.ts +2 -1
  58. package/es/views/slides/test/fixtures/qcm-drag.d.ts +2 -1
  59. package/es/views/slides/test/fixtures/qcm-graphic.d.ts +2 -1
  60. package/es/views/slides/test/fixtures/qcm.d.ts +2 -1
  61. package/es/views/slides/test/fixtures/slider.d.ts +2 -1
  62. package/es/views/slides/test/fixtures/template.d.ts +4 -0
  63. package/{lib/views/slides/test/fixtures/select-template.js → es/views/slides/test/fixtures/template.js} +82 -4
  64. package/es/views/slides/test/index.test.d.ts +1 -0
  65. package/es/views/slides/test/index.test.js +473 -0
  66. package/es/views/slides/test/map-api-slide-to-ui.test.js +4 -10
  67. package/es/views/slides/test/slide.template.on-change.test.d.ts +1 -0
  68. package/es/views/slides/test/slide.template.on-change.test.js +79 -0
  69. package/lib/actions/api/fetch-skills.d.ts +3 -3
  70. package/lib/actions/api/fetch-skills.js +22 -19
  71. package/lib/actions/api/fetch-slide.d.ts +1 -1
  72. package/lib/actions/api/fetch-slide.js +3 -1
  73. package/lib/actions/api/post-answer.d.ts +14 -0
  74. package/lib/actions/api/post-answer.js +75 -0
  75. package/lib/actions/api/post-progression.d.ts +3 -3
  76. package/lib/actions/api/post-progression.js +6 -3
  77. package/lib/actions/api/test/fetch-skills.test.js +7 -4
  78. package/lib/actions/api/test/fetch-slide.test.js +7 -4
  79. package/lib/actions/api/test/post-answer.test.d.ts +1 -0
  80. package/lib/actions/api/test/post-answer.test.js +145 -0
  81. package/lib/actions/api/test/post-progression.test.js +7 -4
  82. package/lib/actions/data/test/token.test.d.ts +1 -0
  83. package/lib/actions/data/test/token.test.js +70 -0
  84. package/lib/actions/index.d.ts +1 -8
  85. package/lib/actions/{api/test → test}/create-test-store.d.ts +2 -2
  86. package/lib/actions/{api/test → test}/create-test-store.js +1 -1
  87. package/lib/actions/ui/answers.d.ts +17 -3
  88. package/lib/actions/ui/answers.js +50 -3
  89. package/lib/actions/ui/slides.d.ts +0 -5
  90. package/lib/actions/ui/slides.js +0 -4
  91. package/lib/actions/ui/test/answers.test.d.ts +1 -0
  92. package/lib/actions/ui/test/answers.test.js +190 -0
  93. package/lib/actions/ui/test/slides.test.d.ts +1 -0
  94. package/lib/actions/ui/test/slides.test.js +71 -0
  95. package/lib/common/index.d.ts +0 -3
  96. package/lib/common/index.js +0 -4
  97. package/lib/index.js +1 -3
  98. package/lib/reducers/data/index.d.ts +1 -1
  99. package/lib/reducers/data/progression.d.ts +3 -3
  100. package/lib/reducers/data/progression.js +2 -5
  101. package/lib/reducers/data/slides.d.ts +2 -3
  102. package/lib/reducers/data/test/progression.test.js +12 -27
  103. package/lib/reducers/index.d.ts +2 -1
  104. package/lib/reducers/ui/answers.d.ts +2 -2
  105. package/lib/reducers/ui/answers.js +4 -8
  106. package/lib/reducers/ui/index.d.ts +4 -1
  107. package/lib/reducers/ui/index.js +3 -1
  108. package/lib/reducers/ui/slide.d.ts +8 -0
  109. package/lib/reducers/ui/slide.js +27 -0
  110. package/lib/reducers/ui/test/answers.test.js +23 -3
  111. package/lib/reducers/ui/test/current-slide-ref.test.js +1 -1
  112. package/lib/reducers/ui/test/navigation.test.js +5 -5
  113. package/lib/reducers/ui/test/slide.test.d.ts +1 -0
  114. package/lib/reducers/ui/test/slide.test.js +12 -0
  115. package/lib/test/util/services.mock.d.ts +3 -1
  116. package/lib/test/util/services.mock.js +89 -72
  117. package/lib/types/common.d.ts +0 -25
  118. package/lib/views/skills/index.d.ts +1 -1
  119. package/lib/views/skills/index.js +0 -3
  120. package/lib/views/skills/test/skills.test.d.ts +1 -0
  121. package/lib/views/skills/test/skills.test.js +94 -0
  122. package/lib/views/slides/index.d.ts +13 -2
  123. package/lib/views/slides/index.js +19 -15
  124. package/lib/views/slides/map-api-slide-to-ui.js +106 -99
  125. package/lib/views/slides/test/fixtures/free-text.d.ts +2 -1
  126. package/lib/views/slides/test/fixtures/qcm-drag.d.ts +2 -1
  127. package/lib/views/slides/test/fixtures/qcm-graphic.d.ts +2 -1
  128. package/lib/views/slides/test/fixtures/qcm.d.ts +2 -1
  129. package/lib/views/slides/test/fixtures/slider.d.ts +2 -1
  130. package/lib/views/slides/test/fixtures/template.d.ts +4 -0
  131. package/{es/views/slides/test/fixtures/select-template.js → lib/views/slides/test/fixtures/template.js} +82 -4
  132. package/lib/views/slides/test/index.test.d.ts +1 -0
  133. package/lib/views/slides/test/index.test.js +473 -0
  134. package/lib/views/slides/test/map-api-slide-to-ui.test.js +4 -10
  135. package/lib/views/slides/test/slide.template.on-change.test.d.ts +1 -0
  136. package/lib/views/slides/test/slide.template.on-change.test.js +82 -0
  137. package/package.json +6 -5
  138. package/src/actions/api/fetch-skills.ts +18 -11
  139. package/src/actions/api/fetch-slide.ts +3 -1
  140. package/src/actions/api/post-answer.ts +44 -0
  141. package/src/actions/api/post-progression.ts +7 -4
  142. package/src/actions/api/test/fetch-skills.test.ts +9 -6
  143. package/src/actions/api/test/fetch-slide.test.ts +9 -6
  144. package/src/actions/api/test/post-answer.test.ts +101 -0
  145. package/src/actions/api/test/post-progression.test.ts +9 -6
  146. package/src/actions/data/test/token.test.ts +29 -0
  147. package/src/actions/index.ts +1 -17
  148. package/src/actions/{api/test → test}/create-test-store.ts +2 -2
  149. package/src/actions/ui/answers.ts +55 -6
  150. package/src/actions/ui/slides.ts +1 -8
  151. package/src/actions/ui/test/answers.test.ts +115 -0
  152. package/src/actions/ui/test/slides.test.ts +30 -0
  153. package/src/common/index.ts +0 -7
  154. package/src/index.tsx +1 -3
  155. package/src/reducers/data/progression.ts +4 -7
  156. package/src/reducers/data/slides.ts +2 -3
  157. package/src/reducers/data/test/progression.test.ts +15 -31
  158. package/src/reducers/ui/answers.ts +5 -9
  159. package/src/reducers/ui/index.ts +4 -1
  160. package/src/reducers/ui/slide.ts +43 -0
  161. package/src/reducers/ui/test/answers.test.ts +29 -4
  162. package/src/reducers/ui/test/current-slide-ref.test.ts +1 -1
  163. package/src/reducers/ui/test/navigation.test.ts +5 -5
  164. package/src/reducers/ui/test/slide.test.ts +15 -0
  165. package/src/test/util/services.mock.ts +94 -73
  166. package/src/types/common.ts +0 -30
  167. package/src/views/skills/index.ts +1 -5
  168. package/src/views/skills/test/skills.test.ts +101 -0
  169. package/src/views/slides/index.ts +38 -23
  170. package/src/views/slides/map-api-slide-to-ui.ts +146 -113
  171. package/src/views/slides/test/fixtures/free-text.ts +2 -1
  172. package/src/views/slides/test/fixtures/qcm-drag.ts +2 -1
  173. package/src/views/slides/test/fixtures/qcm-graphic.ts +2 -1
  174. package/src/views/slides/test/fixtures/qcm.ts +2 -1
  175. package/src/views/slides/test/fixtures/slider.ts +2 -1
  176. package/src/views/slides/test/fixtures/{select-template.ts → template.ts} +84 -5
  177. package/src/views/slides/test/index.test.ts +493 -0
  178. package/src/views/slides/test/map-api-slide-to-ui.test.ts +6 -11
  179. package/src/views/slides/test/slide.template.on-change.test.ts +92 -0
  180. package/es/fixtures/qcm-slide.d.ts +0 -2
  181. package/es/fixtures/qcm-slide.js +0 -33
  182. package/es/fixtures/temp-fixture.d.ts +0 -3
  183. package/es/fixtures/temp-fixture.js +0 -84
  184. package/es/views/slides/test/fixtures/select-template.d.ts +0 -3
  185. package/es/views/slides/test/fixtures/text-template.d.ts +0 -3
  186. package/es/views/slides/test/fixtures/text-template.js +0 -58
  187. package/lib/fixtures/qcm-slide.d.ts +0 -2
  188. package/lib/fixtures/qcm-slide.js +0 -33
  189. package/lib/fixtures/temp-fixture.d.ts +0 -3
  190. package/lib/fixtures/temp-fixture.js +0 -84
  191. package/lib/views/slides/test/fixtures/select-template.d.ts +0 -3
  192. package/lib/views/slides/test/fixtures/text-template.d.ts +0 -3
  193. package/lib/views/slides/test/fixtures/text-template.js +0 -58
  194. package/src/fixtures/qcm-slide.ts +0 -35
  195. package/src/fixtures/temp-fixture.ts +0 -94
  196. package/src/views/slides/test/fixtures/text-template.ts +0 -61
@@ -1,75 +1,77 @@
1
- import { concat, divide, get, getOr, head, includes, indexOf, isEmpty, map, rangeStep, size, toInteger } from 'lodash/fp';
1
+ import { concat, constant, divide, get, getOr, head, includes, indexOf, isEmpty, isNil, map, multiply, pipe, rangeStep, round, set, size, times, toInteger, toString as _toString, __ } from 'lodash/fp';
2
2
  import { editAnswer } from '../../actions/ui/answers';
3
- var qcmProps = function (question) {
4
- // TODO: EDIT_CHOICES -> getAnswerValues
5
- var answers = [];
6
- return {
7
- type: 'qcm',
8
- answers: map(function (choice) { return ({
9
- title: choice.label,
10
- selected: includes(choice.label, answers),
11
- // TODO: EDIT_CHOICES
12
- // eslint-disable-next-line no-console
13
- onClick: function () { return console.log('TODO: on choice click'); },
14
- ariaLabel: choice.label
15
- }); },
16
- // TODO: EDIT_CHOICES -> getChoices
17
- question.content.choices)
3
+ var qcmProps = function (dispatch) {
4
+ return function (answers, question) {
5
+ return {
6
+ type: 'qcm',
7
+ answers: map(function (choice) {
8
+ var label = choice.label || '';
9
+ return {
10
+ title: label,
11
+ selected: includes(label, answers),
12
+ onClick: function () {
13
+ dispatch(editAnswer([label]));
14
+ },
15
+ ariaLabel: choice.label
16
+ };
17
+ }, question.content.choices)
18
+ };
18
19
  };
19
20
  };
20
- var qcmDragProps = function (question) {
21
- // TODO: EDIT_CHOICES -> getAnswerValues
22
- var answers = [];
23
- return {
24
- type: 'qcmDrag',
25
- answers: map(function (choice) {
26
- var indexInAnswer = indexOf(choice.label, answers);
27
- return {
28
- title: choice.label,
29
- selected: includes(choice.label, answers),
30
- order: indexInAnswer,
31
- // TODO: EDIT_CHOICES
32
- // eslint-disable-next-line no-console
33
- onClick: function () { return console.log('TODO: on choice click'); }
34
- };
35
- // TODO: EDIT_CHOICES -> getChoices
36
- }, question.content.choices)
21
+ var qcmDragProps = function (dispatch) {
22
+ return function (answers, question) {
23
+ return {
24
+ type: 'qcmDrag',
25
+ answers: map(function (choice) {
26
+ var label = choice.label || '';
27
+ var indexInAnswer = indexOf(label, answers);
28
+ return {
29
+ title: label,
30
+ selected: includes(label, answers),
31
+ order: indexInAnswer,
32
+ onClick: function () {
33
+ dispatch(editAnswer([label]));
34
+ }
35
+ };
36
+ }, question.content.choices)
37
+ };
37
38
  };
38
39
  };
39
- var qcmGraphicProps = function (question) {
40
- // mock the answers
41
- // TODO: EDIT_CHOICES -> getAnswerValues
42
- var answers = [];
43
- return {
44
- type: 'qcmGraphic',
45
- answers: map(function (choice) { return ({
46
- title: choice.label,
47
- image: get('media.src.0.url', choice),
48
- selected: includes(choice.label, answers),
49
- // TODO: EDIT_CHOICES
50
- // eslint-disable-next-line no-console
51
- onClick: function () { return console.log('TODO: on choice click'); }
52
- }); },
53
- // TODO: EDIT_CHOICES -> getChoices
54
- question.content.choices)
40
+ var qcmGraphicProps = function (dispatch) {
41
+ return function (answers, question) {
42
+ return {
43
+ type: 'qcmGraphic',
44
+ answers: map(function (choice) {
45
+ var label = choice.label || '';
46
+ return {
47
+ title: label,
48
+ image: get('media.src.0.url', choice),
49
+ selected: includes(label, answers),
50
+ onClick: function () {
51
+ dispatch(editAnswer([label]));
52
+ }
53
+ };
54
+ }, question.content.choices)
55
+ };
55
56
  };
56
57
  };
57
- var templateTextProps = function (choice, index) {
58
- // TODO: EDIT_CHOICES -> getAnswerValues
59
- var answers = [];
58
+ var updateTemplateAnswer = function (text, _answers, index, max) {
59
+ var answers = isEmpty(_answers) ? times(constant(undefined), max) : _answers;
60
+ return map(function (a) { return (isNil(a) ? '' : a); }, set(index, text, answers));
61
+ };
62
+ var templateTextProps = function (dispatch, answers, choice, index, maxLength) {
60
63
  return {
61
64
  type: 'text',
62
65
  name: getOr('', 'name', choice),
63
66
  placeholder: 'Type here',
64
67
  value: get(index, answers),
65
- // TODO: EDIT_CHOICES
66
- // eslint-disable-next-line no-console
67
- onChange: function () { return console.log('TODO: on choice change'); }
68
+ onChange: function (text) {
69
+ var newAnswers = updateTemplateAnswer(text, answers, index, maxLength);
70
+ dispatch(editAnswer(newAnswers));
71
+ }
68
72
  };
69
73
  };
70
- var templateSelectProps = function (choice, index) {
71
- // TODO: EDIT_CHOICES -> getAnswerValues
72
- var answers = [];
74
+ var templateSelectProps = function (dispatch, answers, choice, index, maxLength) {
73
75
  var answer = get(index, answers);
74
76
  var temporaryOption = {
75
77
  name: 'Select an answer',
@@ -89,21 +91,26 @@ var templateSelectProps = function (choice, index) {
89
91
  return {
90
92
  type: 'select',
91
93
  name: getOr('', 'name', choice),
92
- // TODO: EDIT_CHOICES
93
- // eslint-disable-next-line no-console
94
- onChange: function () { return console.log('TODO: on choice change'); },
94
+ onChange: function (text) {
95
+ var newAnswers = updateTemplateAnswer(text, answers, index, maxLength);
96
+ dispatch(editAnswer(newAnswers));
97
+ },
95
98
  options: isEmpty(answer) ? concat([temporaryOption], selectOptions) : selectOptions
96
99
  };
97
100
  };
98
- var templateProps = function (question) {
99
- // TODO: EDIT_CHOICES -> getChoices
100
- var choices = question.content.choices;
101
- return {
102
- type: 'template',
103
- template: get('content.template', question),
104
- answers: choices.map(function (choice, index) {
105
- return choice.type === 'text' ? templateTextProps(choice, index) : templateSelectProps(choice, index);
106
- })
101
+ var templateProps = function (dispatch) {
102
+ return function (answers, question) {
103
+ var choices = question.content.choices;
104
+ var maxLength = size(choices);
105
+ return {
106
+ type: 'template',
107
+ template: get('content.template', question),
108
+ answers: choices.map(function (choice, index) {
109
+ return choice.type === 'text'
110
+ ? templateTextProps(dispatch, answers, choice, index, maxLength)
111
+ : templateSelectProps(dispatch, answers, choice, index, maxLength);
112
+ })
113
+ };
107
114
  };
108
115
  };
109
116
  var basicProps = function (dispatch) {
@@ -113,34 +120,34 @@ var basicProps = function (dispatch) {
113
120
  placeholder: question.content.placeholder || '',
114
121
  value: answers[0] || '',
115
122
  onChange: function (text) {
116
- // eslint-disable-next-line no-console
117
- console.log(text);
118
- dispatch(editAnswer(text));
123
+ dispatch(editAnswer([text]));
119
124
  }
120
125
  };
121
126
  };
122
127
  };
123
- var sliderProps = function (question) {
124
- var values = rangeStep(getOr(1, 'content.step', question), get('content.min', question), get('content.max', question) + 1
125
- // Lodash doesn't infer the type very well here
126
- );
127
- // TODO: EDIT_CHOICES -> getAnswerValues
128
- var answers = [];
129
- var stateValue = head(answers) || question.content.min;
130
- var currentValue = toInteger(stateValue);
131
- var indexValue = indexOf(currentValue, values);
132
- var sliderPosition = divide(indexValue, size(values) - 1);
133
- var unitLabel = get('content.unitLabel', question);
134
- return {
135
- type: 'slider',
136
- placeholder: question.explanation,
137
- minLabel: "".concat(question.content.min, " ").concat(unitLabel),
138
- maxLabel: "".concat(question.content.max, " ").concat(unitLabel),
139
- title: "".concat(currentValue, " ").concat(question.content.unitLabel),
140
- value: sliderPosition,
141
- // TODO: EDIT_CHOICES
142
- // eslint-disable-next-line no-console
143
- onChange: function () { return console.log('TODO: on choice change'); }
128
+ var sliderProps = function (dispatch) {
129
+ return function (answers, question) {
130
+ var values = rangeStep(getOr(1, 'content.step', question), get('content.min', question), get('content.max', question) + 1
131
+ // Lodash doesn't infer the type very well here
132
+ );
133
+ var stateValue = head(answers) || question.content.min;
134
+ var currentValue = toInteger(stateValue);
135
+ var indexValue = indexOf(currentValue, values);
136
+ var maxValue = size(values) - 1;
137
+ var sliderPosition = divide(indexValue, maxValue);
138
+ var unitLabel = get('content.unitLabel', question);
139
+ return {
140
+ type: 'slider',
141
+ placeholder: question.explanation,
142
+ minLabel: "".concat(question.content.min, " ").concat(unitLabel),
143
+ maxLabel: "".concat(question.content.max, " ").concat(unitLabel),
144
+ title: "".concat(currentValue, " ").concat(question.content.unitLabel),
145
+ value: sliderPosition,
146
+ onChange: function (position) {
147
+ var newValue = pipe(multiply(maxValue), round, get(__, values), _toString)(position);
148
+ dispatch(editAnswer([newValue]));
149
+ }
150
+ };
144
151
  };
145
152
  };
146
153
  export var getQuestionType = function (question) { return question.type; };
@@ -149,17 +156,17 @@ var getAnswerUIModel = function (question, answers, dispatch) {
149
156
  var type = getQuestionType(question);
150
157
  switch (type) {
151
158
  case 'qcm':
152
- return qcmProps(question);
159
+ return qcmProps(dispatch)(answers, question);
153
160
  case 'qcmGraphic':
154
- return qcmGraphicProps(question);
161
+ return qcmGraphicProps(dispatch)(answers, question);
155
162
  case 'qcmDrag':
156
- return qcmDragProps(question);
163
+ return qcmDragProps(dispatch)(answers, question);
157
164
  case 'basic':
158
165
  return basicProps(dispatch)(answers, question);
159
166
  case 'template':
160
- return templateProps(question);
167
+ return templateProps(dispatch)(answers, question);
161
168
  case 'slider':
162
- return sliderProps(question);
169
+ return sliderProps(dispatch)(answers, question);
163
170
  default:
164
171
  throw new Error("".concat(type, " is not an handled question.type"));
165
172
  }
@@ -1,3 +1,4 @@
1
- import { SlideFromAPI, UISlide } from '../../../../types/common';
1
+ import { UISlide } from '../..';
2
+ import { SlideFromAPI } from '../../../../types/common';
2
3
  export declare const freeTextSlide: SlideFromAPI;
3
4
  export declare const freeTextUISlide: Partial<UISlide>;
@@ -1,3 +1,4 @@
1
- import { SlideFromAPI, UISlide } from '../../../../types/common';
1
+ import { UISlide } from '../..';
2
+ import { SlideFromAPI } from '../../../../types/common';
2
3
  export declare const qcmDragSlide: SlideFromAPI;
3
4
  export declare const qcmDragUISlide: Partial<UISlide>;
@@ -1,3 +1,4 @@
1
- import { SlideFromAPI, UISlide } from '../../../../types/common';
1
+ import { UISlide } from '../..';
2
+ import { SlideFromAPI } from '../../../../types/common';
2
3
  export declare const qcmGraphicSlide: SlideFromAPI;
3
4
  export declare const qcmGraphicUISlide: Partial<UISlide>;
@@ -1,3 +1,4 @@
1
- import { SlideFromAPI, UISlide } from '../../../../types/common';
1
+ import { UISlide } from '../..';
2
+ import { SlideFromAPI } from '../../../../types/common';
2
3
  export declare const qcmSlide: SlideFromAPI;
3
4
  export declare const qcmUISlide: Partial<UISlide>;
@@ -1,3 +1,4 @@
1
- import { SlideFromAPI, UISlide } from '../../../../types/common';
1
+ import { UISlide } from '../..';
2
+ import { SlideFromAPI } from '../../../../types/common';
2
3
  export declare const sliderSlide: SlideFromAPI;
3
4
  export declare const sliderUISlide: Partial<UISlide>;
@@ -0,0 +1,4 @@
1
+ import { UISlide } from '../..';
2
+ import { SlideFromAPI } from '../../../../types/common';
3
+ export declare const templateSlide: SlideFromAPI;
4
+ export declare const templateUISlide: Partial<UISlide>;
@@ -1,8 +1,8 @@
1
1
  import noop from 'lodash/fp/noop';
2
- export const selectTemplateSlide = {
2
+ export var templateSlide = {
3
3
  question: {
4
4
  content: {
5
- template: 'La vue {{sel80495}} présente la liste des utilisateurs ayant le plus grand nombre d’étoiles cumulées.',
5
+ template: 'La vue {{sel80495}} présente la liste des {{inp58402}} ayant le plus grand nombre d’{{sel80496}} cumulées.',
6
6
  choices: [
7
7
  {
8
8
  items: [
@@ -30,6 +30,45 @@ export const selectTemplateSlide = {
30
30
  _id: '5b57464e3b594d002e8829f3',
31
31
  name: 'sel80495',
32
32
  type: 'select'
33
+ },
34
+ {
35
+ media: {
36
+ src: [],
37
+ posters: [],
38
+ subtitles: []
39
+ },
40
+ items: [],
41
+ _id: '62433c2c58920f02c4950de0',
42
+ type: 'text',
43
+ name: 'inp58402',
44
+ id: '62433c2c58920f02c4950de0'
45
+ },
46
+ {
47
+ items: [
48
+ {
49
+ _id: '5b57464e3b594d002e8829f7',
50
+ value: 'sli_N13-hG3kX.choice_NJgC3aznJm',
51
+ text: 'étoiles'
52
+ },
53
+ {
54
+ _id: '5b57464e3b594d002e8829f6',
55
+ value: 'sli_N13-hG3kX.choice_EJZ02aMny7',
56
+ text: 'idées'
57
+ },
58
+ {
59
+ _id: '5b57464e3b594d002e8829f5',
60
+ value: 'sli_N13-hG3kX.choice_4keCaf21Q',
61
+ text: 'envies'
62
+ },
63
+ {
64
+ _id: '5b57464e3b594d002e8829f4',
65
+ value: 'sli_N13-hG3kX.choice_NkbJAMn17',
66
+ text: 'images'
67
+ }
68
+ ],
69
+ _id: '5b57464e3b594d002e8829f3',
70
+ name: 'sel80496',
71
+ type: 'select'
33
72
  }
34
73
  ]
35
74
  },
@@ -46,13 +85,13 @@ export const selectTemplateSlide = {
46
85
  type: 'course'
47
86
  }
48
87
  };
49
- export const selectTemplateUISlide = {
88
+ export var templateUISlide = {
50
89
  questionText: 'Complétez la phrase ci-dessous.',
51
90
  answerUI: {
52
91
  help: 'Saisissez votre réponse ou sélectionnez la bonne réponse dans le(s) menu(s) déroulant(s).',
53
92
  model: {
54
93
  type: 'template',
55
- template: 'La vue {{sel80495}} présente la liste des utilisateurs ayant le plus grand nombre d’étoiles cumulées.',
94
+ template: 'La vue {{sel80495}} présente la liste des {{inp58402}} ayant le plus grand nombre d’{{sel80496}} cumulées.',
56
95
  answers: [
57
96
  {
58
97
  type: 'select',
@@ -85,6 +124,45 @@ export const selectTemplateUISlide = {
85
124
  selected: false
86
125
  }
87
126
  ]
127
+ },
128
+ {
129
+ type: 'text',
130
+ name: 'inp58402',
131
+ placeholder: 'Type here',
132
+ value: undefined,
133
+ onChange: noop
134
+ },
135
+ {
136
+ type: 'select',
137
+ name: 'sel80496',
138
+ onChange: noop,
139
+ options: [
140
+ { name: 'Select an answer', value: '', validOption: false, selected: true },
141
+ {
142
+ name: 'étoiles',
143
+ value: 'étoiles',
144
+ validOption: true,
145
+ selected: false
146
+ },
147
+ {
148
+ name: 'idées',
149
+ value: 'idées',
150
+ validOption: true,
151
+ selected: false
152
+ },
153
+ {
154
+ name: 'envies',
155
+ value: 'envies',
156
+ validOption: true,
157
+ selected: false
158
+ },
159
+ {
160
+ name: 'images',
161
+ value: 'images',
162
+ validOption: true,
163
+ selected: false
164
+ }
165
+ ]
88
166
  }
89
167
  ]
90
168
  }
@@ -0,0 +1 @@
1
+ export {};