@coorpacademy/app-review 0.5.6 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/es/sandbox/index.d.ts +9 -0
  2. package/es/sandbox/index.js +41 -0
  3. package/es/{actions → src/actions}/api/fetch-correction.d.ts +2 -2
  4. package/{lib → es/src}/actions/api/fetch-rank.d.ts +3 -3
  5. package/{lib → es/src}/actions/api/fetch-skills.d.ts +2 -2
  6. package/{lib → es/src}/actions/api/fetch-slide.d.ts +2 -2
  7. package/{lib → es/src}/actions/api/post-answer.d.ts +2 -2
  8. package/es/{actions → src/actions}/api/post-progression.d.ts +2 -2
  9. package/es/{actions → src/actions}/test/create-test-store.d.ts +2 -2
  10. package/es/{actions → src/actions}/test/create-test-store.js +2 -2
  11. package/es/src/actions/ui/navigation.d.ts +19 -0
  12. package/es/src/actions/ui/navigation.js +26 -0
  13. package/{lib → es/src}/common/index.d.ts +0 -5
  14. package/es/{common → src/common}/index.js +0 -5
  15. package/es/{configure-store.js → src/configure-store.js} +5 -1
  16. package/{lib → es/src}/index.d.ts +0 -1
  17. package/es/{index.js → src/index.js} +3 -3
  18. package/{lib → es/src}/reducers/index.d.ts +1 -1
  19. package/es/{reducers → src/reducers}/ui/index.d.ts +1 -1
  20. package/{lib → es/src}/reducers/ui/navigation.d.ts +2 -2
  21. package/es/{reducers → src/reducers}/ui/navigation.js +1 -1
  22. package/{lib → es/src}/types/common.d.ts +7 -4
  23. package/{lib → es/src}/views/skills/index.d.ts +1 -3
  24. package/es/{views → src/views}/skills/index.js +0 -2
  25. package/es/src/views/slides/index.d.ts +34 -0
  26. package/es/{views → src/views}/slides/index.js +6 -4
  27. package/lib/sandbox/index.d.ts +9 -0
  28. package/lib/sandbox/index.js +43 -0
  29. package/lib/{actions → src/actions}/api/fetch-correction.d.ts +2 -2
  30. package/{es → lib/src}/actions/api/fetch-rank.d.ts +3 -3
  31. package/{es → lib/src}/actions/api/fetch-skills.d.ts +2 -2
  32. package/{es → lib/src}/actions/api/fetch-slide.d.ts +2 -2
  33. package/{es → lib/src}/actions/api/post-answer.d.ts +2 -2
  34. package/lib/{actions → src/actions}/api/post-progression.d.ts +2 -2
  35. package/lib/{actions → src/actions}/test/create-test-store.d.ts +2 -2
  36. package/lib/{actions → src/actions}/test/create-test-store.js +2 -2
  37. package/lib/src/actions/ui/navigation.d.ts +19 -0
  38. package/lib/src/actions/ui/navigation.js +86 -0
  39. package/{es → lib/src}/common/index.d.ts +0 -5
  40. package/lib/{common → src/common}/index.js +0 -5
  41. package/lib/{configure-store.js → src/configure-store.js} +5 -1
  42. package/{es → lib/src}/index.d.ts +0 -1
  43. package/lib/{index.js → src/index.js} +3 -3
  44. package/{es → lib/src}/reducers/index.d.ts +1 -1
  45. package/lib/{reducers → src/reducers}/ui/index.d.ts +1 -1
  46. package/{es → lib/src}/reducers/ui/navigation.d.ts +2 -2
  47. package/lib/{reducers → src/reducers}/ui/navigation.js +1 -1
  48. package/{es → lib/src}/types/common.d.ts +7 -4
  49. package/{es → lib/src}/views/skills/index.d.ts +1 -3
  50. package/lib/{views → src/views}/skills/index.js +0 -2
  51. package/lib/src/views/slides/index.d.ts +34 -0
  52. package/lib/{views → src/views}/slides/index.js +6 -4
  53. package/package.json +3 -3
  54. package/src/actions/api/fetch-correction.ts +2 -2
  55. package/src/actions/api/fetch-rank.ts +3 -3
  56. package/src/actions/api/fetch-skills.ts +2 -2
  57. package/src/actions/api/fetch-slide.ts +6 -2
  58. package/src/actions/api/post-answer.ts +2 -2
  59. package/src/actions/api/post-progression.ts +6 -2
  60. package/src/actions/api/test/fetch-correction.test.ts +2 -2
  61. package/src/actions/api/test/fetch-rank.test.ts +4 -4
  62. package/src/actions/api/test/fetch-skills.test.ts +2 -2
  63. package/src/actions/api/test/fetch-slide.test.ts +2 -2
  64. package/src/actions/api/test/post-answer.test.ts +11 -7
  65. package/src/actions/api/test/post-progression.test.ts +2 -2
  66. package/src/actions/data/test/token.test.ts +1 -1
  67. package/src/actions/test/create-test-store.ts +3 -3
  68. package/src/actions/ui/navigation.ts +49 -17
  69. package/src/actions/ui/test/answers.test.ts +8 -8
  70. package/src/actions/ui/test/navigation.test.ts +95 -0
  71. package/src/actions/ui/test/next-slide.test.ts +2 -2
  72. package/src/actions/ui/test/quit-popin.test.ts +2 -2
  73. package/src/actions/ui/test/slides.test.ts +1 -1
  74. package/src/common/index.ts +0 -10
  75. package/src/configure-store.ts +8 -2
  76. package/src/index.tsx +8 -6
  77. package/src/reducers/ui/navigation.ts +5 -5
  78. package/src/reducers/ui/test/navigation.test.ts +5 -5
  79. package/src/types/common.ts +9 -5
  80. package/src/views/skills/index.ts +1 -5
  81. package/src/views/skills/test/skills.test.ts +0 -4
  82. package/src/views/slides/index.ts +20 -132
  83. package/src/views/slides/test/header.on-click.test.ts +1 -1
  84. package/src/views/slides/test/index.test.ts +21 -6
  85. package/src/views/slides/test/on-quit-popin.on-click.test.ts +6 -5
  86. package/src/views/slides/test/slide.free-text.on-change.test.ts +3 -4
  87. package/src/views/slides/test/slide.next-slide.on-click.test.ts +7 -5
  88. package/src/views/slides/test/slide.qcm-drag.on-click.test.ts +1 -1
  89. package/src/views/slides/test/slide.qcm-graphic.on-click.test.ts +1 -1
  90. package/src/views/slides/test/slide.qcm.on-click.test.ts +1 -1
  91. package/src/views/slides/test/slide.slider.on-change.test.ts +1 -1
  92. package/src/views/slides/test/slide.slider.on-slider-change.test.ts +1 -1
  93. package/src/views/slides/test/slide.template.on-change.test.ts +2 -2
  94. package/es/actions/index.d.ts +0 -5
  95. package/es/actions/index.js +0 -1
  96. package/es/actions/ui/navigation.d.ts +0 -18
  97. package/es/actions/ui/navigation.js +0 -10
  98. package/es/views/slides/index.d.ts +0 -142
  99. package/lib/actions/index.d.ts +0 -5
  100. package/lib/actions/index.js +0 -1
  101. package/lib/actions/ui/navigation.d.ts +0 -18
  102. package/lib/actions/ui/navigation.js +0 -10
  103. package/lib/views/slides/index.d.ts +0 -142
  104. package/src/actions/index.ts +0 -6
  105. /package/es/{actions → src/actions}/api/fetch-correction.js +0 -0
  106. /package/es/{actions → src/actions}/api/fetch-rank.js +0 -0
  107. /package/es/{actions → src/actions}/api/fetch-skills.js +0 -0
  108. /package/es/{actions → src/actions}/api/fetch-slide.js +0 -0
  109. /package/es/{actions → src/actions}/api/post-answer.js +0 -0
  110. /package/es/{actions → src/actions}/api/post-progression.js +0 -0
  111. /package/es/{actions → src/actions}/data/token.d.ts +0 -0
  112. /package/es/{actions → src/actions}/data/token.js +0 -0
  113. /package/es/{actions → src/actions}/ui/answers.d.ts +0 -0
  114. /package/es/{actions → src/actions}/ui/answers.js +0 -0
  115. /package/es/{actions → src/actions}/ui/next-slide.d.ts +0 -0
  116. /package/es/{actions → src/actions}/ui/next-slide.js +0 -0
  117. /package/es/{actions → src/actions}/ui/quit-popin.d.ts +0 -0
  118. /package/es/{actions → src/actions}/ui/quit-popin.js +0 -0
  119. /package/es/{actions → src/actions}/ui/slides.d.ts +0 -0
  120. /package/es/{actions → src/actions}/ui/slides.js +0 -0
  121. /package/es/{configure-store.d.ts → src/configure-store.d.ts} +0 -0
  122. /package/es/{helpers → src/helpers}/css-register.d.ts +0 -0
  123. /package/es/{helpers → src/helpers}/css-register.js +0 -0
  124. /package/es/{reducers → src/reducers}/data/corrections.d.ts +0 -0
  125. /package/es/{reducers → src/reducers}/data/corrections.js +0 -0
  126. /package/es/{reducers → src/reducers}/data/index.d.ts +0 -0
  127. /package/es/{reducers → src/reducers}/data/index.js +0 -0
  128. /package/es/{reducers → src/reducers}/data/progression.d.ts +0 -0
  129. /package/es/{reducers → src/reducers}/data/progression.js +0 -0
  130. /package/es/{reducers → src/reducers}/data/rank.d.ts +0 -0
  131. /package/es/{reducers → src/reducers}/data/rank.js +0 -0
  132. /package/es/{reducers → src/reducers}/data/skills.d.ts +0 -0
  133. /package/es/{reducers → src/reducers}/data/skills.js +0 -0
  134. /package/es/{reducers → src/reducers}/data/slides.d.ts +0 -0
  135. /package/es/{reducers → src/reducers}/data/slides.js +0 -0
  136. /package/es/{reducers → src/reducers}/data/token.d.ts +0 -0
  137. /package/es/{reducers → src/reducers}/data/token.js +0 -0
  138. /package/es/{reducers → src/reducers}/index.js +0 -0
  139. /package/es/{reducers → src/reducers}/ui/answers.d.ts +0 -0
  140. /package/es/{reducers → src/reducers}/ui/answers.js +0 -0
  141. /package/es/{reducers → src/reducers}/ui/current-slide-ref.d.ts +0 -0
  142. /package/es/{reducers → src/reducers}/ui/current-slide-ref.js +0 -0
  143. /package/es/{reducers → src/reducers}/ui/index.js +0 -0
  144. /package/es/{reducers → src/reducers}/ui/positions.d.ts +0 -0
  145. /package/es/{reducers → src/reducers}/ui/positions.js +0 -0
  146. /package/es/{reducers → src/reducers}/ui/quit-popin.d.ts +0 -0
  147. /package/es/{reducers → src/reducers}/ui/quit-popin.js +0 -0
  148. /package/es/{reducers → src/reducers}/ui/show-congrats.d.ts +0 -0
  149. /package/es/{reducers → src/reducers}/ui/show-congrats.js +0 -0
  150. /package/es/{reducers → src/reducers}/ui/slide.d.ts +0 -0
  151. /package/es/{reducers → src/reducers}/ui/slide.js +0 -0
  152. /package/es/{services → src/services}/fetch-correction.d.ts +0 -0
  153. /package/es/{services → src/services}/fetch-correction.js +0 -0
  154. /package/es/{services → src/services}/fetch-rank.d.ts +0 -0
  155. /package/es/{services → src/services}/fetch-rank.js +0 -0
  156. /package/es/{services → src/services}/fetch-skills.d.ts +0 -0
  157. /package/es/{services → src/services}/fetch-skills.js +0 -0
  158. /package/es/{services → src/services}/fetch-slide.d.ts +0 -0
  159. /package/es/{services → src/services}/fetch-slide.js +0 -0
  160. /package/es/{services → src/services}/fetch-slides-to-review-by-skill-ref.d.ts +0 -0
  161. /package/es/{services → src/services}/fetch-slides-to-review-by-skill-ref.js +0 -0
  162. /package/es/{services → src/services}/index.d.ts +0 -0
  163. /package/es/{services → src/services}/index.js +0 -0
  164. /package/es/{services → src/services}/post-answer.d.ts +0 -0
  165. /package/es/{services → src/services}/post-answer.js +0 -0
  166. /package/es/{services → src/services}/post-progression.d.ts +0 -0
  167. /package/es/{services → src/services}/post-progression.js +0 -0
  168. /package/es/{services → src/services}/tools/fetch-responses.d.ts +0 -0
  169. /package/es/{services → src/services}/tools/fetch-responses.js +0 -0
  170. /package/es/{services → src/services}/tools/sleep.d.ts +0 -0
  171. /package/es/{services → src/services}/tools/sleep.js +0 -0
  172. /package/es/{test → src/test}/index.test.d.ts +0 -0
  173. /package/es/{test → src/test}/index.test.js +0 -0
  174. /package/es/{test → src/test}/util/services.mock.d.ts +0 -0
  175. /package/es/{test → src/test}/util/services.mock.js +0 -0
  176. /package/es/{types → src/types}/common.js +0 -0
  177. /package/es/{types → src/types}/slides.d.ts +0 -0
  178. /package/es/{types → src/types}/slides.js +0 -0
  179. /package/es/{views → src/views}/slides/map-api-slide-to-ui.d.ts +0 -0
  180. /package/es/{views → src/views}/slides/map-api-slide-to-ui.js +0 -0
  181. /package/es/{views → src/views}/slides/test/fixtures/free-text.d.ts +0 -0
  182. /package/es/{views → src/views}/slides/test/fixtures/free-text.js +0 -0
  183. /package/es/{views → src/views}/slides/test/fixtures/qcm-drag.d.ts +0 -0
  184. /package/es/{views → src/views}/slides/test/fixtures/qcm-drag.js +0 -0
  185. /package/es/{views → src/views}/slides/test/fixtures/qcm-graphic.d.ts +0 -0
  186. /package/es/{views → src/views}/slides/test/fixtures/qcm-graphic.js +0 -0
  187. /package/es/{views → src/views}/slides/test/fixtures/qcm.d.ts +0 -0
  188. /package/es/{views → src/views}/slides/test/fixtures/qcm.js +0 -0
  189. /package/es/{views → src/views}/slides/test/fixtures/slider.d.ts +0 -0
  190. /package/es/{views → src/views}/slides/test/fixtures/slider.js +0 -0
  191. /package/es/{views → src/views}/slides/test/fixtures/template.d.ts +0 -0
  192. /package/es/{views → src/views}/slides/test/fixtures/template.js +0 -0
  193. /package/lib/{actions → src/actions}/api/fetch-correction.js +0 -0
  194. /package/lib/{actions → src/actions}/api/fetch-rank.js +0 -0
  195. /package/lib/{actions → src/actions}/api/fetch-skills.js +0 -0
  196. /package/lib/{actions → src/actions}/api/fetch-slide.js +0 -0
  197. /package/lib/{actions → src/actions}/api/post-answer.js +0 -0
  198. /package/lib/{actions → src/actions}/api/post-progression.js +0 -0
  199. /package/lib/{actions → src/actions}/data/token.d.ts +0 -0
  200. /package/lib/{actions → src/actions}/data/token.js +0 -0
  201. /package/lib/{actions → src/actions}/ui/answers.d.ts +0 -0
  202. /package/lib/{actions → src/actions}/ui/answers.js +0 -0
  203. /package/lib/{actions → src/actions}/ui/next-slide.d.ts +0 -0
  204. /package/lib/{actions → src/actions}/ui/next-slide.js +0 -0
  205. /package/lib/{actions → src/actions}/ui/quit-popin.d.ts +0 -0
  206. /package/lib/{actions → src/actions}/ui/quit-popin.js +0 -0
  207. /package/lib/{actions → src/actions}/ui/slides.d.ts +0 -0
  208. /package/lib/{actions → src/actions}/ui/slides.js +0 -0
  209. /package/lib/{configure-store.d.ts → src/configure-store.d.ts} +0 -0
  210. /package/lib/{helpers → src/helpers}/css-register.d.ts +0 -0
  211. /package/lib/{helpers → src/helpers}/css-register.js +0 -0
  212. /package/lib/{reducers → src/reducers}/data/corrections.d.ts +0 -0
  213. /package/lib/{reducers → src/reducers}/data/corrections.js +0 -0
  214. /package/lib/{reducers → src/reducers}/data/index.d.ts +0 -0
  215. /package/lib/{reducers → src/reducers}/data/index.js +0 -0
  216. /package/lib/{reducers → src/reducers}/data/progression.d.ts +0 -0
  217. /package/lib/{reducers → src/reducers}/data/progression.js +0 -0
  218. /package/lib/{reducers → src/reducers}/data/rank.d.ts +0 -0
  219. /package/lib/{reducers → src/reducers}/data/rank.js +0 -0
  220. /package/lib/{reducers → src/reducers}/data/skills.d.ts +0 -0
  221. /package/lib/{reducers → src/reducers}/data/skills.js +0 -0
  222. /package/lib/{reducers → src/reducers}/data/slides.d.ts +0 -0
  223. /package/lib/{reducers → src/reducers}/data/slides.js +0 -0
  224. /package/lib/{reducers → src/reducers}/data/token.d.ts +0 -0
  225. /package/lib/{reducers → src/reducers}/data/token.js +0 -0
  226. /package/lib/{reducers → src/reducers}/index.js +0 -0
  227. /package/lib/{reducers → src/reducers}/ui/answers.d.ts +0 -0
  228. /package/lib/{reducers → src/reducers}/ui/answers.js +0 -0
  229. /package/lib/{reducers → src/reducers}/ui/current-slide-ref.d.ts +0 -0
  230. /package/lib/{reducers → src/reducers}/ui/current-slide-ref.js +0 -0
  231. /package/lib/{reducers → src/reducers}/ui/index.js +0 -0
  232. /package/lib/{reducers → src/reducers}/ui/positions.d.ts +0 -0
  233. /package/lib/{reducers → src/reducers}/ui/positions.js +0 -0
  234. /package/lib/{reducers → src/reducers}/ui/quit-popin.d.ts +0 -0
  235. /package/lib/{reducers → src/reducers}/ui/quit-popin.js +0 -0
  236. /package/lib/{reducers → src/reducers}/ui/show-congrats.d.ts +0 -0
  237. /package/lib/{reducers → src/reducers}/ui/show-congrats.js +0 -0
  238. /package/lib/{reducers → src/reducers}/ui/slide.d.ts +0 -0
  239. /package/lib/{reducers → src/reducers}/ui/slide.js +0 -0
  240. /package/lib/{services → src/services}/fetch-correction.d.ts +0 -0
  241. /package/lib/{services → src/services}/fetch-correction.js +0 -0
  242. /package/lib/{services → src/services}/fetch-rank.d.ts +0 -0
  243. /package/lib/{services → src/services}/fetch-rank.js +0 -0
  244. /package/lib/{services → src/services}/fetch-skills.d.ts +0 -0
  245. /package/lib/{services → src/services}/fetch-skills.js +0 -0
  246. /package/lib/{services → src/services}/fetch-slide.d.ts +0 -0
  247. /package/lib/{services → src/services}/fetch-slide.js +0 -0
  248. /package/lib/{services → src/services}/fetch-slides-to-review-by-skill-ref.d.ts +0 -0
  249. /package/lib/{services → src/services}/fetch-slides-to-review-by-skill-ref.js +0 -0
  250. /package/lib/{services → src/services}/index.d.ts +0 -0
  251. /package/lib/{services → src/services}/index.js +0 -0
  252. /package/lib/{services → src/services}/post-answer.d.ts +0 -0
  253. /package/lib/{services → src/services}/post-answer.js +0 -0
  254. /package/lib/{services → src/services}/post-progression.d.ts +0 -0
  255. /package/lib/{services → src/services}/post-progression.js +0 -0
  256. /package/lib/{services → src/services}/tools/fetch-responses.d.ts +0 -0
  257. /package/lib/{services → src/services}/tools/fetch-responses.js +0 -0
  258. /package/lib/{services → src/services}/tools/sleep.d.ts +0 -0
  259. /package/lib/{services → src/services}/tools/sleep.js +0 -0
  260. /package/lib/{test → src/test}/index.test.d.ts +0 -0
  261. /package/lib/{test → src/test}/index.test.js +0 -0
  262. /package/lib/{test → src/test}/util/services.mock.d.ts +0 -0
  263. /package/lib/{test → src/test}/util/services.mock.js +0 -0
  264. /package/lib/{types → src/types}/common.js +0 -0
  265. /package/lib/{types → src/types}/slides.d.ts +0 -0
  266. /package/lib/{types → src/types}/slides.js +0 -0
  267. /package/lib/{views → src/views}/slides/map-api-slide-to-ui.d.ts +0 -0
  268. /package/lib/{views → src/views}/slides/map-api-slide-to-ui.js +0 -0
  269. /package/lib/{views → src/views}/slides/test/fixtures/free-text.d.ts +0 -0
  270. /package/lib/{views → src/views}/slides/test/fixtures/free-text.js +0 -0
  271. /package/lib/{views → src/views}/slides/test/fixtures/qcm-drag.d.ts +0 -0
  272. /package/lib/{views → src/views}/slides/test/fixtures/qcm-drag.js +0 -0
  273. /package/lib/{views → src/views}/slides/test/fixtures/qcm-graphic.d.ts +0 -0
  274. /package/lib/{views → src/views}/slides/test/fixtures/qcm-graphic.js +0 -0
  275. /package/lib/{views → src/views}/slides/test/fixtures/qcm.d.ts +0 -0
  276. /package/lib/{views → src/views}/slides/test/fixtures/qcm.js +0 -0
  277. /package/lib/{views → src/views}/slides/test/fixtures/slider.d.ts +0 -0
  278. /package/lib/{views → src/views}/slides/test/fixtures/slider.js +0 -0
  279. /package/lib/{views → src/views}/slides/test/fixtures/template.d.ts +0 -0
  280. /package/lib/{views → src/views}/slides/test/fixtures/template.js +0 -0
