@coorpacademy/app-review 0.1.15 → 0.1.17

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 (289) hide show
  1. package/es/actions/api/fetch-skills.d.ts +5 -7
  2. package/es/actions/api/fetch-skills.js +12 -4
  3. package/es/actions/api/fetch-slide.d.ts +14 -7
  4. package/es/actions/api/fetch-slide.js +23 -18
  5. package/es/actions/api/post-answer.d.ts +10 -0
  6. package/es/actions/api/post-answer.js +25 -0
  7. package/es/actions/api/post-progression.d.ts +5 -7
  8. package/es/actions/api/post-progression.js +16 -8
  9. package/es/actions/api/test/fetch-skills.test.js +57 -0
  10. package/es/actions/api/test/fetch-slide.test.js +64 -0
  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.d.ts +1 -0
  14. package/es/actions/api/test/post-progression.test.js +105 -0
  15. package/es/actions/data/test/token.test.d.ts +1 -0
  16. package/es/actions/data/test/token.test.js +25 -0
  17. package/es/actions/index.d.ts +1 -8
  18. package/es/actions/test/create-test-store.d.ts +5 -0
  19. package/es/actions/test/create-test-store.js +16 -0
  20. package/es/actions/ui/answers.d.ts +21 -0
  21. package/es/actions/ui/answers.js +43 -0
  22. package/es/actions/ui/slides.d.ts +0 -5
  23. package/es/actions/ui/slides.js +0 -4
  24. package/es/actions/ui/test/answers.test.d.ts +1 -0
  25. package/es/actions/ui/test/answers.test.js +90 -0
  26. package/es/actions/ui/test/slides.test.d.ts +1 -0
  27. package/es/actions/ui/test/slides.test.js +26 -0
  28. package/es/common/index.d.ts +0 -3
  29. package/es/common/index.js +0 -4
  30. package/es/index.js +11 -19
  31. package/es/reducers/data/index.d.ts +2 -2
  32. package/es/reducers/data/progression.d.ts +2 -3
  33. package/es/reducers/data/progression.js +0 -5
  34. package/es/reducers/data/slides.d.ts +3 -4
  35. package/es/reducers/data/slides.js +5 -1
  36. package/es/reducers/data/test/progression.test.d.ts +1 -0
  37. package/es/reducers/data/test/progression.test.js +38 -0
  38. package/es/reducers/data/test/skills.test.d.ts +1 -0
  39. package/es/reducers/data/test/skills.test.js +12 -0
  40. package/es/reducers/data/test/slides.test.d.ts +1 -0
  41. package/es/reducers/data/test/slides.test.js +20 -0
  42. package/es/reducers/data/test/token.test.d.ts +1 -0
  43. package/es/reducers/data/test/token.test.js +11 -0
  44. package/es/reducers/index.d.ts +3 -2
  45. package/es/reducers/ui/answers.d.ts +4 -0
  46. package/es/reducers/ui/answers.js +9 -0
  47. package/es/reducers/ui/index.d.ts +7 -4
  48. package/es/reducers/ui/index.js +4 -2
  49. package/es/reducers/ui/slide.d.ts +8 -0
  50. package/es/reducers/ui/slide.js +26 -0
  51. package/es/reducers/ui/test/answers.test.d.ts +1 -0
  52. package/es/reducers/ui/test/answers.test.js +27 -0
  53. package/es/reducers/ui/test/current-slide-ref.test.d.ts +1 -0
  54. package/es/reducers/ui/test/current-slide-ref.test.js +12 -0
  55. package/es/reducers/ui/test/navigation.test.d.ts +1 -0
  56. package/es/reducers/ui/test/navigation.test.js +15 -0
  57. package/es/reducers/ui/test/slide.test.d.ts +1 -0
  58. package/es/reducers/ui/test/slide.test.js +12 -0
  59. package/es/services/fetch-slide.js +1 -1
  60. package/es/services/index.js +3 -1
  61. package/es/services/post-answer.d.ts +2 -0
  62. package/es/services/post-answer.js +18 -0
  63. package/es/services/test/fetch-slide.test.d.ts +1 -0
  64. package/es/services/test/fetch-slide.test.js +22 -0
  65. package/es/services/test/post-answer.test.d.ts +1 -0
  66. package/es/services/test/post-answer.test.js +57 -0
  67. package/es/services/test/post-progression.test.js +9 -1
  68. package/es/test/util/services.mock.d.ts +2 -1
  69. package/es/test/util/services.mock.js +88 -44
  70. package/es/types/common.d.ts +22 -33
  71. package/es/views/skills/index.d.ts +1 -1
  72. package/es/views/skills/index.js +0 -3
  73. package/es/views/skills/test/skills.test.d.ts +1 -0
  74. package/es/views/skills/test/skills.test.js +94 -0
  75. package/es/views/slides/index.d.ts +89 -2
  76. package/es/views/slides/index.js +80 -10
  77. package/es/views/slides/map-api-slide-to-ui.d.ts +8 -0
  78. package/es/views/slides/map-api-slide-to-ui.js +165 -0
  79. package/es/{helpers → views/slides}/test/fixtures/free-text.d.ts +2 -1
  80. package/es/views/slides/test/fixtures/free-text.js +38 -0
  81. package/es/{helpers → views/slides}/test/fixtures/qcm-drag.d.ts +2 -1
  82. package/es/views/slides/test/fixtures/qcm-drag.js +108 -0
  83. package/es/{helpers → views/slides}/test/fixtures/qcm-graphic.d.ts +2 -1
  84. package/es/views/slides/test/fixtures/qcm-graphic.js +88 -0
  85. package/es/{helpers → views/slides}/test/fixtures/qcm.d.ts +2 -1
  86. package/es/{helpers → views/slides}/test/fixtures/qcm.js +5 -1
  87. package/es/{helpers → views/slides}/test/fixtures/select-template.d.ts +2 -1
  88. package/es/views/slides/test/fixtures/select-template.js +92 -0
  89. package/es/{helpers → views/slides}/test/fixtures/slider.d.ts +2 -1
  90. package/es/views/slides/test/fixtures/slider.js +36 -0
  91. package/es/{helpers → views/slides}/test/fixtures/text-template.d.ts +2 -1
  92. package/es/{helpers → views/slides}/test/fixtures/text-template.js +5 -1
  93. package/es/views/slides/test/index.test.d.ts +1 -0
  94. package/es/views/slides/test/index.test.js +234 -0
  95. package/es/views/slides/test/map-api-slide-to-ui.test.d.ts +1 -0
  96. package/es/{helpers → views/slides}/test/map-api-slide-to-ui.test.js +19 -9
  97. package/lib/actions/api/fetch-skills.d.ts +5 -7
  98. package/lib/actions/api/fetch-skills.js +58 -7
  99. package/lib/actions/api/fetch-slide.d.ts +14 -7
  100. package/lib/actions/api/fetch-slide.js +72 -20
  101. package/lib/actions/api/post-answer.d.ts +10 -0
  102. package/lib/actions/api/post-answer.js +75 -0
  103. package/lib/actions/api/post-progression.d.ts +5 -7
  104. package/lib/actions/api/post-progression.js +67 -10
  105. package/lib/actions/api/test/fetch-skills.test.d.ts +1 -0
  106. package/lib/actions/api/test/fetch-skills.test.js +116 -0
  107. package/lib/actions/api/test/fetch-slide.test.d.ts +1 -0
  108. package/lib/actions/api/test/fetch-slide.test.js +123 -0
  109. package/lib/actions/api/test/post-answer.test.d.ts +1 -0
  110. package/lib/actions/api/test/post-answer.test.js +145 -0
  111. package/lib/actions/api/test/post-progression.test.d.ts +1 -0
  112. package/lib/actions/api/test/post-progression.test.js +163 -0
  113. package/lib/actions/data/test/token.test.d.ts +1 -0
  114. package/lib/actions/data/test/token.test.js +70 -0
  115. package/lib/actions/index.d.ts +1 -8
  116. package/lib/actions/test/create-test-store.d.ts +5 -0
  117. package/lib/actions/test/create-test-store.js +18 -0
  118. package/lib/actions/ui/answers.d.ts +21 -0
  119. package/lib/actions/ui/answers.js +54 -0
  120. package/lib/actions/ui/slides.d.ts +0 -5
  121. package/lib/actions/ui/slides.js +0 -4
  122. package/lib/actions/ui/test/answers.test.d.ts +1 -0
  123. package/lib/actions/ui/test/answers.test.js +171 -0
  124. package/lib/actions/ui/test/slides.test.d.ts +1 -0
  125. package/lib/actions/ui/test/slides.test.js +71 -0
  126. package/lib/common/index.d.ts +0 -3
  127. package/lib/common/index.js +0 -4
  128. package/lib/index.js +22 -21
  129. package/lib/reducers/data/index.d.ts +2 -2
  130. package/lib/reducers/data/progression.d.ts +2 -3
  131. package/lib/reducers/data/progression.js +0 -5
  132. package/lib/reducers/data/slides.d.ts +3 -4
  133. package/lib/reducers/data/slides.js +5 -1
  134. package/lib/reducers/data/test/progression.test.d.ts +1 -0
  135. package/lib/reducers/data/test/progression.test.js +38 -0
  136. package/lib/reducers/data/test/skills.test.d.ts +1 -0
  137. package/lib/reducers/data/test/skills.test.js +12 -0
  138. package/lib/reducers/data/test/slides.test.d.ts +1 -0
  139. package/lib/reducers/data/test/slides.test.js +20 -0
  140. package/lib/reducers/data/test/token.test.d.ts +1 -0
  141. package/lib/reducers/data/test/token.test.js +11 -0
  142. package/lib/reducers/index.d.ts +3 -2
  143. package/lib/reducers/ui/answers.d.ts +4 -0
  144. package/lib/reducers/ui/answers.js +10 -0
  145. package/lib/reducers/ui/index.d.ts +7 -4
  146. package/lib/reducers/ui/index.js +4 -2
  147. package/lib/reducers/ui/slide.d.ts +8 -0
  148. package/lib/reducers/ui/slide.js +27 -0
  149. package/lib/reducers/ui/test/answers.test.d.ts +1 -0
  150. package/lib/reducers/ui/test/answers.test.js +27 -0
  151. package/lib/reducers/ui/test/current-slide-ref.test.d.ts +1 -0
  152. package/lib/reducers/ui/test/current-slide-ref.test.js +12 -0
  153. package/lib/reducers/ui/test/navigation.test.d.ts +1 -0
  154. package/lib/reducers/ui/test/navigation.test.js +15 -0
  155. package/lib/reducers/ui/test/slide.test.d.ts +1 -0
  156. package/lib/reducers/ui/test/slide.test.js +12 -0
  157. package/lib/services/fetch-slide.js +1 -1
  158. package/lib/services/index.js +3 -1
  159. package/lib/services/post-answer.d.ts +2 -0
  160. package/lib/services/post-answer.js +62 -0
  161. package/lib/services/test/fetch-slide.test.d.ts +1 -0
  162. package/lib/services/test/fetch-slide.test.js +76 -0
  163. package/lib/services/test/post-answer.test.d.ts +1 -0
  164. package/lib/services/test/post-answer.test.js +111 -0
  165. package/lib/services/test/post-progression.test.js +9 -1
  166. package/lib/test/util/services.mock.d.ts +2 -1
  167. package/lib/test/util/services.mock.js +88 -44
  168. package/lib/types/common.d.ts +22 -33
  169. package/lib/views/skills/index.d.ts +1 -1
  170. package/lib/views/skills/index.js +0 -3
  171. package/lib/views/skills/test/skills.test.d.ts +1 -0
  172. package/lib/views/skills/test/skills.test.js +94 -0
  173. package/lib/views/slides/index.d.ts +89 -2
  174. package/lib/views/slides/index.js +80 -10
  175. package/lib/views/slides/map-api-slide-to-ui.d.ts +8 -0
  176. package/lib/views/slides/map-api-slide-to-ui.js +179 -0
  177. package/lib/{helpers → views/slides}/test/fixtures/free-text.d.ts +2 -1
  178. package/lib/views/slides/test/fixtures/free-text.js +38 -0
  179. package/lib/{helpers → views/slides}/test/fixtures/qcm-drag.d.ts +2 -1
  180. package/lib/views/slides/test/fixtures/qcm-drag.js +108 -0
  181. package/lib/{helpers → views/slides}/test/fixtures/qcm-graphic.d.ts +2 -1
  182. package/lib/views/slides/test/fixtures/qcm-graphic.js +88 -0
  183. package/lib/{helpers → views/slides}/test/fixtures/qcm.d.ts +2 -1
  184. package/lib/{helpers → views/slides}/test/fixtures/qcm.js +5 -1
  185. package/lib/{helpers → views/slides}/test/fixtures/select-template.d.ts +2 -1
  186. package/lib/views/slides/test/fixtures/select-template.js +92 -0
  187. package/lib/{helpers → views/slides}/test/fixtures/slider.d.ts +2 -1
  188. package/lib/views/slides/test/fixtures/slider.js +36 -0
  189. package/lib/{helpers → views/slides}/test/fixtures/text-template.d.ts +2 -1
  190. package/lib/{helpers → views/slides}/test/fixtures/text-template.js +5 -1
  191. package/lib/views/slides/test/index.test.d.ts +1 -0
  192. package/lib/views/slides/test/index.test.js +234 -0
  193. package/lib/views/slides/test/map-api-slide-to-ui.test.d.ts +1 -0
  194. package/lib/{helpers → views/slides}/test/map-api-slide-to-ui.test.js +19 -9
  195. package/package.json +6 -5
  196. package/src/actions/api/fetch-skills.ts +19 -12
  197. package/src/actions/api/fetch-slide.ts +35 -29
  198. package/src/actions/api/post-answer.ts +39 -0
  199. package/src/actions/api/post-progression.ts +22 -22
  200. package/src/actions/api/test/fetch-skills.test.ts +73 -0
  201. package/src/actions/api/test/fetch-slide.test.ts +80 -0
  202. package/src/actions/api/test/post-answer.test.ts +101 -0
  203. package/src/actions/api/test/post-progression.test.ts +122 -0
  204. package/src/actions/data/test/token.test.ts +29 -0
  205. package/src/actions/index.ts +1 -17
  206. package/src/actions/test/create-test-store.ts +25 -0
  207. package/src/actions/ui/answers.ts +63 -0
  208. package/src/actions/ui/slides.ts +1 -8
  209. package/src/actions/ui/test/answers.test.ts +103 -0
  210. package/src/actions/ui/test/slides.test.ts +30 -0
  211. package/src/common/index.ts +0 -7
  212. package/src/index.tsx +15 -32
  213. package/src/reducers/data/index.ts +1 -1
  214. package/src/reducers/data/progression.ts +2 -7
  215. package/src/reducers/data/slides.ts +12 -4
  216. package/src/reducers/data/test/progression.test.ts +42 -0
  217. package/src/reducers/data/test/skills.test.ts +14 -0
  218. package/src/reducers/data/test/slides.test.ts +26 -0
  219. package/src/reducers/data/test/token.test.ts +13 -0
  220. package/src/reducers/ui/answers.ts +15 -0
  221. package/src/reducers/ui/index.ts +6 -3
  222. package/src/reducers/ui/slide.ts +43 -0
  223. package/src/reducers/ui/test/answers.test.ts +33 -0
  224. package/src/reducers/ui/test/current-slide-ref.test.ts +14 -0
  225. package/src/reducers/ui/test/navigation.test.ts +19 -0
  226. package/src/reducers/ui/test/slide.test.ts +15 -0
  227. package/src/services/fetch-slide.ts +1 -1
  228. package/src/services/index.ts +3 -1
  229. package/src/services/post-answer.ts +27 -0
  230. package/src/services/test/fetch-slide.test.ts +30 -0
  231. package/src/services/test/post-answer.test.ts +68 -0
  232. package/src/services/test/post-progression.test.ts +9 -1
  233. package/src/test/util/services.mock.ts +93 -45
  234. package/src/types/common.ts +34 -44
  235. package/src/views/skills/index.ts +1 -5
  236. package/src/views/skills/test/skills.test.ts +101 -0
  237. package/src/views/slides/index.ts +186 -12
  238. package/src/views/slides/map-api-slide-to-ui.ts +251 -0
  239. package/src/views/slides/test/fixtures/free-text.ts +44 -0
  240. package/src/views/slides/test/fixtures/qcm-drag.ts +112 -0
  241. package/src/views/slides/test/fixtures/qcm-graphic.ts +95 -0
  242. package/src/{helpers → views/slides}/test/fixtures/qcm.ts +7 -2
  243. package/src/views/slides/test/fixtures/select-template.ts +99 -0
  244. package/src/views/slides/test/fixtures/slider.ts +42 -0
  245. package/src/{helpers → views/slides}/test/fixtures/text-template.ts +7 -2
  246. package/src/views/slides/test/index.test.ts +240 -0
  247. package/src/{helpers → views/slides}/test/map-api-slide-to-ui.test.ts +22 -10
  248. package/es/fixtures/qcm-slide.d.ts +0 -2
  249. package/es/fixtures/qcm-slide.js +0 -33
  250. package/es/fixtures/temp-fixture.d.ts +0 -3
  251. package/es/fixtures/temp-fixture.js +0 -84
  252. package/es/helpers/map-api-slide-to-ui.d.ts +0 -11
  253. package/es/helpers/map-api-slide-to-ui.js +0 -193
  254. package/es/helpers/test/fixtures/free-text.js +0 -30
  255. package/es/helpers/test/fixtures/qcm-drag.js +0 -112
  256. package/es/helpers/test/fixtures/qcm-graphic.js +0 -76
  257. package/es/helpers/test/fixtures/select-template.js +0 -94
  258. package/es/helpers/test/fixtures/slider.js +0 -33
  259. package/es/reducers/ui/slides.d.ts +0 -9
  260. package/es/reducers/ui/slides.js +0 -42
  261. package/es/types/views/slides.d.ts +0 -74
  262. package/es/types/views/slides.js +0 -6
  263. package/lib/fixtures/qcm-slide.d.ts +0 -2
  264. package/lib/fixtures/qcm-slide.js +0 -33
  265. package/lib/fixtures/temp-fixture.d.ts +0 -3
  266. package/lib/fixtures/temp-fixture.js +0 -84
  267. package/lib/helpers/map-api-slide-to-ui.d.ts +0 -11
  268. package/lib/helpers/map-api-slide-to-ui.js +0 -201
  269. package/lib/helpers/test/fixtures/free-text.js +0 -30
  270. package/lib/helpers/test/fixtures/qcm-drag.js +0 -112
  271. package/lib/helpers/test/fixtures/qcm-graphic.js +0 -76
  272. package/lib/helpers/test/fixtures/select-template.js +0 -94
  273. package/lib/helpers/test/fixtures/slider.js +0 -33
  274. package/lib/reducers/ui/slides.d.ts +0 -9
  275. package/lib/reducers/ui/slides.js +0 -43
  276. package/lib/types/views/slides.d.ts +0 -74
  277. package/lib/types/views/slides.js +0 -6
  278. package/src/fixtures/qcm-slide.ts +0 -35
  279. package/src/fixtures/temp-fixture.ts +0 -94
  280. package/src/helpers/map-api-slide-to-ui.ts +0 -279
  281. package/src/helpers/test/fixtures/free-text.ts +0 -33
  282. package/src/helpers/test/fixtures/qcm-drag.ts +0 -115
  283. package/src/helpers/test/fixtures/qcm-graphic.ts +0 -79
  284. package/src/helpers/test/fixtures/select-template.ts +0 -97
  285. package/src/helpers/test/fixtures/slider.ts +0 -36
  286. package/src/reducers/ui/slides.ts +0 -58
  287. package/src/types/views/slides.ts +0 -90
  288. /package/es/{helpers/test/map-api-slide-to-ui.test.d.ts → actions/api/test/fetch-skills.test.d.ts} +0 -0
  289. /package/{lib/helpers/test/map-api-slide-to-ui.test.d.ts → es/actions/api/test/fetch-slide.test.d.ts} +0 -0
