@coorpacademy/player-web 4.2.11 → 4.2.12

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 (157) hide show
  1. package/es/map-state-to-props/test/answer.js +390 -0
  2. package/es/map-state-to-props/test/answer.js.map +1 -0
  3. package/es/map-state-to-props/test/fixtures/player/clue.json +131 -0
  4. package/es/map-state-to-props/test/fixtures/player/loading-clue.json +131 -0
  5. package/es/map-state-to-props/test/fixtures/player/no-clue.json +118 -0
  6. package/es/map-state-to-props/test/fixtures/player/slide-no-lessons.json +115 -0
  7. package/es/map-state-to-props/test/fixtures/player/slide.json +127 -0
  8. package/es/map-state-to-props/test/fixtures/popin-correction/popin-extra-life.json +139 -0
  9. package/es/map-state-to-props/test/fixtures/popin-correction/popin-failure.json +145 -0
  10. package/es/map-state-to-props/test/fixtures/popin-correction/popin-next-level.json +282 -0
  11. package/es/map-state-to-props/test/fixtures/popin-correction/popin-revival.json +140 -0
  12. package/es/map-state-to-props/test/fixtures/popin-correction/popin-success-node.json +154 -0
  13. package/es/map-state-to-props/test/fixtures/popin-correction/popin-success.json +268 -0
  14. package/es/map-state-to-props/test/fixtures/popin-correction/state-fail-multiple-answers.json +473 -0
  15. package/es/map-state-to-props/test/fixtures/popin-end/fail.json +205 -0
  16. package/es/map-state-to-props/test/fixtures/popin-end/learner-adaptive-failure.json +209 -0
  17. package/es/map-state-to-props/test/fixtures/popin-end/learner-failure-with-redirection.json +211 -0
  18. package/es/map-state-to-props/test/fixtures/popin-end/learner-failure.json +211 -0
  19. package/es/map-state-to-props/test/fixtures/popin-end/learner-success-with-redirection.json +278 -0
  20. package/es/map-state-to-props/test/fixtures/popin-end/learner-success.json +275 -0
  21. package/es/map-state-to-props/test/fixtures/popin-end/success.json +223 -0
  22. package/es/map-state-to-props/test/fixtures/progression-learner.json +102 -0
  23. package/es/map-state-to-props/test/fixtures/progression-state.json +45 -0
  24. package/es/map-state-to-props/test/fixtures/slides/basic.json +60 -0
  25. package/es/map-state-to-props/test/fixtures/slides/plop.json +56 -0
  26. package/es/map-state-to-props/test/fixtures/slides/qcm-drag.json +56 -0
  27. package/es/map-state-to-props/test/fixtures/slides/qcm-graphic.json +49 -0
  28. package/es/map-state-to-props/test/fixtures/slides/qcm.json +43 -0
  29. package/es/map-state-to-props/test/fixtures/slides/slider.json +57 -0
  30. package/es/map-state-to-props/test/fixtures/slides/template.json +49 -0
  31. package/es/map-state-to-props/test/fixtures/slides/videos.json +163 -0
  32. package/es/map-state-to-props/test/fixtures/slides/with-context.json +69 -0
  33. package/es/map-state-to-props/test/header.js +131 -0
  34. package/es/map-state-to-props/test/header.js.map +1 -0
  35. package/es/map-state-to-props/test/index.js +107 -0
  36. package/es/map-state-to-props/test/index.js.map +1 -0
  37. package/es/map-state-to-props/test/player.js +680 -0
  38. package/es/map-state-to-props/test/player.js.map +1 -0
  39. package/es/map-state-to-props/test/popin-correction.create-header-cta.js +301 -0
  40. package/es/map-state-to-props/test/popin-correction.create-header-cta.js.map +1 -0
  41. package/es/map-state-to-props/test/popin-correction.js +80 -0
  42. package/es/map-state-to-props/test/popin-correction.js.map +1 -0
  43. package/es/map-state-to-props/test/popin-end.js +313 -0
  44. package/es/map-state-to-props/test/popin-end.js.map +1 -0
  45. package/es/map-state-to-props/test/popin-error.js +77 -0
  46. package/es/map-state-to-props/test/popin-error.js.map +1 -0
  47. package/es/map-state-to-props/test/resources.js +31 -0
  48. package/es/map-state-to-props/test/resources.js.map +1 -0
  49. package/es/test/add-timeout.js +8 -0
  50. package/es/test/add-timeout.js.map +1 -0
  51. package/es/test/helpers/css-register.js +3 -0
  52. package/es/test/helpers/css-register.js.map +1 -0
  53. package/es/test/helpers/macro.js +6 -0
  54. package/es/test/helpers/macro.js.map +1 -0
  55. package/es/test/index.js +39 -0
  56. package/es/test/index.js.map +1 -0
  57. package/es/test/init-reducers.js +50 -0
  58. package/es/test/init-reducers.js.map +1 -0
  59. package/es/test/locales.js +8 -0
  60. package/es/test/locales.js.map +1 -0
  61. package/es/test/run-app.js +20 -0
  62. package/es/test/run-app.js.map +1 -0
  63. package/es/test/store.js +38 -0
  64. package/es/test/store.js.map +1 -0
  65. package/es/views/test/helpers/render.js +13 -0
  66. package/es/views/test/helpers/render.js.map +1 -0
  67. package/es/views/test/helpers/state-to-vnode.js +7 -0
  68. package/es/views/test/helpers/state-to-vnode.js.map +1 -0
  69. package/es/views/test/loading.js +15 -0
  70. package/es/views/test/loading.js.map +1 -0
  71. package/es/views/test/popin-correction.js +223 -0
  72. package/es/views/test/popin-correction.js.map +1 -0
  73. package/es/views/test/popin-end.js +93 -0
  74. package/es/views/test/popin-end.js.map +1 -0
  75. package/es/views/test/router.js +22 -0
  76. package/es/views/test/router.js.map +1 -0
  77. package/es/views/test/slide.js +335 -0
  78. package/es/views/test/slide.js.map +1 -0
  79. package/lib/map-state-to-props/test/answer.js +408 -0
  80. package/lib/map-state-to-props/test/answer.js.map +1 -0
  81. package/lib/map-state-to-props/test/fixtures/player/clue.json +131 -0
  82. package/lib/map-state-to-props/test/fixtures/player/loading-clue.json +131 -0
  83. package/lib/map-state-to-props/test/fixtures/player/no-clue.json +118 -0
  84. package/lib/map-state-to-props/test/fixtures/player/slide-no-lessons.json +115 -0
  85. package/lib/map-state-to-props/test/fixtures/player/slide.json +127 -0
  86. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-extra-life.json +139 -0
  87. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-failure.json +145 -0
  88. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-next-level.json +282 -0
  89. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-revival.json +140 -0
  90. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-success-node.json +154 -0
  91. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-success.json +268 -0
  92. package/lib/map-state-to-props/test/fixtures/popin-correction/state-fail-multiple-answers.json +473 -0
  93. package/lib/map-state-to-props/test/fixtures/popin-end/fail.json +205 -0
  94. package/lib/map-state-to-props/test/fixtures/popin-end/learner-adaptive-failure.json +209 -0
  95. package/lib/map-state-to-props/test/fixtures/popin-end/learner-failure-with-redirection.json +211 -0
  96. package/lib/map-state-to-props/test/fixtures/popin-end/learner-failure.json +211 -0
  97. package/lib/map-state-to-props/test/fixtures/popin-end/learner-success-with-redirection.json +278 -0
  98. package/lib/map-state-to-props/test/fixtures/popin-end/learner-success.json +275 -0
  99. package/lib/map-state-to-props/test/fixtures/popin-end/success.json +223 -0
  100. package/lib/map-state-to-props/test/fixtures/progression-learner.json +102 -0
  101. package/lib/map-state-to-props/test/fixtures/progression-state.json +45 -0
  102. package/lib/map-state-to-props/test/fixtures/slides/basic.json +60 -0
  103. package/lib/map-state-to-props/test/fixtures/slides/plop.json +56 -0
  104. package/lib/map-state-to-props/test/fixtures/slides/qcm-drag.json +56 -0
  105. package/lib/map-state-to-props/test/fixtures/slides/qcm-graphic.json +49 -0
  106. package/lib/map-state-to-props/test/fixtures/slides/qcm.json +43 -0
  107. package/lib/map-state-to-props/test/fixtures/slides/slider.json +57 -0
  108. package/lib/map-state-to-props/test/fixtures/slides/template.json +49 -0
  109. package/lib/map-state-to-props/test/fixtures/slides/videos.json +163 -0
  110. package/lib/map-state-to-props/test/fixtures/slides/with-context.json +69 -0
  111. package/lib/map-state-to-props/test/header.js +143 -0
  112. package/lib/map-state-to-props/test/header.js.map +1 -0
  113. package/lib/map-state-to-props/test/index.js +100 -0
  114. package/lib/map-state-to-props/test/index.js.map +1 -0
  115. package/lib/map-state-to-props/test/player.js +714 -0
  116. package/lib/map-state-to-props/test/player.js.map +1 -0
  117. package/lib/map-state-to-props/test/popin-correction.create-header-cta.js +315 -0
  118. package/lib/map-state-to-props/test/popin-correction.create-header-cta.js.map +1 -0
  119. package/lib/map-state-to-props/test/popin-correction.js +85 -0
  120. package/lib/map-state-to-props/test/popin-correction.js.map +1 -0
  121. package/lib/map-state-to-props/test/popin-end.js +328 -0
  122. package/lib/map-state-to-props/test/popin-end.js.map +1 -0
  123. package/lib/map-state-to-props/test/popin-error.js +85 -0
  124. package/lib/map-state-to-props/test/popin-error.js.map +1 -0
  125. package/lib/map-state-to-props/test/resources.js +42 -0
  126. package/lib/map-state-to-props/test/resources.js.map +1 -0
  127. package/lib/test/add-timeout.js +14 -0
  128. package/lib/test/add-timeout.js.map +1 -0
  129. package/lib/test/helpers/css-register.js +8 -0
  130. package/lib/test/helpers/css-register.js.map +1 -0
  131. package/lib/test/helpers/macro.js +12 -0
  132. package/lib/test/helpers/macro.js.map +1 -0
  133. package/lib/test/index.js +53 -0
  134. package/lib/test/index.js.map +1 -0
  135. package/lib/test/init-reducers.js +57 -0
  136. package/lib/test/init-reducers.js.map +1 -0
  137. package/lib/test/locales.js +18 -0
  138. package/lib/test/locales.js.map +1 -0
  139. package/lib/test/run-app.js +27 -0
  140. package/lib/test/run-app.js.map +1 -0
  141. package/lib/test/store.js +45 -0
  142. package/lib/test/store.js.map +1 -0
  143. package/lib/views/test/helpers/render.js +24 -0
  144. package/lib/views/test/helpers/render.js.map +1 -0
  145. package/lib/views/test/helpers/state-to-vnode.js +14 -0
  146. package/lib/views/test/helpers/state-to-vnode.js.map +1 -0
  147. package/lib/views/test/loading.js +22 -0
  148. package/lib/views/test/loading.js.map +1 -0
  149. package/lib/views/test/popin-correction.js +237 -0
  150. package/lib/views/test/popin-correction.js.map +1 -0
  151. package/lib/views/test/popin-end.js +105 -0
  152. package/lib/views/test/popin-end.js.map +1 -0
  153. package/lib/views/test/router.js +32 -0
  154. package/lib/views/test/router.js.map +1 -0
  155. package/lib/views/test/slide.js +359 -0
  156. package/lib/views/test/slide.js.map +1 -0
  157. package/package.json +4 -3