@@ -7,9 +7,16 @@ import set from 'lodash/fp/set';
7
7
  import toInteger from 'lodash/fp/toInteger';
8
8
  import type {Dispatch} from 'redux';
9
9
  import join from 'lodash/fp/join';
10
+ import {ReviewCongratsProps} from '@coorpacademy/components/es/organism/review-congrats/prop-types';
11
+ import {CongratsCardProps} from '@coorpacademy/components/es/molecule/review-card-congrats/prop-types';
12
+ import {CMPopinProps} from '@coorpacademy/components/es/molecule/cm-popin/types';
13
+ import {LottieAnimationProps} from '@coorpacademy/components/es/atom/lottie-wrapper/prop-types';
14
+ import {ReviewPlayerProps} from '@coorpacademy/components/es/template/app-review/player/prop-types';
15
+ import {ReviewCorrectionPopinProps} from '@coorpacademy/components/es/molecule/review-correction-popin/prop-types';
16
+ import {SlideProps} from '@coorpacademy/components/es/organism/review-slide/prop-types';
10
17
  import {closeQuitPopin, openQuitPopin} from '../../actions/ui/quit-popin';
11
18
  import type {ProgressionAnswerItem, ProgressionFromAPI, SlideContent} from '../../types/common';
12
- import {getProgressionSlidesRefs, type SlideIndexes} from '../../common';
19
+ import {getProgressionSlidesRefs} from '../../common';
13
20
  import type {StoreState} from '../../reducers';