@@ -1,112 +0,0 @@
1
- import noop from 'lodash/fp/noop';
2
- export const qcmDragSlide = {
3
- id: 'sli_419IlQQnf',
4
- universalRef: 'sli_419IlQQnf',
5
- question: {
6
- type: 'qcmDrag',
7
- header: 'sli_419IlQQnf.header',
8
- explanation: 'sli_419IlQQnf.explanation',
9
- content: {
10
- choices: [
11
- {
12
- media: {
13
- src: [],
14
- posters: [],
15
- subtitles: []
16
- },
17
- _id: '62b1ba3ec4f4015504212571',
18
- label: 'sli_419IlQQnf.choice_4kWwlQXhG',
19
- value: 'sli_419IlQQnf.choice_4kWwlQXhG',
20
- items: []
21
- },
22
- {
23
- media: {
24
- src: [],
25
- posters: [],
26
- subtitles: []
27
- },
28
- _id: '62b1ba3ec4f4015504212572',
29
- label: 'sli_419IlQQnf.choice_NJxbwgXm2G',
30
- value: 'sli_419IlQQnf.choice_NJxbwgXm2G',
31
- items: []
32
- },
33
- {
34
- media: {
35
- src: [],
36
- posters: [],
37
- subtitles: []
38
- },
39
- _id: '62b1ba3ec4f4015504212573',
40
- label: 'sli_419IlQQnf.choice_41fwgQXnf',
41
- value: 'sli_419IlQQnf.choice_41fwgQXnf',
42
- items: []
43
- },
44
- {
45
- media: {
46
- src: [],
47
- posters: [],
48
- subtitles: []
49
- },
50
- _id: '62b1ba3ec4f4015504212574',
51
- label: 'sli_419IlQQnf.choice_VJmweQ7nz',
52
- value: 'sli_419IlQQnf.choice_VJmweQ7nz',
53
- items: []
54
- },
55
- {
56
- media: {
57
- src: [],
58
- posters: [],
59
- subtitles: []
60
- },
61
- _id: '62b1ba3ec4f4015504212575',
62
- label: 'sli_419IlQQnf.choice_4kDDgXQhz',
63
- value: 'sli_419IlQQnf.choice_4kDDgXQhz',
64
- items: []
65
- }
66
- ]
67
- }
68
- },
69
- klf: 'sli_419IlQQnf.klf',
70
- tips: 'sli_419IlQQnf.tips'
71
- };
72
- export const qcmDragUISlide = {
73
- questionText: 'sli_419IlQQnf.header',
74
- answerUI: {
75
- help: 'sli_419IlQQnf.explanation',
76
- model: {
77
- type: 'qcmDrag',
78
- answers: [
79
- {
80
- title: 'sli_419IlQQnf.choice_4kWwlQXhG',
81
- selected: false,
82
- order: -1,
83
- onClick: noop
84
- },
85
- {
86
- title: 'sli_419IlQQnf.choice_NJxbwgXm2G',
87
- selected: false,
88
- order: -1,
89
- onClick: noop
90
- },
91
- {
92
- title: 'sli_419IlQQnf.choice_41fwgQXnf',
93
- selected: false,
94
- order: -1,
95
- onClick: noop
96
- },
97
- {
98
- title: 'sli_419IlQQnf.choice_VJmweQ7nz',
99
- selected: false,
100
- order: -1,
101
- onClick: noop
102
- },
103
- {
104
- title: 'sli_419IlQQnf.choice_4kDDgXQhz',
105
- selected: false,
106
- order: -1,
107
- onClick: noop
108
- }
109
- ]
110
- }
111
- }
112
- };
@@ -1,76 +0,0 @@
1
- import noop from 'lodash/fp/noop';
2
- export const qcmGraphicSlide = {
3
- id: 'sli_41~RSVclH',
4
- universalRef: 'sli_41~RSVclH',
5
- question: {
6
- type: 'qcmGraphic',
7
- header: 'sli_41~RSVclH.header',
8
- explanation: 'sli_41~RSVclH.explanation',
9
- content: {
10
- choices: [
11
- {
12
- media: {
13
- type: 'img',
14
- src: [
15
- {
16
- _id: '5fdce726359bf4003ee66997',
17
- mimeType: 'image/png',
18
- url: 'med_4JVRrE5gH.mediaUrl_VkBtUV9gB'
19
- }
20
- ],
21
- posters: [],
22
- subtitles: []
23
- },
24
- _id: '5fdce726359bf4003ee66996',
25
- label: 'sli_41~RSVclH.choice_V1gN0r4qgS',
26
- value: 'sli_41~RSVclH.choice_V1gN0r4qgS',
27
- items: []
28
- },
29
- {
30
- media: {
31
- type: 'img',
32
- src: [
33
- {
34
- _id: '5fdce726359bf4003ee66999',
35
- mimeType: 'image/png',
36
- url: 'med_Ek8gIEqxB.mediaUrl_EkcFUEclH'
37
- }
38
- ],
39
- posters: [],
40
- subtitles: []
41
- },
42
- _id: '5fdce726359bf4003ee66998',
43
- label: 'sli_41~RSVclH.choice_4JlLeLE5lS',
44
- value: 'sli_41~RSVclH.choice_4JlLeLE5lS',
45
- items: []
46
- }
47
- ]
48
- }
49
- },
50
- clue: 'sli_41~RSVclH.clue',
51
- klf: 'sli_41~RSVclH.klf',
52
- tips: 'sli_41~RSVclH.tips'
53
- };
54
- export const qcmGraphicUISlide = {
55
- questionText: 'sli_41~RSVclH.header',
56
- answerUI: {
57
- help: 'sli_41~RSVclH.explanation',
58
- model: {
59
- type: 'qcmGraphic',
60
- answers: [
61
- {
62
- title: 'sli_41~RSVclH.choice_V1gN0r4qgS',
63
- image: 'med_4JVRrE5gH.mediaUrl_VkBtUV9gB',
64
- selected: false,
65
- onClick: noop
66
- },
67
- {
68
- title: 'sli_41~RSVclH.choice_4JlLeLE5lS',
69
- image: 'med_Ek8gIEqxB.mediaUrl_EkcFUEclH',
70
- selected: false,
71
- onClick: noop
72
- }
73
- ]
74
- }
75
- }
76
- };
@@ -1,94 +0,0 @@
1
- import noop from 'lodash/fp/noop';
2
- export const selectTemplateSlide = {
3
- id: 'sli_410xZQxrZ',
4
- universalRef: 'sli_410xZQxrZ',
5
- question: {
6
- type: 'template',
7
- header: 'sli_410xZQxrZ.header',
8
- explanation: 'sli_410xZQxrZ.explanation',
9
- content: {
10
- template: 'sli_410xZQxrZ.template',
11
- choices: [
12
- {
13
- media: {
14
- src: [],
15
- posters: [],
16
- subtitles: []
17
- },
18
- _id: '5fdce726359bf4003ee66967',
19
- type: 'select',
20
- name: 'sel36665',
21
- items: [
22
- {
23
- _id: '5fdce726359bf4003ee66968',
24
- text: 'sli_410xZQxrZ.choice_4yeA4Z7lr~',
25
- value: 'sli_410xZQxrZ.choice_4yeA4Z7lr~'
26
- },
27
- {
28
- _id: '5fdce726359bf4003ee66969',
29
- text: 'sli_410xZQxrZ.choice_VJWCN~mgB~',
30
- value: 'sli_410xZQxrZ.choice_VJWCN~mgB~'
31
- },
32
- {
33
- _id: '5fdce726359bf4003ee6696a',
34
- text: 'sli_410xZQxrZ.choice_VkaH~XgBb',
35
- value: 'sli_410xZQxrZ.choice_VkaH~XgBb'
36
- },
37
- {
38
- _id: '5fdce726359bf4003ee6696b',
39
- text: 'sli_410xZQxrZ.choice_E1uUWXeBb',
40
- value: 'sli_410xZQxrZ.choice_E1uUWXeBb'
41
- }
42
- ]
43
- }
44
- ]
45
- }
46
- },
47
- clue: 'sli_410xZQxrZ.clue',
48
- klf: 'sli_410xZQxrZ.klf',
49
- tips: 'sli_410xZQxrZ.tips'
50
- };
51
- export const selectTemplateUISlide = {
52
- questionText: 'sli_410xZQxrZ.header',
53
- answerUI: {
54
- help: 'sli_410xZQxrZ.explanation',
55
- model: {
56
- type: 'template',
57
- template: 'sli_410xZQxrZ.template',
58
- answers: [
59
- {
60
- type: 'select',
61
- name: 'sel36665',
62
- onChange: noop,
63
- options: [
64
- { name: 'Select an answer', value: '', validOption: false, selected: true },
65
- {
66
- name: 'sli_410xZQxrZ.choice_4yeA4Z7lr~',
67
- value: 'sli_410xZQxrZ.choice_4yeA4Z7lr~',
68
- validOption: true,
69
- selected: false
70
- },
71
- {
72
- name: 'sli_410xZQxrZ.choice_VJWCN~mgB~',
73
- value: 'sli_410xZQxrZ.choice_VJWCN~mgB~',
74
- validOption: true,
75
- selected: false
76
- },
77
- {
78
- name: 'sli_410xZQxrZ.choice_VkaH~XgBb',
79
- value: 'sli_410xZQxrZ.choice_VkaH~XgBb',
80
- validOption: true,
81
- selected: false
82
- },
83
- {
84
- name: 'sli_410xZQxrZ.choice_E1uUWXeBb',
85
- value: 'sli_410xZQxrZ.choice_E1uUWXeBb',
86
- validOption: true,
87
- selected: false
88
- }
89
- ]
90
- }
91
- ]
92
- }
93
- }
94
- };
@@ -1,33 +0,0 @@
1
- import noop from 'lodash/fp/noop';
2
- export const sliderSlide = {
3
- id: 'sli_41D5AovN~',
4
- universalRef: 'sli_41D5AovN~',
5
- question: {
6
- type: 'slider',
7
- header: 'sli_41D5AovN~.header',
8
- explanation: 'sli_41D5AovN~.explanation',
9
- content: {
10
- min: 1,
11
- max: 10,
12
- unitLabel: 'sli_41D5AovN~.unitLabel'
13
- }
14
- },
15
- clue: 'sli_41D5AovN~.clue',
16
- klf: 'sli_41D5AovN~.klf',
17
- tips: 'sli_41D5AovN~.tips'
18
- };
19
- export const sliderUISlide = {
20
- questionText: 'sli_41D5AovN~.header',
21
- answerUI: {
22
- help: 'sli_41D5AovN~.explanation',
23
- model: {
24
- type: 'slider',
25
- placeholder: 'sli_41D5AovN~.explanation',
26
- minLabel: '1 undefined',
27
- maxLabel: '10 undefined',
28
- title: '0 sli_41D5AovN~.unitLabel',
29
- value: -0.1111111111111111,
30
- onChange: noop
31
- }
32
- }
33
- };
@@ -1,9 +0,0 @@
1
- import type { UISlide } from '../../types/common';
2
- import { SlideIndexes } from '../../common';
3
- import { UISlidesAction } from '../../actions/ui/slides';
4
- export declare type UISlidesState = {
5
- [key in SlideIndexes]: UISlide;
6
- };
7
- export declare const initialState: UISlidesState;
8
- declare const reducer: (state: UISlidesState | undefined, action: UISlidesAction) => UISlidesState;
9
- export default reducer;
@@ -1,42 +0,0 @@
1
- import pipe from 'lodash/fp/pipe';
2
- import set from 'lodash/fp/set';
3
- import { mapApiSlideToUi } from '../../helpers/map-api-slide-to-ui';
4
- import { SET_CURRENT_SLIDE } from '../../actions/ui/slides';
5
- export const initialState = {
6
- '0': {
7
- hidden: false,
8
- position: 0
9
- },
10
- '1': {
11
- hidden: false,
12
- position: 1
13
- },
14
- '2': {
15
- hidden: false,
16
- position: 2
17
- },
18
- '3': {
19
- hidden: false,
20
- position: 3
21
- },
22
- '4': {
23
- hidden: false,
24
- position: 4
25
- }
26
- };
27
- const setFirstSlide = (state, slideFromAPI) => {
28
- const { questionText, answerUI } = mapApiSlideToUi({ translate: (text) => text })(slideFromAPI);
29
- return pipe(set(['0', 'questionText'], questionText), set(['0', 'answerUI'], answerUI), set(['0', 'parentContentTitle'], 'Parent Title') // TODO parentContentTitle + translate
30
- )(state);
31
- };
32
- // eslint-disable-next-line default-param-last
33
- const reducer = (state = initialState, action) => {
34
- switch (action.type) {
35
- case SET_CURRENT_SLIDE: {
36
- return setFirstSlide(state, action.payload);
37
- }
38
- default:
39
- return state;
40
- }
41
- };
42
- export default reducer;
@@ -1,74 +0,0 @@
1
- import type { StoreState } from '../../reducers';
2
- import { Dispatchers } from '../../actions';
3
- declare const ICON_VALUES: {
4
- readonly right: "right";
5
- readonly wrong: "wrong";
6
- readonly 'no-answer': "no-answer";
7
- };
8
- declare type IconValue = keyof typeof ICON_VALUES;
9
- declare type StepItem = {
10
- current: boolean;
11
- icon: IconValue;
12
- value: string;
13
- };
14
- declare type CorrectionPopinProps = {
15
- klf: {
16
- label: string;
17
- onClick: Function;
18
- tooltip: string;
19
- };
20
- information: {
21
- label: string;
22
- message: string;
23
- };
24
- next: {
25
- label: string;
26
- ariaLabel: string;
27
- };
28
- successLabel: string;
29
- failureLabel: string;
30
- };
31
- declare type SlidesViewStaticProps = {
32
- header: {
33
- mode: string;
34
- skillName: string;
35
- onQuitClick: Function;
36
- 'aria-label'?: string;
37
- closeButtonAriaLabel: string;
38
- steps: StepItem[];
39
- };
40
- stack: {
41
- slides: StoreState['ui']['slides'];
42
- validateButton: {
43
- label: string;
44
- disabled: boolean;
45
- onClick: Function;
46
- };
47
- correctionPopinProps?: CorrectionPopinProps;
48
- endReview: boolean;
49
- };
50
- reviewBackgroundAriaLabel?: string;
51
- congratsProps?: {
52
- 'aria-label'?: string;
53
- 'data-name'?: string;
54
- animationLottie: any;
55
- title: string;
56
- cardCongratsStar: any;
57
- cardCongratsRank: any;
58
- buttonRevising: {
59
- 'aria-label'?: string;
60
- label: string;
61
- onClick: Function;
62
- type: string;
63
- };
64
- buttonRevisingSkill: {
65
- 'aria-label'?: string;
66
- label: string;
67
- onClick: Function;
68
- type: string;
69
- };
70
- };
71
- };
72
- declare type SlidesViewDispatcherProps = Omit<Dispatchers, 'navigateTo' | 'navigateBack'>;
73
- declare type SlidesViewProps = SlidesViewStaticProps & SlidesViewDispatcherProps;
74
- export { CorrectionPopinProps, IconValue, SlidesViewStaticProps, SlidesViewDispatcherProps, SlidesViewProps, StepItem };
@@ -1,6 +0,0 @@
1
- const ICON_VALUES = {
2
- right: 'right',
3
- wrong: 'wrong',
4
- 'no-answer': 'no-answer'
5
- };
6
- export {};
@@ -1,2 +0,0 @@
1
- import { UISlide } from '../types/common';
2
- export declare const slide: Pick<UISlide, 'questionText' | 'answerUI'>;
@@ -1,33 +0,0 @@
1
- import noop from 'lodash/fp/noop';
2
- export var slide = {
3
- questionText: 'QCM',
4
- answerUI: {
5
- help: '__help',
6
- model: {
7
- type: 'qcm',
8
- answers: [
9
- {
10
- selected: false,
11
- title: 'choix1',
12
- help: '(help choix1)',
13
- ariaLabel: '__ariaLabel1',
14
- onClick: noop
15
- },
16
- {
17
- selected: false,
18
- title: 'choix2',
19
- help: '(help choix2)',
20
- ariaLabel: '__ariaLabel2',
21
- onClick: noop
22
- },
23
- {
24
- selected: false,
25
- title: 'choix3',
26
- help: '(help choix3)',
27
- ariaLabel: '__ariaLabel3',
28
- onClick: noop
29
- }
30
- ]
31
- }
32
- }
33
- };
@@ -1,3 +0,0 @@
1
- import { SlidesViewProps, CorrectionPopinProps } from '../types/views/slides';
2
- export declare const correctionPopinProps: CorrectionPopinProps;
3
- export declare const congratsProps: SlidesViewProps['congratsProps'];
@@ -1,84 +0,0 @@
1
- export var correctionPopinProps = {
2
- klf: {
3
- label: 'Key learning factor',
4
- tooltip: 'Some tooltip info.',
5
- onClick: function () {
6
- console.log('klf onClick');
7
- }
8
- },
9
- information: {
10
- label: 'Key learning factor',
11
- message: 'info msg'
12
- },
13
- next: {
14
- label: 'Next',
15
- ariaLabel: 'Next'
16
- },
17
- successLabel: 'CORRECT ANSWER',
18
- failureLabel: 'WRONG ANSWER'
19
- };
20
- var confettiAnimationProps = {
21
- 'aria-label': 'aria lottie',
22
- 'data-name': 'default-lottie',
23
- className: undefined,
24
- animationSrc: 'https://static-staging.coorpacademy.com/animations/review/confetti.json',
25
- loop: undefined,
26
- autoplay: true,
27
- rendererSettings: {
28
- hideOnTransparent: false,
29
- animationClassName: ''
30
- },
31
- ie11ImageBackup: 'https://static-staging.coorpacademy.com/animations/review/conffeti_congrats.svg',
32
- animationControl: undefined
33
- };
34
- var starAnimationProps = {
35
- 'aria-label': 'Review Card Congrats Container',
36
- 'data-name': 'card-star',
37
- animationLottie: {
38
- 'aria-label': 'aria lottie',
39
- 'data-name': 'default-lottie',
40
- animationSrc: 'https://static-staging.coorpacademy.com/animations/review/star.json',
41
- ie11ImageBackup: 'https://static-staging.coorpacademy.com/animations/review/stars_icon_congrats.svg'
42
- },
43
- iconAriaLabel: 'Image without information',
44
- cardType: 'card-star',
45
- reviewCardTitle: 'You have won',
46
- reviewCardValue: '100',
47
- timerAnimation: 200
48
- };
49
- var rankAnimationProps = {
50
- 'aria-label': 'Review Card Congrats Container',
51
- 'data-name': 'card-rank',
52
- animationLottie: {
53
- 'aria-label': 'aria lottie',
54
- 'data-name': 'default-lottie',
55
- animationSrc: 'https://static-staging.coorpacademy.com/animations/review/rank.json',
56
- ie11ImageBackup: 'https://static-staging.coorpacademy.com/animations/review/rank_icon_congrats.svg'
57
- },
58
- cardType: 'card-rank',
59
- iconAriaLabel: 'Image without information',
60
- reviewCardTitle: 'You are now',
61
- reviewCardValue: '14',
62
- rankSuffix: 'th',
63
- timerAnimation: 200
64
- };
65
- export var congratsProps = {
66
- 'aria-label': 'Review Congratulations',
67
- 'data-name': 'review-congrats',
68
- animationLottie: confettiAnimationProps,
69
- title: 'Congratulations!',
70
- cardCongratsStar: starAnimationProps,
71
- cardCongratsRank: rankAnimationProps,
72
- buttonRevising: {
73
- 'aria-label': 'Continue revising button',
74
- label: 'Continue revising',
75
- onClick: function () { return console.log('Continue revising'); },
76
- type: 'tertiary'
77
- },
78
- buttonRevisingSkill: {
79
- label: 'Revise another skill',
80
- 'aria-label': 'Revise another skill button',
81
- onClick: function () { return console.log('Revise another skill'); },
82
- type: 'primary'
83
- }
84
- };
@@ -1,11 +0,0 @@
1
- import { AnswerUI } from '../types/slides';
2
- import { SlideFromAPI } from '../types/common';
3
- declare type UiUtils = {
4
- translate: (text: string) => string;
5
- };
6
- export declare const getQuestionType: (slide: SlideFromAPI) => SlideFromAPI['question']['type'];
7
- export declare const mapApiSlideToUi: (uiUtils: UiUtils) => (slide: SlideFromAPI) => {
8
- questionText: string;
9
- answerUI: AnswerUI;
10
- };
11
- export {};