@@ -0,0 +1,57 @@
1
+ {
2
+ "_id": "sli_41GXTiG8X",
3
+ "klf": "Il a connu les dinosaures.",
4
+ "tips": "Il a connu les dinosaures.",
5
+ "chapter_id": "5.C7",
6
+ "authors": [],
7
+ "meta": {
8
+ "updatedAt": "2017-07-31T15:36:55.393Z",
9
+ "createdAt": "2017-07-31T15:36:55.393Z"
10
+ },
11
+ "lessons": [
12
+ {
13
+ "type": "video",
14
+ "mimeType": "application/vimeo",
15
+ "videoId": "191200830",
16
+ "description": "Universal Searches",
17
+ "poster": "//static.coorpacademy.com/content/up/fr/medias/img/poster/miniature_bleue_up.jpg",
18
+ "_id": "597f2b044434a45a0184b385",
19
+ "subtitles": [],
20
+ "posters": [],
21
+ "src": []
22
+ },
23
+ {
24
+ "type": "video",
25
+ "mimeType": "application/vimeo",
26
+ "videoId": "191168702",
27
+ "description": "A Short History of Search Engines",
28
+ "poster": "//static.coorpacademy.com/content/up/fr/medias/img/poster/miniature_bleue_up.jpg",
29
+ "_id": "597f2b044434a45a0184b384",
30
+ "subtitles": [],
31
+ "posters": [],
32
+ "src": []
33
+ }
34
+ ],
35
+ "question": {
36
+ "type": "slider",
37
+ "header": "Quel est l'age d'Éric ?",
38
+ "explanation": "Déplacez le curseur.",
39
+ "content": {
40
+ "id": "sli_41GXTiG8X.id",
41
+ "min": 0,
42
+ "max": 1000,
43
+ "step": 100,
44
+ "defaultValue": 500,
45
+ "unitLabel": "an(s)",
46
+ "maxTypos": null,
47
+ "choices": [],
48
+ "media": {
49
+ "subtitles": [],
50
+ "posters": [],
51
+ "src": []
52
+ },
53
+ "answers": [["100"], ["200"], ["300"], ["400"], ["500"], ["600"], ["700"], ["800"], ["900"], ["1000"]]
54
+ },
55
+ "medias": []
56
+ }
57
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "_id": "sli_Nk2vje~E~",
3
+ "klf": "Copyright represents a form of intellectual property granting the owner the exclusive right to use the work as desired.",
4
+ "tips": "Copyright is made up of 2 types of rights: the moral right to be recognized as the author of the work and maintain its integrity and the patrimonial rights granting exclusive economic exploitation rights to the work for a variable period.",
5
+ "chapter_id": "cha_EJRex7KQb",
6
+ "question": {
7
+ "type": "template",
8
+ "header": "What is copyright? ",
9
+ "explanation": "Type your answers",
10
+ "content": {
11
+ "template": "The answer is {{inp81438}} {{sel31191}}",
12
+ "matchOrder": true,
13
+ "maxTypos": null,
14
+ "choices": [
15
+ {
16
+ "type": "text",
17
+ "name": "inp81438",
18
+ "label": " ",
19
+ "placeholder": " ",
20
+ "_id": "596338e04af4cb8a08a94495",
21
+ "items": [],
22
+ "media": {
23
+ "subtitles": [],
24
+ "posters": [],
25
+ "src": []
26
+ }
27
+ },
28
+ {
29
+ "type": "select",
30
+ "name": "sel31191",
31
+ "label": " ",
32
+ "_id": "596338e04af4cb8a08a94492",
33
+ "items": [
34
+ {
35
+ "text": "temporary",
36
+ "value": "sli_Nk2vje~E~.choice_VyloJkDEUb",
37
+ "_id": "596338e04af4cb8a08a94494"
38
+ },
39
+ {
40
+ "text": "exclusive",
41
+ "value": "sli_Nk2vje~E~.choice_Ek~jJyPNUZ",
42
+ "_id": "596338e04af4cb8a08a94493"
43
+ }
44
+ ]
45
+ }
46
+ ]
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,163 @@
1
+ {
2
+ "data": {
3
+ "answers": {
4
+ "entities": {}
5
+ },
6
+ "contents": {
7
+ "chapter": {
8
+ "entities": {
9
+ "5.C7": {
10
+ "_id": "5.C7",
11
+ "stars": 20,
12
+ "name": "Les réseaux sociaux au service du crowdfunding",
13
+ "meta": {
14
+ "updatedAt": "2017-01-26T09:19:06.874Z",
15
+ "createdAt": "2017-01-26T09:19:05.667Z"
16
+ },
17
+ "poster": {
18
+ "subtitles": [],
19
+ "posters": [],
20
+ "src": []
21
+ },
22
+ "isConditional": false,
23
+ "time": 8,
24
+ "bestScore": 12
25
+ }
26
+ }
27
+ },
28
+ "slide": {
29
+ "entities": {
30
+ "1.B2.4": {
31
+ "_id": "1.B2.4",
32
+ "klf":
33
+ "Nous devons chouchouter nos clientes et les mettre à l'aise pendant leur attente.",
34
+ "tips": "Avez-vous récemment consulté les iPads ou le magazine 31 rue Cambon ?",
35
+ "chapter_id": "cha_Ny1BTxRp~",
36
+ "authors": [],
37
+ "context": {
38
+ "media": {
39
+ "subtitles": [],
40
+ "posters": [],
41
+ "src": []
42
+ }
43
+ },
44
+ "meta": {
45
+ "updatedAt": "2017-06-13T12:15:40.321Z",
46
+ "createdAt": "2017-06-13T12:15:40.321Z"
47
+ },
48
+ "lessons": [
49
+ {
50
+ "type": "video",
51
+ "poster":
52
+ "https://api-staging.coorpacademy.com/api-service/medias?h=230&w=230&q=90&url=https://static.coorpacademy.com/content/digital/miniatures_cours/base/1B2.png",
53
+ "description": "Anatomie d'une page de résultats",
54
+ "mimeType": "application/vimeo",
55
+ "videoId": "88393119\n",
56
+ "_id": "590b862e2e967f64333ad456",
57
+ "subtitles": [],
58
+ "posters": [],
59
+ "src": []
60
+ },
61
+ {
62
+ "description": "Historique des moteurs de recherche",
63
+ "mimeType": "application/vimeo",
64
+ "poster":
65
+ "https://api-staging.coorpacademy.com/api-service/medias?h=230&w=230&q=90&url=https://static.coorpacademy.com/content/digital/miniatures_cours/base/1B1.png",
66
+ "posters": [],
67
+ "src": [],
68
+ "subtitles": [],
69
+ "type": "video",
70
+ "videoId": "88546728\n",
71
+ "_id": "590b862e2e967f64333ad4fc"
72
+ }
73
+ ],
74
+ "question": {
75
+ "type": "basic",
76
+ "header": "Écrivez le mot Text dans l'input.\n",
77
+ "explanation": "Saisissez votre réponse.",
78
+ "content": {
79
+ "label": "Saisissez votre réponse.",
80
+ "placeholder": " ",
81
+ "maxTypos": null,
82
+ "choices": [],
83
+ "media": {
84
+ "subtitles": [],
85
+ "posters": [],
86
+ "src": []
87
+ }
88
+ },
89
+ "medias": [
90
+ {
91
+ "type": "img",
92
+ "_id": "593eb72a187bd18c01283591",
93
+ "subtitles": [],
94
+ "posters": [],
95
+ "src": [
96
+ {
97
+ "mimeType": "image/jpeg",
98
+ "url":
99
+ "https://api-staging.coorpacademy.com/api-service/medias?h=400&w=400&q=90&url=https://static.coorpacademy.com/content/ijoinchanel/en/slides/1B2_Q6/1B2-Q6-canap-v1.jpg",
100
+ "_id": "593eb72a187bd18c01283592"
101
+ }
102
+ ]
103
+ }
104
+ ]
105
+ }
106
+ }
107
+ }
108
+ }
109
+ },
110
+ "clues": {
111
+ "entities": {}
112
+ },
113
+ "exitNodes": {
114
+ "entities": {}
115
+ },
116
+ "progressions": {
117
+ "entities": {
118
+ "0": {
119
+ "_id": "0",
120
+ "engine": {
121
+ "ref": "microlearning",
122
+ "version": "1"
123
+ },
124
+ "content": {
125
+ "ref": "5.C7",
126
+ "type": "chapter"
127
+ },
128
+ "state": {
129
+ "slides": [],
130
+ "nextContent": {
131
+ "ref": "1.B2.4",
132
+ "type": "slide"
133
+ },
134
+ "lives": 1,
135
+ "step": {
136
+ "current": 1,
137
+ "total": 4
138
+ }
139
+ }
140
+ }
141
+ }
142
+ },
143
+ "rank": {
144
+ "start": 12
145
+ },
146
+ "recommendations": {
147
+ "entities": {}
148
+ }
149
+ },
150
+ "ui": {
151
+ "answers": {},
152
+ "corrections": {
153
+ "accordion": [false, false, false],
154
+ "playResource": "590b862e2e967f64333ad456"
155
+ },
156
+ "current": {
157
+ "progressionId": "0"
158
+ },
159
+ "route": {
160
+ "0": "media"
161
+ }
162
+ }
163
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "_id": "1.B2.9",
3
+ "klf": "Some KLF",
4
+ "tips": "XXX",
5
+ "chapter_id": "cha_Ny1BTxRp~",
6
+ "authors": [],
7
+ "context": {
8
+ "title": "Some context title",
9
+ "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec et scelerisque eros, eu gravida nibh. Nunc sodales vulputate maximus. Suspendisse sed libero ligula. Aenean nec ante et turpis sodales dignissim. Quisque a diam ex. Aliquam erat volutpat. Duis et vestibulum elit. Fusce vitae risus leo. Quisque sed egestas nisl, non bibendum sapien. Sed id tempus ante. Nulla dapibus non dui sed bibendum. Pellentesque venenatis justo elit, ac ultricies ligula lobortis eget. Fusce ornare, odio eu lobortis efficitur, tellus justo tristique tellus, eget ultrices elit leo sodales est. Cras egestas enim consequat justo sagittis gravida. Curabitur semper ante eget mi scelerisque, laoreet tincidunt enim pharetra. Integer commodo lorem risus, id ornare arcu pellentesque ac. Vestibulum porta quis dui quis dignissim. Praesent condimentum placerat sem nec commodo. Nam mollis enim ac commodo pellentesque. Sed et semper justo, sed luctus nisi. Maecenas dui nunc, rutrum quis pellentesque in, vehicula nec velit. Cras convallis leo vel enim tempus scelerisque.",
10
+ "media": {
11
+ "subtitles": [],
12
+ "posters": [],
13
+ "src": []
14
+ }
15
+ },
16
+ "meta": {
17
+ "updatedAt": "2017-06-13T12:15:40.321Z",
18
+ "createdAt": "2017-06-13T12:15:40.321Z"
19
+ },
20
+ "lessons": [
21
+ {
22
+ "type": "video",
23
+ "poster": "//static.coorpacademy.com/content/digital/miniatures_cours/base/1B2.png",
24
+ "description": "Anatomie d'une page de résultats",
25
+ "mimeType": "application/vimeo",
26
+ "videoId": "88393119\n",
27
+ "_id": "590b862e2e967f64333ad456",
28
+ "subtitles": [],
29
+ "posters": [],
30
+ "src": []
31
+ }
32
+ ],
33
+ "question": {
34
+ "type": "basic",
35
+ "header": "Écrivez le mot Text dans l'input.\n",
36
+ "explanation": "Saisissez votre réponse.",
37
+ "content": {
38
+ "label": "Saisissez votre réponse.",
39
+ "placeholder": " ",
40
+ "maxTypos": null,
41
+ "choices": [],
42
+ "answers": [
43
+ [
44
+ "Text"
45
+ ]
46
+ ],
47
+ "media": {
48
+ "subtitles": [],
49
+ "posters": [],
50
+ "src": []
51
+ }
52
+ },
53
+ "medias": [
54
+ {
55
+ "type": "img",
56
+ "_id": "593eb72a187bd18c01283591",
57
+ "subtitles": [],
58
+ "posters": [],
59
+ "src": [
60
+ {
61
+ "mimeType": "image/jpeg",
62
+ "url": "//static.coorpacademy.com/content/ijoinchanel/en/slides/1B2_Q6/1B2-Q6-canap-v1.jpg",
63
+ "_id": "593eb72a187bd18c01283592"
64
+ }
65
+ ]
66
+ }
67
+ ]
68
+ }
69
+ }
@@ -0,0 +1,131 @@
1
+ import _pipe from "lodash/fp/pipe";
2
+ import _omit from "lodash/fp/omit";
3
+ import _identity from "lodash/fp/identity";
4
+ import _set from "lodash/fp/set";
5
+ import test from 'ava';
6
+ import { mockTranslate } from '@coorpacademy/translate';
7
+ import createHeader from '../header';
8
+ import basicSlide from './fixtures/slides/basic';
9
+ const options = {
10
+ translate: mockTranslate
11
+ };
12
+ const store = {
13
+ dispatch: _identity
14
+ };
15
+ const headerProps = createHeader(options, store);
16
+
17
+ const createProgression = slide => ({
18
+ engine: {
19
+ ref: 'microlearning',
20
+ version: '1'
21
+ },
22
+ content: {
23
+ ref: '1.B1',
24
+ type: 'chapter'
25
+ },
26
+ state: {
27
+ nextContent: {
28
+ ref: slide._id,
29
+ type: 'slide'
30
+ },
31
+ lives: 100,
32
+ livesDisabled: false,
33
+ step: {
34
+ current: 1
35
+ },
36
+ viewedResources: []
37
+ }
38
+ });
39
+
40
+ const data = {
41
+ contents: {
42
+ chapter: {
43
+ entities: {
44
+ '1.B2': {
45
+ _id: '1.B2',
46
+ name: 'some-title'
47
+ }
48
+ }
49
+ },
50
+ level: {
51
+ entities: {
52
+ '1.B': {
53
+ name: 'level-with-chapters',
54
+ chapterIds: ['1.B1', '1.B2', '1.B3']
55
+ }
56
+ }
57
+ },
58
+ slide: {
59
+ entities: {
60
+ [basicSlide._id]: {
61
+ chapter_id: '1.B2'
62
+ }
63
+ }
64
+ }
65
+ },
66
+ progressions: {
67
+ entities: {
68
+ basic: createProgression(basicSlide)
69
+ }
70
+ }
71
+ };
72
+ test('should create header with the number of lives in the state', t => {
73
+ const ui = {
74
+ current: {
75
+ progressionId: 'basic'
76
+ }
77
+ };
78
+ const state = {
79
+ data,
80
+ ui
81
+ };
82
+ const props = headerProps(state);
83
+ t.deepEqual(props.lives, {
84
+ count: 100
85
+ });
86
+ });
87
+ test('should read title from the content when available', t => {
88
+ const ui = {
89
+ current: {
90
+ progressionId: 'basic'
91
+ }
92
+ };
93
+ const state = {
94
+ data: _set('progressions.entities.basic.content.ref', '1.B2', data),
95
+ ui
96
+ };
97
+ const props = headerProps(state);
98
+ t.deepEqual(_omit('onClick', props.content), {
99
+ title: 'some-title'
100
+ });
101
+ });
102
+ test('should find chapter details within learner.header.subcontent', t => {
103
+ const ui = {
104
+ current: {
105
+ progressionId: 'basic'
106
+ }
107
+ };
108
+ const state = {
109
+ data: _pipe(_set('progressions.entities.basic.engine.ref', 'learner'), _set('progressions.entities.basic.content.type', 'level'), _set('progressions.entities.basic.content.ref', '1.B'))(data),
110
+ ui
111
+ };
112
+ const props = headerProps(state);
113
+ t.deepEqual(props.subcontent, {
114
+ title: 'some-title',
115
+ details: '2/3'
116
+ });
117
+ });
118
+ test('should set lives to null if lives are disabled in the progression', t => {
119
+ const ui = {
120
+ current: {
121
+ progressionId: 'basic'
122
+ }
123
+ };
124
+ const state = {
125
+ data: _set('progressions.entities.basic.state.livesDisabled', true, data),
126
+ ui
127
+ };
128
+ const props = headerProps(state);
129
+ t.is(props.lives, false);
130
+ });
131
+ //# sourceMappingURL=header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.js","names":["test","mockTranslate","createHeader","basicSlide","options","translate","store","dispatch","headerProps","createProgression","slide","engine","ref","version","content","type","state","nextContent","_id","lives","livesDisabled","step","current","viewedResources","data","contents","chapter","entities","name","level","chapterIds","chapter_id","progressions","basic","t","ui","progressionId","props","deepEqual","count","title","subcontent","details","is"],"sources":["../../../src/map-state-to-props/test/header.js"],"sourcesContent":["import test from 'ava';\nimport {set, identity, omit, pipe} from 'lodash/fp';\n\nimport {mockTranslate} from '@coorpacademy/translate';\nimport createHeader from '../header';\nimport basicSlide from './fixtures/slides/basic';\n\nconst options = {translate: mockTranslate};\nconst store = {dispatch: identity};\nconst headerProps = createHeader(options, store);\n\nconst createProgression = slide => ({\n engine: {\n ref: 'microlearning',\n version: '1'\n },\n content: {\n ref: '1.B1',\n type: 'chapter'\n },\n state: {\n nextContent: {\n ref: slide._id,\n type: 'slide'\n },\n lives: 100,\n livesDisabled: false,\n step: {\n current: 1\n },\n viewedResources: []\n }\n});\n\nconst data = {\n contents: {\n chapter: {\n entities: {\n '1.B2': {\n _id: '1.B2',\n name: 'some-title'\n }\n }\n },\n level: {\n entities: {\n '1.B': {\n name: 'level-with-chapters',\n chapterIds: ['1.B1', '1.B2', '1.B3']\n }\n }\n },\n slide: {\n entities: {\n [basicSlide._id]: {\n chapter_id: '1.B2'\n }\n }\n }\n },\n progressions: {\n entities: {\n basic: createProgression(basicSlide)\n }\n }\n};\n\ntest('should create header with the number of lives in the state', t => {\n const ui = {current: {progressionId: 'basic'}};\n const state = {data, ui};\n const props = headerProps(state);\n t.deepEqual(props.lives, {\n count: 100\n });\n});\n\ntest('should read title from the content when available', t => {\n const ui = {current: {progressionId: 'basic'}};\n const state = {data: set('progressions.entities.basic.content.ref', '1.B2', data), ui};\n const props = headerProps(state);\n\n t.deepEqual(omit('onClick', props.content), {\n title: 'some-title'\n });\n});\n\ntest('should find chapter details within learner.header.subcontent', t => {\n const ui = {current: {progressionId: 'basic'}};\n const state = {\n data: pipe(\n set('progressions.entities.basic.engine.ref', 'learner'),\n set('progressions.entities.basic.content.type', 'level'),\n set('progressions.entities.basic.content.ref', '1.B')\n )(data),\n ui\n };\n const props = headerProps(state);\n\n t.deepEqual(props.subcontent, {\n title: 'some-title',\n details: '2/3'\n });\n});\n\ntest('should set lives to null if lives are disabled in the progression', t => {\n const ui = {current: {progressionId: 'basic'}};\n const state = {data: set('progressions.entities.basic.state.livesDisabled', true, data), ui};\n const props = headerProps(state);\n\n t.is(props.lives, false);\n});\n"],"mappings":";;;;AAAA,OAAOA,IAAP,MAAiB,KAAjB;AAGA,SAAQC,aAAR,QAA4B,yBAA5B;AACA,OAAOC,YAAP,MAAyB,WAAzB;AACA,OAAOC,UAAP,MAAuB,yBAAvB;AAEA,MAAMC,OAAO,GAAG;EAACC,SAAS,EAAEJ;AAAZ,CAAhB;AACA,MAAMK,KAAK,GAAG;EAACC,QAAQ;AAAT,CAAd;AACA,MAAMC,WAAW,GAAGN,YAAY,CAACE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,KAAK,GAAG;IAACQ,IAAI,EAAE,KAAI,iDAAJ,EAAuD,IAAvD,EAA6DA,IAA7D,CAAP;IAA2EW;EAA3E,CAAd;EACA,MAAME,KAAK,GAAG7B,WAAW,CAACQ,KAAD,CAAzB;EAEAkB,CAAC,CAACS,EAAF,CAAKN,KAAK,CAAClB,KAAX,EAAkB,KAAlB;AACD,CANG,CAAJ"}
@@ -0,0 +1,107 @@
1
+ import _set from "lodash/fp/set";
2
+ import _get from "lodash/fp/get";
3
+ import _map from "lodash/fp/map";
4
+
5
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
6
+
7
+ import test from 'ava';
8
+ import createPlayer from '../player';
9
+ import { data, options, store } from './player';
10
+ test('memoize choices > QCM', t => {
11
+ // state fixture
12
+ const initialState = _set(['data', 'configs', 'entities', 'microlearning@1'], {
13
+ version: '1',
14
+ shuffleChoices: true
15
+ }, {
16
+ data,
17
+ ui: {
18
+ route: {
19
+ qcm: 'answer'
20
+ },
21
+ current: {
22
+ progressionId: 'qcm'
23
+ },
24
+ coaches: {
25
+ availableCoaches: 1
26
+ }
27
+ }
28
+ });
29
+
30
+ const secondState = _set(['data', 'contents', 'slide', 'entities', 'qcmSlide-1', 'question', 'content', 'choices'], [{
31
+ label: 'foo'
32
+ }, {
33
+ label: 'bar'
34
+ }], initialState); // initiate player
35
+
36
+
37
+ const player = createPlayer(options, store); // test answers values
38
+
39
+ const props = player(initialState);
40
+
41
+ const expected = _map('title', _get(['answerType', 'model', 'answers'], props)); // test new answers values when state is updated
42
+
43
+
44
+ const props2 = player(secondState);
45
+
46
+ const expected2 = _map('title', _get(['answerType', 'model', 'answers'], props2));
47
+
48
+ t.deepEqual(expected2, expected); // new player instance
49
+
50
+ const newPlayer = createPlayer(options, store); // test new answers values when store and state are updated
51
+
52
+ const props3 = newPlayer(secondState);
53
+
54
+ const expected3 = _map('title', _get(['answerType', 'model', 'answers'], props3));
55
+
56
+ t.deepEqual([...expected3].sort(), ['bar', 'foo']);
57
+ });
58
+ test('memoize choices > QCM DRAG', t => {
59
+ // state fixture
60
+ const initialState = _set(['data', 'configs', 'entities', 'microlearning@1'], {
61
+ version: '1',
62
+ shuffleChoices: true
63
+ }, {
64
+ data,
65
+ ui: {
66
+ route: {
67
+ qcmDrag: 'answer'
68
+ },
69
+ current: {
70
+ progressionId: 'qcmDrag'
71
+ },
72
+ coaches: {
73
+ availableCoaches: 1
74
+ }
75
+ }
76
+ });
77
+
78
+ const secondState = _set(['data', 'contents', 'slide', 'entities', '8.B2.2', 'question', 'content', 'choices'], [{
79
+ label: 'foo'
80
+ }, {
81
+ label: 'bar'
82
+ }], _extends({}, initialState)); // initiate player
83
+
84
+
85
+ const player = createPlayer(options, store); // test answers values
86
+
87
+ const props = player(initialState);
88
+
89
+ const expected = _map('title', _get(['answerType', 'model', 'answers'], props));
90
+
91
+ t.deepEqual([...expected].sort(), ["L'ordinateur", 'La tablette', 'Le smartphone']); // test new answers values when state is updated
92
+
93
+ const props2 = player(secondState);
94
+
95
+ const expected2 = _map('title', _get(['answerType', 'model', 'answers'], props2));
96
+
97
+ t.deepEqual(expected2, expected); // new player instance
98
+
99
+ const newPlayer = createPlayer(options, store); // test new answers values when store and state are updated
100
+
101
+ const props3 = newPlayer(secondState);
102
+
103
+ const expected3 = _map('title', _get(['answerType', 'model', 'answers'], props3));
104
+
105
+ t.deepEqual([...expected3].sort(), ['bar', 'foo']);
106
+ });
107
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["test","createPlayer","data","options","store","t","initialState","version","shuffleChoices","ui","route","qcm","current","progressionId","coaches","availableCoaches","secondState","label","player","props","expected","props2","expected2","deepEqual","newPlayer","props3","expected3","sort","qcmDrag"],"sources":["../../../src/map-state-to-props/test/index.js"],"sourcesContent":["import test from 'ava';\nimport {map, get, set} from 'lodash/fp';\nimport createPlayer from '../player';\n\nimport {data, options, store} from './player';\n\ntest('memoize choices > QCM', t => {\n // state fixture\n const initialState = set(\n ['data', 'configs', 'entities', 'microlearning@1'],\n {version: '1', shuffleChoices: true},\n {\n data,\n ui: {\n route: {qcm: 'answer'},\n current: {progressionId: 'qcm'},\n coaches: {availableCoaches: 1}\n }\n }\n );\n const secondState = set(\n ['data', 'contents', 'slide', 'entities', 'qcmSlide-1', 'question', 'content', 'choices'],\n [\n {\n label: 'foo'\n },\n {\n label: 'bar'\n }\n ],\n initialState\n );\n\n // initiate player\n const player = createPlayer(options, store);\n\n // test answers values\n const props = player(initialState);\n const expected = map('title', get(['answerType', 'model', 'answers'], props));\n\n // test new answers values when state is updated\n const props2 = player(secondState);\n const expected2 = map('title', get(['answerType', 'model', 'answers'], props2));\n t.deepEqual(expected2, expected);\n\n // new player instance\n const newPlayer = createPlayer(options, store);\n\n // test new answers values when store and state are updated\n const props3 = newPlayer(secondState);\n const expected3 = map('title', get(['answerType', 'model', 'answers'], props3));\n t.deepEqual([...expected3].sort(), ['bar', 'foo']);\n});\n\ntest('memoize choices > QCM DRAG', t => {\n // state fixture\n const initialState = set(\n ['data', 'configs', 'entities', 'microlearning@1'],\n {version: '1', shuffleChoices: true},\n {\n data,\n ui: {\n route: {qcmDrag: 'answer'},\n current: {progressionId: 'qcmDrag'},\n coaches: {availableCoaches: 1}\n }\n }\n );\n const secondState = set(\n ['data', 'contents', 'slide', 'entities', '8.B2.2', 'question', 'content', 'choices'],\n [\n {\n label: 'foo'\n },\n {\n label: 'bar'\n }\n ],\n {...initialState}\n );\n\n // initiate player\n const player = createPlayer(options, store);\n\n // test answers values\n const props = player(initialState);\n const expected = map('title', get(['answerType', 'model', 'answers'], props));\n t.deepEqual([...expected].sort(), [\"L'ordinateur\", 'La tablette', 'Le smartphone']);\n\n // test new answers values when state is updated\n const props2 = player(secondState);\n\n const expected2 = map('title', get(['answerType', 'model', 'answers'], props2));\n t.deepEqual(expected2, expected);\n\n // new player instance\n const newPlayer = createPlayer(options, store);\n\n // test new answers values when store and state are updated\n const props3 = newPlayer(secondState);\n const expected3 = map('title', get(['answerType', 'model', 'answers'], props3));\n t.deepEqual([...expected3].sort(), ['bar', 'foo']);\n});\n"],"mappings":";;;;;;AAAA,OAAOA,IAAP,MAAiB,KAAjB;AAEA,OAAOC,YAAP,MAAyB,WAAzB;AAEA,SAAQC,IAAR,EAAcC,OAAd,EAAuBC,KAAvB,QAAmC,UAAnC;AAEAJ,IAAI,CAAC,uBAAD,EAA0BK,CAAC,IAAI;EACjC;EACA,MAAMC,YAAY,GAAG,KACnB,CAAC,MAAD,EAAS,SAAT,EAAoB,UAApB,EAAgC,iBAAhC,CADmB,EAEnB;IAACC,OAAO,EAAE,GAAV;IAAeC,cAAc,EAAE;EAA/B,CAFmB,EAGnB;IACEN,IADF;IAEEO,EAAE,EAAE;MACFC,KAAK,EAAE;QAACC,GAAG,EAAE;MAAN,CADL;MAEFC,OAAO,EAAE;QAACC,aAAa,EAAE;MAAhB,CAFP;MAGFC,OAAO,EAAE;QAACC,gBAAgB,EAAE;MAAnB;IAHP;EAFN,CAHmB,CAArB;;EAYA,MAAMC,WAAW,GAAG,KAClB,CAAC,MAAD,EAAS,UAAT,EAAqB,OAArB,EAA8B,UAA9B,EAA0C,YAA1C,EAAwD,UAAxD,EAAoE,SAApE,EAA+E,SAA/E,CADkB,EAElB,CACE;IACEC,KAAK,EAAE;EADT,CADF,EAIE;IACEA,KAAK,EAAE;EADT,CAJF,CAFkB,EAUlBX,YAVkB,CAApB,CAdiC,CA2BjC;;;EACA,MAAMY,MAAM,GAAGjB,YAAY,CAACE,OAAD,EAAUC,KAAV,CAA3B,CA5BiC,CA8BjC;;EACA,MAAMe,KAAK,GAAGD,MAAM,CAACZ,YAAD,CAApB;;EACA,MAAMc,QAAQ,GAAG,KAAI,OAAJ,EAAa,KAAI,CAAC,YAAD,EAAe,OAAf,EAAwB,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