14
21
  import type {AnswerUI} from '../../types/slides';
15
22
  import {postAnswer} from '../../actions/api/post-answer';
@@ -44,128 +51,7 @@ export type ReviewSlide = {
44
51
  animationType?: SlideUIAnimations;
45
52
  };
46
53
 
47
- type SlidesStack = {
48
- [key in SlideIndexes]: ReviewSlide;
49
- };
50
-
51
- type CorrectionPopinInformation = {
52
- label: string;
53
- message: string;
54
- };
55
-
56
- type CorrectionPopinKlf = {
57
- label: string;
58
- tooltip: string;
59
- };
60
-
61
- type CorrectionPopinNext = {
62
- label: string;
63
- ariaLabel: string;
64
- onClick: Function;
65
- };
66
-
67
- type QuitPopinButton = {
68
- label: string;
69
- type: string;
70
- customStyle?: {
71
- color: string;
72
- };
73
- handleOnclick: Function;
74
- ariaLabel: string;
75
- };
76
-
77
- export type CorrectionPopinProps = {
78
- klf?: CorrectionPopinKlf;
79
- information: CorrectionPopinInformation;
80
- next: CorrectionPopinNext;
81
- resultLabel: string;
82
- type: 'right' | 'wrong';
83
- };
84
-
85
- export type QuitPopinProps = {
86
- content: string;
87
- icon: string;
88
- mode: string;
89
- descriptionText: string;
90
- firstButton: QuitPopinButton;
91
- secondButton: QuitPopinButton;
92
- };
93
-
94
- export type SlidesViewProps = {
95
- header: {
96
- mode: string;
97
- skillName: string;
98
- onQuitClick: Function;
99
- 'aria-label'?: string;
100
- closeButtonAriaLabel: string;
101
- steps: StepItem[];
102
- };
103
- stack: {
104
- slides: SlidesStack;
105
- validateButton: {
106
- label: string;
107
- disabled: boolean;
108
- onClick: Function;
109
- };
110
- correctionPopinProps?: CorrectionPopinProps;
111
- endReview: boolean;
112
- };
113
- reviewBackgroundAriaLabel?: string;
114
- congrats?: CongratsProps;
115
- quitPopin?: QuitPopinProps;
116
- };
117
-
118
- type LottieAnimationProps = {
119
- 'aria-label': string;
120
- 'data-name'?: string;
121
- animationSrc: string;
122
- loop?: boolean;
123
- rendererSettings?: {
124
- hideOnTransparent?: boolean;
125
- className?: string;
126
- };
127
- height?: number;
128
- width?: number;
129
- className?: number;
130
- ie11ImageBackup: string;
131
- backupImageClassName?: string;
132
- autoplay?: boolean;
133
- animationControl?: 'play' | 'pause' | 'stop' | 'loading';
134
- };
135
-
136
- export type CongratsCardProps = {
137
- 'aria-label': string;
138
- 'data-name': string;
139
- animationLottie: LottieAnimationProps;
140
- iconAriaLabel: string;
141
- className?: string;
142
- cardType: string;
143
- reviewCardTitle: string;
144
- reviewCardValue: string;
145
- rankSuffix?: string;
146
- timerAnimation: number;
147
- };
148
-
149
- export type CongratsProps = {
150
- 'aria-label': string;
151
- 'data-name': 'review-congrats';
152
- animationLottie: LottieAnimationProps;
153
- title: string;
154
- cardCongratsStar: CongratsCardProps;
155
- cardCongratsRank?: CongratsCardProps;
156
- buttonRevising?: {
157
- 'aria-label': string;
158
- label: string;
159
- onClick: Function;
160
- type: string;
161
- };
162
- buttonRevisingSkill?: {
163
- label: string;
164
- 'aria-label': string;
165
- onClick: Function;
166
- type: string;
167
- };
168
- };
54
+ type SlidesStack = {[key: string]: SlideProps};
169
55
 
