@coorpacademy/app-review 0.1.15 → 0.1.16
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.
- package/es/actions/api/fetch-skills.d.ts +4 -6
- package/es/actions/api/fetch-skills.js +7 -4
- package/es/actions/api/fetch-slide.d.ts +14 -7
- package/es/actions/api/fetch-slide.js +22 -19
- package/es/actions/api/post-progression.d.ts +4 -6
- package/es/actions/api/post-progression.js +13 -8
- package/es/actions/api/test/create-test-store.d.ts +5 -0
- package/es/actions/api/test/create-test-store.js +16 -0
- package/es/actions/api/test/fetch-skills.test.js +54 -0
- package/es/actions/api/test/fetch-slide.test.js +61 -0
- package/es/actions/api/test/post-progression.test.d.ts +1 -0
- package/es/actions/api/test/post-progression.test.js +102 -0
- package/es/actions/ui/answers.d.ts +7 -0
- package/es/actions/ui/answers.js +7 -0
- package/es/fixtures/temp-fixture.d.ts +1 -1
- package/es/index.js +10 -16
- package/es/reducers/data/index.d.ts +1 -1
- package/es/reducers/data/slides.d.ts +2 -2
- package/es/reducers/data/slides.js +5 -1
- package/es/reducers/data/test/progression.test.d.ts +1 -0
- package/es/reducers/data/test/progression.test.js +38 -0
- package/es/reducers/data/test/skills.test.d.ts +1 -0
- package/es/reducers/data/test/skills.test.js +12 -0
- package/es/reducers/data/test/slides.test.d.ts +1 -0
- package/es/reducers/data/test/slides.test.js +20 -0
- package/es/reducers/data/test/token.test.d.ts +1 -0
- package/es/reducers/data/test/token.test.js +11 -0
- package/es/reducers/index.d.ts +2 -2
- package/es/reducers/ui/answers.d.ts +4 -0
- package/es/reducers/ui/answers.js +13 -0
- package/es/reducers/ui/index.d.ts +4 -4
- package/es/reducers/ui/index.js +2 -2
- package/es/reducers/ui/test/answers.test.d.ts +1 -0
- package/es/reducers/ui/test/answers.test.js +11 -0
- package/es/reducers/ui/test/current-slide-ref.test.d.ts +1 -0
- package/es/reducers/ui/test/current-slide-ref.test.js +12 -0
- package/es/reducers/ui/test/navigation.test.d.ts +1 -0
- package/es/reducers/ui/test/navigation.test.js +15 -0
- package/es/services/fetch-slide.js +1 -1
- package/es/services/index.js +3 -1
- package/es/services/post-answer.d.ts +2 -0
- package/es/services/post-answer.js +18 -0
- package/es/services/test/fetch-slide.test.d.ts +1 -0
- package/es/services/test/fetch-slide.test.js +22 -0
- package/es/services/test/post-answer.test.d.ts +1 -0
- package/es/services/test/post-answer.test.js +57 -0
- package/es/services/test/post-progression.test.js +9 -1
- package/es/test/util/services.mock.js +37 -7
- package/es/types/common.d.ts +22 -8
- package/es/views/slides/index.d.ts +78 -2
- package/es/views/slides/index.js +70 -4
- package/es/views/slides/map-api-slide-to-ui.d.ts +8 -0
- package/es/views/slides/map-api-slide-to-ui.js +172 -0
- package/{lib/helpers → es/views/slides}/test/fixtures/free-text.d.ts +1 -1
- package/es/views/slides/test/fixtures/free-text.js +38 -0
- package/es/{helpers → views/slides}/test/fixtures/qcm-drag.d.ts +1 -1
- package/es/views/slides/test/fixtures/qcm-drag.js +108 -0
- package/es/{helpers → views/slides}/test/fixtures/qcm-graphic.d.ts +1 -1
- package/es/views/slides/test/fixtures/qcm-graphic.js +88 -0
- package/es/{helpers → views/slides}/test/fixtures/qcm.d.ts +1 -1
- package/es/{helpers → views/slides}/test/fixtures/qcm.js +5 -1
- package/es/{helpers → views/slides}/test/fixtures/select-template.d.ts +1 -1
- package/es/views/slides/test/fixtures/select-template.js +92 -0
- package/es/{helpers → views/slides}/test/fixtures/slider.d.ts +1 -1
- package/es/views/slides/test/fixtures/slider.js +36 -0
- package/es/{helpers → views/slides}/test/fixtures/text-template.d.ts +1 -1
- package/es/{helpers → views/slides}/test/fixtures/text-template.js +5 -1
- package/es/views/slides/test/map-api-slide-to-ui.test.d.ts +1 -0
- package/es/{helpers → views/slides}/test/map-api-slide-to-ui.test.js +19 -9
- package/lib/actions/api/fetch-skills.d.ts +4 -6
- package/lib/actions/api/fetch-skills.js +55 -7
- package/lib/actions/api/fetch-slide.d.ts +14 -7
- package/lib/actions/api/fetch-slide.js +70 -20
- package/lib/actions/api/post-progression.d.ts +4 -6
- package/lib/actions/api/post-progression.js +63 -9
- package/lib/actions/api/test/create-test-store.d.ts +5 -0
- package/lib/actions/api/test/create-test-store.js +18 -0
- package/lib/actions/api/test/fetch-skills.test.d.ts +1 -0
- package/lib/actions/api/test/fetch-skills.test.js +113 -0
- package/lib/actions/api/test/fetch-slide.test.d.ts +1 -0
- package/lib/actions/api/test/fetch-slide.test.js +120 -0
- package/lib/actions/api/test/post-progression.test.d.ts +1 -0
- package/lib/actions/api/test/post-progression.test.js +160 -0
- package/lib/actions/ui/answers.d.ts +7 -0
- package/lib/actions/ui/answers.js +9 -0
- package/lib/fixtures/temp-fixture.d.ts +1 -1
- package/lib/index.js +21 -18
- package/lib/reducers/data/index.d.ts +1 -1
- package/lib/reducers/data/slides.d.ts +2 -2
- package/lib/reducers/data/slides.js +5 -1
- package/lib/reducers/data/test/progression.test.d.ts +1 -0
- package/lib/reducers/data/test/progression.test.js +38 -0
- package/lib/reducers/data/test/skills.test.d.ts +1 -0
- package/lib/reducers/data/test/skills.test.js +12 -0
- package/lib/reducers/data/test/slides.test.d.ts +1 -0
- package/lib/reducers/data/test/slides.test.js +20 -0
- package/lib/reducers/data/test/token.test.d.ts +1 -0
- package/lib/reducers/data/test/token.test.js +11 -0
- package/lib/reducers/index.d.ts +2 -2
- package/lib/reducers/ui/answers.d.ts +4 -0
- package/lib/reducers/ui/answers.js +14 -0
- package/lib/reducers/ui/index.d.ts +4 -4
- package/lib/reducers/ui/index.js +2 -2
- package/lib/reducers/ui/test/answers.test.d.ts +1 -0
- package/lib/reducers/ui/test/answers.test.js +11 -0
- package/lib/reducers/ui/test/current-slide-ref.test.d.ts +1 -0
- package/lib/reducers/ui/test/current-slide-ref.test.js +12 -0
- package/lib/reducers/ui/test/navigation.test.d.ts +1 -0
- package/lib/reducers/ui/test/navigation.test.js +15 -0
- package/lib/services/fetch-slide.js +1 -1
- package/lib/services/index.js +3 -1
- package/lib/services/post-answer.d.ts +2 -0
- package/lib/services/post-answer.js +62 -0
- package/lib/services/test/fetch-slide.test.d.ts +1 -0
- package/lib/services/test/fetch-slide.test.js +76 -0
- package/lib/services/test/post-answer.test.d.ts +1 -0
- package/lib/services/test/post-answer.test.js +111 -0
- package/lib/services/test/post-progression.test.js +9 -1
- package/lib/test/util/services.mock.js +37 -7
- package/lib/types/common.d.ts +22 -8
- package/lib/views/slides/index.d.ts +78 -2
- package/lib/views/slides/index.js +70 -4
- package/lib/views/slides/map-api-slide-to-ui.d.ts +8 -0
- package/lib/views/slides/map-api-slide-to-ui.js +178 -0
- package/{es/helpers → lib/views/slides}/test/fixtures/free-text.d.ts +1 -1
- package/lib/views/slides/test/fixtures/free-text.js +38 -0
- package/lib/{helpers → views/slides}/test/fixtures/qcm-drag.d.ts +1 -1
- package/lib/views/slides/test/fixtures/qcm-drag.js +108 -0
- package/lib/{helpers → views/slides}/test/fixtures/qcm-graphic.d.ts +1 -1
- package/lib/views/slides/test/fixtures/qcm-graphic.js +88 -0
- package/lib/{helpers → views/slides}/test/fixtures/qcm.d.ts +1 -1
- package/lib/{helpers → views/slides}/test/fixtures/qcm.js +5 -1
- package/lib/{helpers → views/slides}/test/fixtures/select-template.d.ts +1 -1
- package/lib/views/slides/test/fixtures/select-template.js +92 -0
- package/lib/{helpers → views/slides}/test/fixtures/slider.d.ts +1 -1
- package/lib/views/slides/test/fixtures/slider.js +36 -0
- package/lib/{helpers → views/slides}/test/fixtures/text-template.d.ts +1 -1
- package/lib/{helpers → views/slides}/test/fixtures/text-template.js +5 -1
- package/lib/views/slides/test/map-api-slide-to-ui.test.d.ts +1 -0
- package/lib/{helpers → views/slides}/test/map-api-slide-to-ui.test.js +19 -9
- package/package.json +3 -3
- package/src/actions/api/fetch-skills.ts +12 -12
- package/src/actions/api/fetch-slide.ts +33 -29
- package/src/actions/api/post-progression.ts +18 -21
- package/src/actions/api/test/create-test-store.ts +25 -0
- package/src/actions/api/test/fetch-skills.test.ts +70 -0
- package/src/actions/api/test/fetch-slide.test.ts +77 -0
- package/src/actions/api/test/post-progression.test.ts +119 -0
- package/src/actions/ui/answers.ts +16 -0
- package/src/fixtures/temp-fixture.ts +1 -1
- package/src/index.tsx +14 -29
- package/src/reducers/data/index.ts +1 -1
- package/src/reducers/data/slides.ts +11 -2
- package/src/reducers/data/test/progression.test.ts +42 -0
- package/src/reducers/data/test/skills.test.ts +14 -0
- package/src/reducers/data/test/slides.test.ts +26 -0
- package/src/reducers/data/test/token.test.ts +13 -0
- package/src/reducers/ui/answers.ts +19 -0
- package/src/reducers/ui/index.ts +3 -3
- package/src/reducers/ui/test/answers.test.ts +13 -0
- package/src/reducers/ui/test/current-slide-ref.test.ts +14 -0
- package/src/reducers/ui/test/navigation.test.ts +19 -0
- package/src/services/fetch-slide.ts +1 -1
- package/src/services/index.ts +3 -1
- package/src/services/post-answer.ts +27 -0
- package/src/services/test/fetch-slide.test.ts +30 -0
- package/src/services/test/post-answer.test.ts +68 -0
- package/src/services/test/post-progression.test.ts +9 -1
- package/src/test/util/services.mock.ts +37 -7
- package/src/types/common.ts +34 -14
- package/src/views/slides/index.ts +164 -5
- package/src/views/slides/map-api-slide-to-ui.ts +251 -0
- package/src/views/slides/test/fixtures/free-text.ts +43 -0
- package/src/views/slides/test/fixtures/qcm-drag.ts +111 -0
- package/src/views/slides/test/fixtures/qcm-graphic.ts +94 -0
- package/src/{helpers → views/slides}/test/fixtures/qcm.ts +6 -2
- package/src/views/slides/test/fixtures/select-template.ts +98 -0
- package/src/views/slides/test/fixtures/slider.ts +41 -0
- package/src/{helpers → views/slides}/test/fixtures/text-template.ts +6 -2
- package/src/{helpers → views/slides}/test/map-api-slide-to-ui.test.ts +21 -10
- package/es/helpers/map-api-slide-to-ui.d.ts +0 -11
- package/es/helpers/map-api-slide-to-ui.js +0 -193
- package/es/helpers/test/fixtures/free-text.js +0 -30
- package/es/helpers/test/fixtures/qcm-drag.js +0 -112
- package/es/helpers/test/fixtures/qcm-graphic.js +0 -76
- package/es/helpers/test/fixtures/select-template.js +0 -94
- package/es/helpers/test/fixtures/slider.js +0 -33
- package/es/reducers/ui/slides.d.ts +0 -9
- package/es/reducers/ui/slides.js +0 -42
- package/es/types/views/slides.d.ts +0 -74
- package/es/types/views/slides.js +0 -6
- package/lib/helpers/map-api-slide-to-ui.d.ts +0 -11
- package/lib/helpers/map-api-slide-to-ui.js +0 -201
- package/lib/helpers/test/fixtures/free-text.js +0 -30
- package/lib/helpers/test/fixtures/qcm-drag.js +0 -112
- package/lib/helpers/test/fixtures/qcm-graphic.js +0 -76
- package/lib/helpers/test/fixtures/select-template.js +0 -94
- package/lib/helpers/test/fixtures/slider.js +0 -33
- package/lib/reducers/ui/slides.d.ts +0 -9
- package/lib/reducers/ui/slides.js +0 -43
- package/lib/types/views/slides.d.ts +0 -74
- package/lib/types/views/slides.js +0 -6
- package/src/helpers/map-api-slide-to-ui.ts +0 -279
- package/src/helpers/test/fixtures/free-text.ts +0 -33
- package/src/helpers/test/fixtures/qcm-drag.ts +0 -115
- package/src/helpers/test/fixtures/qcm-graphic.ts +0 -79
- package/src/helpers/test/fixtures/select-template.ts +0 -97
- package/src/helpers/test/fixtures/slider.ts +0 -36
- package/src/reducers/ui/slides.ts +0 -58
- package/src/types/views/slides.ts +0 -90
- /package/es/{helpers/test/map-api-slide-to-ui.test.d.ts → actions/api/test/fetch-skills.test.d.ts} +0 -0
- /package/{lib/helpers/test/map-api-slide-to-ui.test.d.ts → es/actions/api/test/fetch-slide.test.d.ts} +0 -0
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import noop from 'lodash/fp/noop';
|
|
2
|
-
import {SlideFromAPI, UISlide} from '../../../types/common';
|
|
3
|
-
|
|
4
|
-
export const qcmDragSlide: SlideFromAPI = {
|
|
5
|
-
id: 'sli_419IlQQnf',
|
|
6
|
-
universalRef: 'sli_419IlQQnf',
|
|
7
|
-
question: {
|
|
8
|
-
type: 'qcmDrag',
|
|
9
|
-
header: 'sli_419IlQQnf.header',
|
|
10
|
-
explanation: 'sli_419IlQQnf.explanation',
|
|
11
|
-
content: {
|
|
12
|
-
choices: [
|
|
13
|
-
{
|
|
14
|
-
media: {
|
|
15
|
-
src: [],
|
|
16
|
-
posters: [],
|
|
17
|
-
subtitles: []
|
|
18
|
-
},
|
|
19
|
-
_id: '62b1ba3ec4f4015504212571',
|
|
20
|
-
label: 'sli_419IlQQnf.choice_4kWwlQXhG',
|
|
21
|
-
value: 'sli_419IlQQnf.choice_4kWwlQXhG',
|
|
22
|
-
items: []
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
media: {
|
|
26
|
-
src: [],
|
|
27
|
-
posters: [],
|
|
28
|
-
subtitles: []
|
|
29
|
-
},
|
|
30
|
-
_id: '62b1ba3ec4f4015504212572',
|
|
31
|
-
label: 'sli_419IlQQnf.choice_NJxbwgXm2G',
|
|
32
|
-
value: 'sli_419IlQQnf.choice_NJxbwgXm2G',
|
|
33
|
-
items: []
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
media: {
|
|
37
|
-
src: [],
|
|
38
|
-
posters: [],
|
|
39
|
-
subtitles: []
|
|
40
|
-
},
|
|
41
|
-
_id: '62b1ba3ec4f4015504212573',
|
|
42
|
-
label: 'sli_419IlQQnf.choice_41fwgQXnf',
|
|
43
|
-
value: 'sli_419IlQQnf.choice_41fwgQXnf',
|
|
44
|
-
items: []
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
media: {
|
|
48
|
-
src: [],
|
|
49
|
-
posters: [],
|
|
50
|
-
subtitles: []
|
|
51
|
-
},
|
|
52
|
-
_id: '62b1ba3ec4f4015504212574',
|
|
53
|
-
label: 'sli_419IlQQnf.choice_VJmweQ7nz',
|
|
54
|
-
value: 'sli_419IlQQnf.choice_VJmweQ7nz',
|
|
55
|
-
items: []
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
media: {
|
|
59
|
-
src: [],
|
|
60
|
-
posters: [],
|
|
61
|
-
subtitles: []
|
|
62
|
-
},
|
|
63
|
-
_id: '62b1ba3ec4f4015504212575',
|
|
64
|
-
label: 'sli_419IlQQnf.choice_4kDDgXQhz',
|
|
65
|
-
value: 'sli_419IlQQnf.choice_4kDDgXQhz',
|
|
66
|
-
items: []
|
|
67
|
-
}
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
klf: 'sli_419IlQQnf.klf',
|
|
72
|
-
tips: 'sli_419IlQQnf.tips'
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export const qcmDragUISlide: Partial<UISlide> = {
|
|
76
|
-
questionText: 'sli_419IlQQnf.header',
|
|
77
|
-
answerUI: {
|
|
78
|
-
help: 'sli_419IlQQnf.explanation',
|
|
79
|
-
model: {
|
|
80
|
-
type: 'qcmDrag',
|
|
81
|
-
answers: [
|
|
82
|
-
{
|
|
83
|
-
title: 'sli_419IlQQnf.choice_4kWwlQXhG',
|
|
84
|
-
selected: false,
|
|
85
|
-
order: -1,
|
|
86
|
-
onClick: noop
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
title: 'sli_419IlQQnf.choice_NJxbwgXm2G',
|
|
90
|
-
selected: false,
|
|
91
|
-
order: -1,
|
|
92
|
-
onClick: noop
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
title: 'sli_419IlQQnf.choice_41fwgQXnf',
|
|
96
|
-
selected: false,
|
|
97
|
-
order: -1,
|
|
98
|
-
onClick: noop
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
title: 'sli_419IlQQnf.choice_VJmweQ7nz',
|
|
102
|
-
selected: false,
|
|
103
|
-
order: -1,
|
|
104
|
-
onClick: noop
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
title: 'sli_419IlQQnf.choice_4kDDgXQhz',
|
|
108
|
-
selected: false,
|
|
109
|
-
order: -1,
|
|
110
|
-
onClick: noop
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import noop from 'lodash/fp/noop';
|
|
2
|
-
import {SlideFromAPI, UISlide} from '../../../types/common';
|
|
3
|
-
|
|
4
|
-
export const qcmGraphicSlide: SlideFromAPI = {
|
|
5
|
-
id: 'sli_41~RSVclH',
|
|
6
|
-
universalRef: 'sli_41~RSVclH',
|
|
7
|
-
question: {
|
|
8
|
-
type: 'qcmGraphic',
|
|
9
|
-
header: 'sli_41~RSVclH.header',
|
|
10
|
-
explanation: 'sli_41~RSVclH.explanation',
|
|
11
|
-
content: {
|
|
12
|
-
choices: [
|
|
13
|
-
{
|
|
14
|
-
media: {
|
|
15
|
-
type: 'img',
|
|
16
|
-
src: [
|
|
17
|
-
{
|
|
18
|
-
_id: '5fdce726359bf4003ee66997',
|
|
19
|
-
mimeType: 'image/png',
|
|
20
|
-
url: 'med_4JVRrE5gH.mediaUrl_VkBtUV9gB'
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
posters: [],
|
|
24
|
-
subtitles: []
|
|
25
|
-
},
|
|
26
|
-
_id: '5fdce726359bf4003ee66996',
|
|
27
|
-
label: 'sli_41~RSVclH.choice_V1gN0r4qgS',
|
|
28
|
-
value: 'sli_41~RSVclH.choice_V1gN0r4qgS',
|
|
29
|
-
items: []
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
media: {
|
|
33
|
-
type: 'img',
|
|
34
|
-
src: [
|
|
35
|
-
{
|
|
36
|
-
_id: '5fdce726359bf4003ee66999',
|
|
37
|
-
mimeType: 'image/png',
|
|
38
|
-
url: 'med_Ek8gIEqxB.mediaUrl_EkcFUEclH'
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
posters: [],
|
|
42
|
-
subtitles: []
|
|
43
|
-
},
|
|
44
|
-
_id: '5fdce726359bf4003ee66998',
|
|
45
|
-
label: 'sli_41~RSVclH.choice_4JlLeLE5lS',
|
|
46
|
-
value: 'sli_41~RSVclH.choice_4JlLeLE5lS',
|
|
47
|
-
items: []
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
clue: 'sli_41~RSVclH.clue',
|
|
53
|
-
klf: 'sli_41~RSVclH.klf',
|
|
54
|
-
tips: 'sli_41~RSVclH.tips'
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export const qcmGraphicUISlide: Partial<UISlide> = {
|
|
58
|
-
questionText: 'sli_41~RSVclH.header',
|
|
59
|
-
answerUI: {
|
|
60
|
-
help: 'sli_41~RSVclH.explanation',
|
|
61
|
-
model: {
|
|
62
|
-
type: 'qcmGraphic',
|
|
63
|
-
answers: [
|
|
64
|
-
{
|
|
65
|
-
title: 'sli_41~RSVclH.choice_V1gN0r4qgS',
|
|
66
|
-
image: 'med_4JVRrE5gH.mediaUrl_VkBtUV9gB',
|
|
67
|
-
selected: false,
|
|
68
|
-
onClick: noop
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
title: 'sli_41~RSVclH.choice_4JlLeLE5lS',
|
|
72
|
-
image: 'med_Ek8gIEqxB.mediaUrl_EkcFUEclH',
|
|
73
|
-
selected: false,
|
|
74
|
-
onClick: noop
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import noop from 'lodash/fp/noop';
|
|
2
|
-
import {SlideFromAPI, UISlide} from '../../../types/common';
|
|
3
|
-
|
|
4
|
-
export const selectTemplateSlide: SlideFromAPI = {
|
|
5
|
-
id: 'sli_410xZQxrZ',
|
|
6
|
-
universalRef: 'sli_410xZQxrZ',
|
|
7
|
-
question: {
|
|
8
|
-
type: 'template',
|
|
9
|
-
header: 'sli_410xZQxrZ.header',
|
|
10
|
-
explanation: 'sli_410xZQxrZ.explanation',
|
|
11
|
-
content: {
|
|
12
|
-
template: 'sli_410xZQxrZ.template',
|
|
13
|
-
choices: [
|
|
14
|
-
{
|
|
15
|
-
media: {
|
|
16
|
-
src: [],
|
|
17
|
-
posters: [],
|
|
18
|
-
subtitles: []
|
|
19
|
-
},
|
|
20
|
-
_id: '5fdce726359bf4003ee66967',
|
|
21
|
-
type: 'select',
|
|
22
|
-
name: 'sel36665',
|
|
23
|
-
items: [
|
|
24
|
-
{
|
|
25
|
-
_id: '5fdce726359bf4003ee66968',
|
|
26
|
-
text: 'sli_410xZQxrZ.choice_4yeA4Z7lr~',
|
|
27
|
-
value: 'sli_410xZQxrZ.choice_4yeA4Z7lr~'
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
_id: '5fdce726359bf4003ee66969',
|
|
31
|
-
text: 'sli_410xZQxrZ.choice_VJWCN~mgB~',
|
|
32
|
-
value: 'sli_410xZQxrZ.choice_VJWCN~mgB~'
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
_id: '5fdce726359bf4003ee6696a',
|
|
36
|
-
text: 'sli_410xZQxrZ.choice_VkaH~XgBb',
|
|
37
|
-
value: 'sli_410xZQxrZ.choice_VkaH~XgBb'
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
_id: '5fdce726359bf4003ee6696b',
|
|
41
|
-
text: 'sli_410xZQxrZ.choice_E1uUWXeBb',
|
|
42
|
-
value: 'sli_410xZQxrZ.choice_E1uUWXeBb'
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
clue: 'sli_410xZQxrZ.clue',
|
|
50
|
-
klf: 'sli_410xZQxrZ.klf',
|
|
51
|
-
tips: 'sli_410xZQxrZ.tips'
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const selectTemplateUISlide: Partial<UISlide> = {
|
|
55
|
-
questionText: 'sli_410xZQxrZ.header',
|
|
56
|
-
answerUI: {
|
|
57
|
-
help: 'sli_410xZQxrZ.explanation',
|
|
58
|
-
model: {
|
|
59
|
-
type: 'template',
|
|
60
|
-
template: 'sli_410xZQxrZ.template',
|
|
61
|
-
answers: [
|
|
62
|
-
{
|
|
63
|
-
type: 'select',
|
|
64
|
-
name: 'sel36665',
|
|
65
|
-
onChange: noop,
|
|
66
|
-
options: [
|
|
67
|
-
{name: 'Select an answer', value: '', validOption: false, selected: true},
|
|
68
|
-
{
|
|
69
|
-
name: 'sli_410xZQxrZ.choice_4yeA4Z7lr~',
|
|
70
|
-
value: 'sli_410xZQxrZ.choice_4yeA4Z7lr~',
|
|
71
|
-
validOption: true,
|
|
72
|
-
selected: false
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: 'sli_410xZQxrZ.choice_VJWCN~mgB~',
|
|
76
|
-
value: 'sli_410xZQxrZ.choice_VJWCN~mgB~',
|
|
77
|
-
validOption: true,
|
|
78
|
-
selected: false
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: 'sli_410xZQxrZ.choice_VkaH~XgBb',
|
|
82
|
-
value: 'sli_410xZQxrZ.choice_VkaH~XgBb',
|
|
83
|
-
validOption: true,
|
|
84
|
-
selected: false
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
name: 'sli_410xZQxrZ.choice_E1uUWXeBb',
|
|
88
|
-
value: 'sli_410xZQxrZ.choice_E1uUWXeBb',
|
|
89
|
-
validOption: true,
|
|
90
|
-
selected: false
|
|
91
|
-
}
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import noop from 'lodash/fp/noop';
|
|
2
|
-
import {SlideFromAPI, UISlide} from '../../../types/common';
|
|
3
|
-
|
|
4
|
-
export const sliderSlide: SlideFromAPI = {
|
|
5
|
-
id: 'sli_41D5AovN~',
|
|
6
|
-
universalRef: 'sli_41D5AovN~',
|
|
7
|
-
question: {
|
|
8
|
-
type: 'slider',
|
|
9
|
-
header: 'sli_41D5AovN~.header',
|
|
10
|
-
explanation: 'sli_41D5AovN~.explanation',
|
|
11
|
-
content: {
|
|
12
|
-
min: 1,
|
|
13
|
-
max: 10,
|
|
14
|
-
unitLabel: 'sli_41D5AovN~.unitLabel'
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
clue: 'sli_41D5AovN~.clue',
|
|
18
|
-
klf: 'sli_41D5AovN~.klf',
|
|
19
|
-
tips: 'sli_41D5AovN~.tips'
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const sliderUISlide: Partial<UISlide> = {
|
|
23
|
-
questionText: 'sli_41D5AovN~.header',
|
|
24
|
-
answerUI: {
|
|
25
|
-
help: 'sli_41D5AovN~.explanation',
|
|
26
|
-
model: {
|
|
27
|
-
type: 'slider',
|
|
28
|
-
placeholder: 'sli_41D5AovN~.explanation',
|
|
29
|
-
minLabel: '1 undefined',
|
|
30
|
-
maxLabel: '10 undefined',
|
|
31
|
-
title: '0 sli_41D5AovN~.unitLabel',
|
|
32
|
-
value: -0.1111111111111111,
|
|
33
|
-
onChange: noop
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import pipe from 'lodash/fp/pipe';
|
|
2
|
-
import set from 'lodash/fp/set';
|
|
3
|
-
import type {SlideFromAPI, UISlide} from '../../types/common';
|
|
4
|
-
import {SlideIndexes} from '../../common';
|
|
5
|
-
import {mapApiSlideToUi} from '../../helpers/map-api-slide-to-ui';
|
|
6
|
-
import {SET_CURRENT_SLIDE, UISlidesAction} from '../../actions/ui/slides';
|
|
7
|
-
|
|
8
|
-
export type UISlidesState = {
|
|
9
|
-
[key in SlideIndexes]: UISlide;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const initialState: UISlidesState = {
|
|
13
|
-
'0': {
|
|
14
|
-
hidden: false,
|
|
15
|
-
position: 0
|
|
16
|
-
},
|
|
17
|
-
'1': {
|
|
18
|
-
hidden: false,
|
|
19
|
-
position: 1
|
|
20
|
-
},
|
|
21
|
-
'2': {
|
|
22
|
-
hidden: false,
|
|
23
|
-
position: 2
|
|
24
|
-
},
|
|
25
|
-
'3': {
|
|
26
|
-
hidden: false,
|
|
27
|
-
position: 3
|
|
28
|
-
},
|
|
29
|
-
'4': {
|
|
30
|
-
hidden: false,
|
|
31
|
-
position: 4
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const setFirstSlide = (state: UISlidesState, slideFromAPI: SlideFromAPI): UISlidesState => {
|
|
36
|
-
const {questionText, answerUI} = mapApiSlideToUi({translate: (text: string) => text})(
|
|
37
|
-
slideFromAPI
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
return pipe(
|
|
41
|
-
set(['0', 'questionText'], questionText),
|
|
42
|
-
set(['0', 'answerUI'], answerUI),
|
|
43
|
-
set(['0', 'parentContentTitle'], 'Parent Title') // TODO parentContentTitle + translate
|
|
44
|
-
)(state);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
// eslint-disable-next-line default-param-last
|
|
48
|
-
const reducer = (state: UISlidesState = initialState, action: UISlidesAction): UISlidesState => {
|
|
49
|
-
switch (action.type) {
|
|
50
|
-
case SET_CURRENT_SLIDE: {
|
|
51
|
-
return setFirstSlide(state, action.payload);
|
|
52
|
-
}
|
|
53
|
-
default:
|
|
54
|
-
return state;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export default reducer;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import type {StoreState} from '../../reducers';
|
|
3
|
-
import {Dispatchers} from '../../actions';
|
|
4
|
-
|
|
5
|
-
const ICON_VALUES = {
|
|
6
|
-
right: 'right',
|
|
7
|
-
wrong: 'wrong',
|
|
8
|
-
'no-answer': 'no-answer'
|
|
9
|
-
} as const;
|
|
10
|
-
|
|
11
|
-
type IconValue = keyof typeof ICON_VALUES;
|
|
12
|
-
|
|
13
|
-
type StepItem = {
|
|
14
|
-
current: boolean;
|
|
15
|
-
icon: IconValue;
|
|
16
|
-
value: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
type CorrectionPopinProps = {
|
|
20
|
-
klf: {
|
|
21
|
-
label: string;
|
|
22
|
-
onClick: Function;
|
|
23
|
-
tooltip: string;
|
|
24
|
-
};
|
|
25
|
-
information: {
|
|
26
|
-
label: string;
|
|
27
|
-
message: string;
|
|
28
|
-
};
|
|
29
|
-
next: {
|
|
30
|
-
label: string;
|
|
31
|
-
ariaLabel: string;
|
|
32
|
-
};
|
|
33
|
-
successLabel: string;
|
|
34
|
-
failureLabel: string;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
type SlidesViewStaticProps = {
|
|
38
|
-
header: {
|
|
39
|
-
mode: string;
|
|
40
|
-
skillName: string;
|
|
41
|
-
onQuitClick: Function;
|
|
42
|
-
'aria-label'?: string;
|
|
43
|
-
closeButtonAriaLabel: string;
|
|
44
|
-
steps: StepItem[];
|
|
45
|
-
};
|
|
46
|
-
stack: {
|
|
47
|
-
slides: StoreState['ui']['slides'];
|
|
48
|
-
validateButton: {
|
|
49
|
-
label: string;
|
|
50
|
-
disabled: boolean;
|
|
51
|
-
onClick: Function;
|
|
52
|
-
};
|
|
53
|
-
correctionPopinProps?: CorrectionPopinProps;
|
|
54
|
-
endReview: boolean;
|
|
55
|
-
};
|
|
56
|
-
reviewBackgroundAriaLabel?: string;
|
|
57
|
-
congratsProps?: {
|
|
58
|
-
'aria-label'?: string;
|
|
59
|
-
'data-name'?: string;
|
|
60
|
-
animationLottie: any;
|
|
61
|
-
title: string;
|
|
62
|
-
cardCongratsStar: any;
|
|
63
|
-
cardCongratsRank: any;
|
|
64
|
-
buttonRevising: {
|
|
65
|
-
'aria-label'?: string;
|
|
66
|
-
label: string;
|
|
67
|
-
onClick: Function;
|
|
68
|
-
type: string;
|
|
69
|
-
};
|
|
70
|
-
buttonRevisingSkill: {
|
|
71
|
-
'aria-label'?: string;
|
|
72
|
-
label: string;
|
|
73
|
-
onClick: Function;
|
|
74
|
-
type: string;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
type SlidesViewDispatcherProps = Omit<Dispatchers, 'navigateTo' | 'navigateBack'>;
|
|
80
|
-
|
|
81
|
-
type SlidesViewProps = SlidesViewStaticProps & SlidesViewDispatcherProps;
|
|
82
|
-
|
|
83
|
-
export {
|
|
84
|
-
CorrectionPopinProps,
|
|
85
|
-
IconValue,
|
|
86
|
-
SlidesViewStaticProps,
|
|
87
|
-
SlidesViewDispatcherProps,
|
|
88
|
-
SlidesViewProps,
|
|
89
|
-
StepItem
|
|
90
|
-
};
|
/package/es/{helpers/test/map-api-slide-to-ui.test.d.ts → actions/api/test/fetch-skills.test.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|