170
56
  const confettiAnimation: LottieAnimationProps = {
171
57
  'aria-label': 'aria lottie',
@@ -346,7 +232,7 @@ export const buildStepItems = (state: StoreState): StepItem[] => {
346
232
 
347
233
  const getCorrectionPopinProps =
348
234
  (dispatch: Dispatch) =>
349
- (isCorrect: boolean, correctAnswer: string[], klf: string): CorrectionPopinProps => {
235
+ (isCorrect: boolean, correctAnswer: string[], klf: string): ReviewCorrectionPopinProps => {
350
236
  return {
351
237
  klf: isCorrect
352
238
  ? undefined
@@ -360,7 +246,7 @@ const getCorrectionPopinProps =
360
246
  message: isCorrect ? klf : join(',', correctAnswer)
361
247
  },
362
248
  next: {
363
- ariaLabel: '_correctionNextAriaLabel',
249
+ 'aria-label': '_correctionNextAriaLabel',
364
250
  label: '_correctionNextLabel',
365
251
  onClick: (): void => {
366
252
  dispatch(nextSlide);
@@ -372,7 +258,7 @@ const getCorrectionPopinProps =
372
258
 
373
259
  const buildQuitPopinProps =
374
260
  (dispatch: Dispatch) =>
375
- (onQuitClick: Function): QuitPopinProps => {
261
+ (onQuitClick: () => void): CMPopinProps => {
376
262
  return {
377
263
  content: `Tu t'en vas déjà ?`,
378
264
  icon: `MoonRocket`,
@@ -385,7 +271,7 @@ const buildQuitPopinProps =
385
271
  color: '#ED3436'
386
272
  },
387
273
  handleOnclick: onQuitClick,
388
- ariaLabel: 'Stop session'
274
+ 'aria-label': 'Stop session'
389
275
  },
390
276
  secondButton: {
391
277
  label: `Continuer d'apprendre`,
@@ -393,7 +279,7 @@ const buildQuitPopinProps =
393
279
  handleOnclick: (): void => {
394
280
  dispatch(closeQuitPopin);
395
281
  },
396
- ariaLabel: 'Continue review'
282
+ 'aria-label': 'Continue review'
397
283
  }
398
284
  };
399
285
  };
@@ -421,7 +307,7 @@ const buildRankCard = (rank: number): CongratsCardProps => {
421
307
  };
422
308
  };
423
309
 
424
- const buildCongratsProps = (state: StoreState): CongratsProps | undefined => {
310
+ const buildCongratsProps = (state: StoreState): ReviewCongratsProps | undefined => {
425
311
  if (!state.ui.showCongrats) return;
426
312
 
427
313
  const progression = state.data.progression as ProgressionFromAPI;
@@ -474,14 +360,15 @@ const isEndOfProgression = (progression: ProgressionState): boolean => {
474
360
  export const mapStateToSlidesProps = (
475
361
  state: StoreState,
476
362
  dispatch: Dispatch,
477
- onQuitClick: Function
478
- ): SlidesViewProps => {
363
+ onQuitClick: () => void
364
+ ): ReviewPlayerProps => {
479
365
  const currentSlideRef = getCurrentSlideRef(state);
480
366
  const endReview = isEndOfProgression(state.data.progression);
481
367
  const correction = get(['data', 'corrections', currentSlideRef], state);
482
368
  const isCorrect = get(['data', 'progression', 'state', 'isCorrect'], state);
483
369
  const klf = getOr('', ['data', 'slides', currentSlideRef, 'klf'], state);
484
370
  const showQuitPopin = get(['ui', 'showQuitPopin'], state);
371
+ const showCongrats = get(['ui', 'showCongrats'], state);
485
372
  return {
486
373
  header: {
487
374
  mode: '__revision_mode',
@@ -489,7 +376,8 @@ export const mapStateToSlidesProps = (
489
376
  onQuitClick: () => dispatch(openQuitPopin),
490
377
  'aria-label': 'aria-header-wrapper',
491
378
  closeButtonAriaLabel: 'aria-close-button',
492
- steps: buildStepItems(state)
379
+ steps: buildStepItems(state),
380
+ hiddenSteps: showCongrats
493
381
  },
494
382
  stack: {
495
383
  slides: buildStackSlides(state, dispatch),
@@ -36,7 +36,7 @@ const state: StoreState = {
36
36
 
37
37
  test('should dispatch OPEN_POPIN action after a click on close button in header', async t => {
38
38
  const expectedAction = [{type: OPEN_POPIN}];
39
- const {dispatch, getState} = createTestStore(t, state, services, expectedAction);
39
+ const {dispatch, getState} = createTestStore(t, state, {services}, expectedAction);
40
40
  const props = mapStateToSlidesProps(getState(), dispatch, identity);
41
41
  t.is(props.quitPopin, undefined);
42
42
  await props.header.onQuitClick();
@@ -3,6 +3,10 @@ import identity from 'lodash/fp/identity';
3
3
  import omit from 'lodash/fp/omit';
4
4
  import pick from 'lodash/fp/pick';
5
5
  import set from 'lodash/fp/set';
6
+
7
+ import {ReviewCongratsProps} from '@coorpacademy/components/es/organism/review-congrats/prop-types';
8
+ import {CongratsCardProps} from '@coorpacademy/components/es/molecule/review-card-congrats/prop-types';
9
+
6
10
  import {
7
11
  postProgressionResponse as createdProgression,
8
12
  postAnswerResponses,
@@ -10,7 +14,7 @@ import {
10
14
  getChoicesCorrection,
11
15
  incorrectFreeTextPostAnswerResponse
12
16
  } from '../../../test/util/services.mock';
13
- import {CongratsCardProps, CongratsProps, mapStateToSlidesProps} from '..';
17
+ import {mapStateToSlidesProps} from '..';
14
18
  import type {StoreState} from '../../../reducers';
15
19
  import {freeTextSlide} from './fixtures/free-text';
16
20
  import {qcmGraphicSlide} from './fixtures/qcm-graphic';
@@ -55,6 +59,7 @@ test('should create initial props when fetched slide is not still received', t =
55
59
  closeButtonAriaLabel: 'aria-close-button',
56
60
  mode: '__revision_mode',
57
61
  skillName: '__agility',
62
+ hiddenSteps: false,
58
63
  steps: [
59
64
  {
60
65
  current: true,
@@ -146,6 +151,7 @@ test('should create props when first slide is on the state', t => {
146
151
  t.deepEqual(omit(['onQuitClick'], props.header), {
147
152
  'aria-label': 'aria-header-wrapper',
148
153
  closeButtonAriaLabel: 'aria-close-button',
154
+ hiddenSteps: false,
149
155
  mode: '__revision_mode',
150
156
  skillName: '__agility',
151
157
  steps: [
@@ -256,6 +262,7 @@ test('should create props when slide is on the state and user has selected answe
256
262
  closeButtonAriaLabel: 'aria-close-button',
257
263
  mode: '__revision_mode',
258
264
  skillName: '__agility',
265
+ hiddenSteps: false,
259
266
  steps: [
260
267
  {
261
268
  current: true,
@@ -369,6 +376,7 @@ test('should verify props when first slide was answered correctly and next slide
369
376
  'aria-label': 'aria-header-wrapper',
370
377
  closeButtonAriaLabel: 'aria-close-button',
371
378
  mode: '__revision_mode',
379
+ hiddenSteps: false,
372
380
  skillName: '__agility',
373
381
  steps: [
374
382
  {
@@ -486,6 +494,7 @@ test('should verify props when first slide was answered with error and next slid
486
494
  t.deepEqual(omit(['onQuitClick'], props.header), {
487
495
  'aria-label': 'aria-header-wrapper',
488
496
  closeButtonAriaLabel: 'aria-close-button',
497
+ hiddenSteps: false,
489
498
  mode: '__revision_mode',
490
499
  skillName: '__agility',
491
500
  steps: [
@@ -562,6 +571,7 @@ test('should verify props when first slide was answered, next slide is fetched &
562
571
  'aria-label': 'aria-header-wrapper',
563
572
  closeButtonAriaLabel: 'aria-close-button',
564
573
  mode: '__revision_mode',
574
+ hiddenSteps: false,
565
575
  skillName: '__agility',
566
576
  steps: [
567
577
  {
@@ -601,7 +611,7 @@ test('should verify props when first slide was answered, next slide is fetched &
601
611
  },
602
612
  klf: undefined,
603
613
  next: {
604
- ariaLabel: '_correctionNextAriaLabel',
614
+ 'aria-label': '_correctionNextAriaLabel',
605
615
  label: '_correctionNextLabel'
606
616
  },
607
617
  type: 'right'
@@ -694,6 +704,7 @@ test('should verify props when first slide was answered incorrectly, next slide
694
704
  'aria-label': 'aria-header-wrapper',
695
705
  closeButtonAriaLabel: 'aria-close-button',
696
706
  mode: '__revision_mode',
707
+ hiddenSteps: false,
697
708
  skillName: '__agility',
698
709
  steps: [
699
710
  {
@@ -736,7 +747,7 @@ test('should verify props when first slide was answered incorrectly, next slide
736
747
  'To negotiate your salary when being hired, you have to establish a benchmark beforehand. In other words, you should assess the salary to which you aspire by enquiring about the remuneration paid in the same industry, the same region and the same position.'
737
748
  },
738
749
  next: {
739
- ariaLabel: '_correctionNextAriaLabel',
750
+ 'aria-label': '_correctionNextAriaLabel',
740
751
  label: '_correctionNextLabel'
741
752
  },
742
753
  type: 'wrong'
@@ -833,6 +844,7 @@ test('should verify props when currentSlideRef has changed to nextContent of pro
833
844
  'aria-label': 'aria-header-wrapper',
834
845
  closeButtonAriaLabel: 'aria-close-button',
835
846
  mode: '__revision_mode',
847
+ hiddenSteps: false,
836
848
  skillName: '__agility',
837
849
  steps: [
838
850
  {
@@ -967,6 +979,7 @@ test('should verify props when progression is in success, showing last correctio
967
979
  closeButtonAriaLabel: 'aria-close-button',
968
980
  mode: '__revision_mode',
969
981
  skillName: '__agility',
982
+ hiddenSteps: false,
970
983
  steps: [
971
984
  {
972
985
  current: false,
@@ -1004,7 +1017,7 @@ test('should verify props when progression is in success, showing last correctio
1004
1017
  },
1005
1018
  klf: undefined,
1006
1019
  next: {
1007
- ariaLabel: '_correctionNextAriaLabel',
1020
+ 'aria-label': '_correctionNextAriaLabel',
1008
1021
  label: '_correctionNextLabel'
1009
1022
  },
1010
1023
  resultLabel: '_right',
@@ -1083,7 +1096,7 @@ test('should verify props showing congrats', t => {
1083
1096
  };
1084
1097
 
1085
1098
  const props = mapStateToSlidesProps(state, identity, identity);
1086
- const congrats = props.congrats as CongratsProps;
1099
+ const congrats = props.congrats as ReviewCongratsProps;
1087
1100
  t.is(congrats.title, 'Congratulations!');
1088
1101
  t.is(
1089
1102
  congrats.animationLottie.animationSrc,
@@ -1215,7 +1228,7 @@ test('should verify props showing congrats, with only stars card, if user has no
1215
1228
  };
1216
1229
 
1217
1230
  const props = mapStateToSlidesProps(state, identity, identity);
1218
- const congrats = props.congrats as CongratsProps;
1231
+ const congrats = props.congrats as ReviewCongratsProps;
1219
1232
  t.is(congrats.title, 'Congratulations!');
1220
1233
  t.is(
1221
1234
  congrats.animationLottie.animationSrc,
@@ -1330,6 +1343,7 @@ test('should verify props when progression has answered a current pendingSlide',
1330
1343
  'aria-label': 'aria-header-wrapper',
1331
1344
  closeButtonAriaLabel: 'aria-close-button',
1332
1345
  mode: '__revision_mode',
1346
+ hiddenSteps: false,
1333
1347
  skillName: '__agility',
1334
1348
  steps: [
1335
1349
  {
@@ -1437,6 +1451,7 @@ test('should verify props when progression still has a pendingSlide', t => {
1437
1451
  closeButtonAriaLabel: 'aria-close-button',
1438
1452
  mode: '__revision_mode',
1439
1453
  skillName: '__agility',
1454
+ hiddenSteps: false,
1440
1455
  steps: [
1441
1456
  {
1442
1457
  current: false,
@@ -1,10 +1,11 @@
1
1
  import test from 'ava';
2
2
  import identity from 'lodash/fp/identity';
3
+ import {CMPopinProps} from '@coorpacademy/components/es/molecule/cm-popin/types';
3
4
  import {createTestStore} from '../../../actions/test/create-test-store';
4
5
  import {CLOSE_POPIN} from '../../../actions/ui/quit-popin';
5
6
  import {incorrectFreeTextPostAnswerResponse, services} from '../../../test/util/services.mock';
6
7
  import {StoreState} from '../../../reducers';
7
- import {mapStateToSlidesProps, QuitPopinProps} from '..';
8
+ import {mapStateToSlidesProps} from '..';
8
9
  import {freeTextSlide} from './fixtures/free-text';
9
10
  import {qcmGraphicSlide} from './fixtures/qcm-graphic';
10
11
 
@@ -44,9 +45,9 @@ const state: StoreState = {
44
45
 
45
46
  test('should dispatch CLOSE_POPIN action via the property handleOnclick of secondButton when popin is open', async t => {
46
47
  const expectedAction = [{type: CLOSE_POPIN}];
47
- const {dispatch, getState} = createTestStore(t, state, services, expectedAction);
48
+ const {dispatch, getState} = createTestStore(t, state, {services}, expectedAction);
48
49
  const props = mapStateToSlidesProps(getState(), dispatch, identity);
49
- const quitPopin = props.quitPopin as QuitPopinProps;
50
+ const quitPopin = props.quitPopin as CMPopinProps;
50
51
  await quitPopin.secondButton.handleOnclick();
51
52
  const updatedState = getState();
52
53
  t.is(updatedState.ui.showQuitPopin, false);
@@ -57,9 +58,9 @@ test('should dispatch onQuitClick function via the property handleOnclick of fir
57
58
  t.plan(2);
58
59
 
59
60
  const expectedAction = [{type: CLOSE_POPIN}];
60
- const {dispatch, getState} = createTestStore(t, state, services, expectedAction);
61
+ const {dispatch, getState} = createTestStore(t, state, {services}, expectedAction);
61
62
  const props = mapStateToSlidesProps(getState(), dispatch, () => t.pass());
62
- const quitPopin = props.quitPopin as QuitPopinProps;
63
+ const quitPopin = props.quitPopin as CMPopinProps;
63
64
  await quitPopin.firstButton.handleOnclick();
64
65
  t.pass();
65
66
  });
@@ -18,7 +18,6 @@ import {
18
18
  import {createTestStore} from '../../../actions/test/create-test-store';
19
19
  import {StoreState} from '../../../reducers';
20
20
  import {EDIT_BASIC} from '../../../actions/ui/answers';
21
- import {FreeText} from '../../../types/slides';
22
21
  import {freeTextSlide} from './fixtures/free-text';
23
22
  import {qcmGraphicSlide} from './fixtures/qcm-graphic';
24
23
 
@@ -97,7 +96,7 @@ test('should dispatch EDIT_BASIC action via the property onChange of a Free Text
97
96
  {type: RANK_FETCH_START_REQUEST},
98
97
  {type: RANK_FETCH_START_SUCCESS, payload: {rank: 93}}
99
98
  ];
100
- const {dispatch, getState} = createTestStore(t, initialState, services, expectedActions);
99
+ const {dispatch, getState} = createTestStore(t, initialState, {services}, expectedActions);
101
100
 
102
101
  const props = mapStateToSlidesProps(getState(), dispatch, identity);
103
102
  t.deepEqual(omit('answerUI', props.stack.slides['0']), {
@@ -111,7 +110,7 @@ test('should dispatch EDIT_BASIC action via the property onChange of a Free Text
111
110
  'Which term is used to describe the act of asking what the usual salary is for the position you are applying for?'
112
111
  });
113
112
 
114
- const slideProps = props.stack.slides['0'].answerUI?.model as FreeText;
115
- await slideProps.onChange('My Answer');
113
+ const slideProps = props.stack.slides['0'].answerUI?.model;
114
+ slideProps?.onChange && (await slideProps.onChange('My Answer'));
116
115
  await props.stack.validateButton.onClick();
117
116
  });
@@ -1,5 +1,7 @@
1
1
  import test from 'ava';
2
2
  import identity from 'lodash/fp/identity';
3
+ import {ReviewCorrectionPopinProps} from '@coorpacademy/components/es/molecule/review-correction-popin/prop-types';
4
+
3
5
  import type {StoreState} from '../../../reducers';
4
6
  import {
5
7
  postAnswerResponses,
@@ -7,7 +9,7 @@ import {
7
9
  incorrectFreeTextPostAnswerResponse,
8
10
  services
9
11
  } from '../../../test/util/services.mock';
10
- import {CorrectionPopinProps, mapStateToSlidesProps} from '..';
12
+ import {mapStateToSlidesProps} from '..';
11
13
  import {createTestStore} from '../../../actions/test/create-test-store';
12
14
  import {NEXT_SLIDE} from '../../../actions/ui/next-slide';
13
15
  import {freeTextSlide} from './fixtures/free-text';
@@ -65,9 +67,9 @@ test('correction popin actions after click', async t => {
65
67
  }
66
68
  }
67
69
  ];
68
- const {dispatch, getState} = createTestStore(t, state, services, expectedActions);
70
+ const {dispatch, getState} = createTestStore(t, state, {services}, expectedActions);
69
71
  const props = mapStateToSlidesProps(getState(), dispatch, identity);
70
- const correctionPopin = props.stack.correctionPopinProps as CorrectionPopinProps;
72
+ const correctionPopin = props.stack.correctionPopinProps as ReviewCorrectionPopinProps;
71
73
  await correctionPopin.next.onClick();
72
74
 
73
75
  const updatedState = getState();
@@ -163,10 +165,10 @@ test('correction popin actions after click when progression is finished', async
163
165
  }
164
166
  }
165
167
  ];
166
- const {dispatch, getState} = createTestStore(t, state, services, expectedActions);
168
+ const {dispatch, getState} = createTestStore(t, state, {services}, expectedActions);
167
169
  const props = mapStateToSlidesProps(getState(), dispatch, identity);
168
170
  t.is(props.congrats, undefined);
169
- const correctionPopin = props.stack.correctionPopinProps as CorrectionPopinProps;
171
+ const correctionPopin = props.stack.correctionPopinProps as ReviewCorrectionPopinProps;
170
172
  await correctionPopin.next.onClick();
171
173
 
172
174
  const updatedState = getState();
@@ -71,7 +71,7 @@ test('should dispatch EDIT_QCM_DRAG action via the property onClick of a QCM Dra
71
71
  payload: ['La démoralisation']
72
72
  }
73
73
  ];
74
- const {dispatch, getState} = createTestStore(t, initialState, services, expectedActions);
74
+ const {dispatch, getState} = createTestStore(t, initialState, {services}, expectedActions);
75
75
 
76
76
  const props = mapStateToSlidesProps(getState(), dispatch, identity);
77
77
  t.deepEqual(omit('answerUI', props.stack.slides['0']), {
@@ -71,7 +71,7 @@ test('should dispatch EDIT_QCM_GRAPHIC action via the property onClick of a QCM
71
71
  payload: ['Le retour d’information']
72
72
  }
73
73
  ];
74
- const {dispatch, getState} = createTestStore(t, initialState, services, expectedActions);
74
+ const {dispatch, getState} = createTestStore(t, initialState, {services}, expectedActions);
75
75
 
76
76
  const props = mapStateToSlidesProps(getState(), dispatch, identity);
77
77
  t.deepEqual(omit('answerUI', props.stack.slides['0']), {
@@ -73,7 +73,7 @@ test('should dispatch EDIT_QCM action via the property onClick of a QCM slide',
73
73
  ]
74
74
  }
75
75
  ];
76
- const {dispatch, getState} = createTestStore(t, initialState, services, expectedActions);
76
+ const {dispatch, getState} = createTestStore(t, initialState, {services}, expectedActions);
77
77
 
78
78
  const props = mapStateToSlidesProps(getState(), dispatch, identity);
79
79
  t.deepEqual(omit('answerUI', props.stack.slides['0']), {
@@ -71,7 +71,7 @@ test('should dispatch EDIT_SLIDER action via the property onChange of a Slider s
71
71
  payload: ['5']
72
72
  }
73
73
  ];
74
- const {dispatch, getState} = createTestStore(t, initialState, services, expectedActions);
74
+ const {dispatch, getState} = createTestStore(t, initialState, {services}, expectedActions);
75
75
 
76
76
  const props = mapStateToSlidesProps(getState(), dispatch, identity);
77
77
  t.deepEqual(omit('answerUI', props.stack.slides['0']), {
@@ -71,7 +71,7 @@ test('should dispatch EDIT_SLIDER action via the property onSliderChange of a Sl
71
71
  payload: ['111']
72
72
  }
73
73
  ];
74
- const {dispatch, getState} = createTestStore(t, initialState, services, expectedActions);
74
+ const {dispatch, getState} = createTestStore(t, initialState, {services}, expectedActions);
75
75
  const props = mapStateToSlidesProps(getState(), dispatch, identity);
76
76
 
77
77
  const slideProps = props.stack.slides['0'].answerUI?.model as QuestionRange;
@@ -69,7 +69,7 @@ test('should dispatch EDIT_TEMPLATE action via the property onChange of a Templa
69
69
  {type: EDIT_TEMPLATE, meta: {slideRef: templateSlide._id}, payload: ['', 'test', '']},
70
70
  {type: EDIT_TEMPLATE, meta: {slideRef: templateSlide._id}, payload: ['Catalogue', '', '']}
71
71
  ];
72
- const {dispatch, getState} = createTestStore(t, initialState, services, expectedActions);
72
+ const {dispatch, getState} = createTestStore(t, initialState, {services}, expectedActions);
73
73
 
74
74
  const props = mapStateToSlidesProps(getState(), dispatch, identity);
75
75
  t.deepEqual(omit('answerUI', props.stack.slides['0']), {
@@ -98,7 +98,7 @@ test('should dispatch EDIT_TEMPLATE action via the property onChange of a Templa
98
98
  const {dispatch, getState} = createTestStore(
99
99
  t,
100
100
  set(['ui', 'answers', templateSlide._id], ['', 'Test', ''], initialState),
101
- services,
101
+ {services},
102
102
  expectedActions
103
103
  );
104
104
 
@@ -1,5 +0,0 @@
1
- import { navigateBack, navigateTo } from './ui/navigation';
2
- export declare type Dispatchers = {
3
- navigateTo: typeof navigateTo;
4
- navigateBack: typeof navigateBack;
5
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,18 +0,0 @@
1
- import { AppOptions } from '../../types/common';
2
- export declare const NAVIGATE_TO = "@@navigation/NAVIGATE_TO";
3
- export declare const NAVIGATE_BACK = "@@navigation/NAVIGATE_BACK";
4
- export declare const START_APP = "@@navigation/START_APP";
5
- export declare type ViewPath = 'skills' | 'onboarding' | 'slides' | 'loader';
6
- export declare type NavigateTo = {
7
- type: '@@navigation/NAVIGATE_TO';
8
- payload: ViewPath;
9
- };
10
- export declare type NavigateBack = {
11
- type: '@@navigation/NAVIGATE_BACK';
12
- };
13
- export declare type StartApp = {
14
- type: '@@navigation/START_APP';
15
- payload: AppOptions;
16
- };
17
- export declare const navigateTo: (newPath: ViewPath) => NavigateTo;
18
- export declare const navigateBack: () => NavigateBack;
@@ -1,10 +0,0 @@
1
- export const NAVIGATE_TO = '@@navigation/NAVIGATE_TO';
2
- export const NAVIGATE_BACK = '@@navigation/NAVIGATE_BACK';
3
- export const START_APP = '@@navigation/START_APP';
4
- export const navigateTo = (newPath) => ({
5
- type: NAVIGATE_TO,
6
- payload: newPath
7
- });
8
- export const navigateBack = () => ({
9
- type: NAVIGATE_BACK
10
- });