@coorpacademy/app-review 0.1.14 → 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 +27 -4
- package/es/actions/api/post-progression.d.ts +4 -6
- package/es/actions/api/post-progression.js +13 -9
- 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.js +102 -0
- package/es/actions/index.d.ts +1 -10
- package/es/actions/ui/answers.d.ts +7 -0
- package/es/actions/ui/answers.js +7 -0
- package/es/actions/ui/is-fetching.js +0 -2
- package/es/actions/ui/slides.d.ts +26 -0
- package/es/actions/ui/slides.js +9 -0
- package/es/common/index.d.ts +3 -1
- package/es/common/index.js +3 -1
- package/es/fixtures/qcm-slide.d.ts +2 -2
- package/es/fixtures/temp-fixture.d.ts +2 -2
- package/es/index.js +22 -92
- package/es/reducers/data/index.d.ts +2 -2
- package/es/reducers/data/progression.d.ts +3 -16
- package/es/reducers/data/progression.js +3 -22
- package/es/reducers/data/slides.d.ts +5 -6
- package/es/reducers/data/slides.js +9 -108
- package/es/reducers/data/test/progression.test.js +38 -0
- package/es/reducers/data/test/skills.test.js +12 -0
- package/es/reducers/data/test/slides.test.js +20 -0
- package/es/reducers/data/test/token.test.js +11 -0
- package/es/reducers/index.d.ts +3 -4
- package/es/reducers/ui/answers.d.ts +4 -0
- package/es/reducers/ui/{review-status.js → answers.js} +3 -3
- package/es/reducers/ui/current-slide-ref.d.ts +4 -0
- package/es/reducers/ui/current-slide-ref.js +13 -0
- package/es/reducers/ui/index.d.ts +7 -10
- package/es/reducers/ui/index.js +4 -6
- 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 +14 -4
- package/es/test/util/services.mock.js +46 -4
- package/es/types/common.d.ts +61 -30
- package/es/types/common.js +0 -5
- package/es/types/slides.d.ts +0 -4
- package/{lib/types/views/skills.d.ts → es/views/skills/index.d.ts} +2 -0
- package/es/views/skills/index.js +25 -0
- package/es/views/slides/index.d.ts +79 -0
- package/es/views/slides/index.js +151 -0
- 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/es/views/slides/test/fixtures/free-text.d.ts +3 -0
- package/es/views/slides/test/fixtures/free-text.js +38 -0
- package/es/views/slides/test/fixtures/qcm-drag.d.ts +3 -0
- package/es/views/slides/test/fixtures/qcm-drag.js +108 -0
- package/es/views/slides/test/fixtures/qcm-graphic.d.ts +3 -0
- package/es/views/slides/test/fixtures/qcm-graphic.js +88 -0
- package/es/views/slides/test/fixtures/qcm.d.ts +3 -0
- package/es/{helpers → views/slides}/test/fixtures/qcm.js +37 -27
- package/es/views/slides/test/fixtures/select-template.d.ts +3 -0
- package/es/views/slides/test/fixtures/select-template.js +92 -0
- package/es/views/slides/test/fixtures/slider.d.ts +3 -0
- package/es/views/slides/test/fixtures/slider.js +36 -0
- package/es/views/slides/test/fixtures/text-template.d.ts +3 -0
- package/es/{helpers → views/slides}/test/fixtures/text-template.js +21 -11
- 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 +75 -7
- package/lib/actions/api/post-progression.d.ts +4 -6
- package/lib/actions/api/post-progression.js +63 -10
- 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/index.d.ts +1 -10
- package/lib/actions/ui/answers.d.ts +7 -0
- package/lib/actions/ui/answers.js +9 -0
- package/lib/actions/ui/is-fetching.js +0 -2
- package/lib/actions/ui/slides.d.ts +26 -0
- package/lib/actions/ui/slides.js +9 -0
- package/lib/common/index.d.ts +3 -1
- package/lib/common/index.js +3 -1
- package/lib/fixtures/qcm-slide.d.ts +2 -2
- package/lib/fixtures/temp-fixture.d.ts +2 -2
- package/lib/index.js +33 -94
- package/lib/reducers/data/index.d.ts +2 -2
- package/lib/reducers/data/progression.d.ts +3 -16
- package/lib/reducers/data/progression.js +3 -22
- package/lib/reducers/data/slides.d.ts +5 -6
- package/lib/reducers/data/slides.js +9 -114
- 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 +3 -4
- package/lib/reducers/ui/answers.d.ts +4 -0
- package/lib/reducers/ui/{review-status.js → answers.js} +3 -3
- package/lib/reducers/ui/current-slide-ref.d.ts +4 -0
- package/lib/reducers/ui/current-slide-ref.js +14 -0
- package/lib/reducers/ui/index.d.ts +7 -10
- package/lib/reducers/ui/index.js +4 -6
- 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 +14 -4
- package/lib/test/util/services.mock.js +46 -4
- package/lib/types/common.d.ts +61 -30
- package/lib/types/common.js +0 -5
- package/lib/types/slides.d.ts +0 -4
- package/{es/types/views/skills.d.ts → lib/views/skills/index.d.ts} +2 -0
- package/lib/views/skills/index.js +25 -0
- package/lib/views/slides/index.d.ts +79 -0
- package/lib/views/slides/index.js +155 -0
- 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/lib/views/slides/test/fixtures/free-text.d.ts +3 -0
- package/lib/views/slides/test/fixtures/free-text.js +38 -0
- package/lib/views/slides/test/fixtures/qcm-drag.d.ts +3 -0
- package/lib/views/slides/test/fixtures/qcm-drag.js +108 -0
- package/lib/views/slides/test/fixtures/qcm-graphic.d.ts +3 -0
- package/lib/views/slides/test/fixtures/qcm-graphic.js +88 -0
- package/lib/views/slides/test/fixtures/qcm.d.ts +3 -0
- package/lib/{helpers → views/slides}/test/fixtures/qcm.js +37 -27
- package/lib/views/slides/test/fixtures/select-template.d.ts +3 -0
- package/lib/views/slides/test/fixtures/select-template.js +92 -0
- package/lib/views/slides/test/fixtures/slider.d.ts +3 -0
- package/lib/views/slides/test/fixtures/slider.js +36 -0
- package/lib/views/slides/test/fixtures/text-template.d.ts +3 -0
- package/lib/{helpers → views/slides}/test/fixtures/text-template.js +21 -11
- 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 +4 -3
- package/src/actions/api/fetch-skills.ts +12 -12
- package/src/actions/api/fetch-slide.ts +38 -13
- package/src/actions/api/post-progression.ts +18 -22
- 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/index.ts +1 -10
- package/src/actions/ui/answers.ts +16 -0
- package/src/actions/ui/is-fetching.ts +0 -6
- package/src/actions/ui/slides.ts +35 -0
- package/src/common/index.ts +7 -1
- package/src/fixtures/qcm-slide.ts +2 -2
- package/src/fixtures/temp-fixture.ts +2 -2
- package/src/index.tsx +26 -110
- package/src/reducers/data/index.ts +1 -1
- package/src/reducers/data/progression.ts +5 -40
- package/src/reducers/data/slides.ts +17 -125
- 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/current-slide-ref.ts +19 -0
- package/src/reducers/ui/index.ts +6 -9
- 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 +14 -4
- package/src/test/util/services.mock.ts +46 -4
- package/src/types/common.ts +77 -40
- package/src/types/slides.ts +0 -5
- package/src/views/skills/index.ts +56 -0
- package/src/views/slides/index.ts +251 -0
- 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 +43 -33
- 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 +23 -14
- package/src/{helpers → views/slides}/test/map-api-slide-to-ui.test.ts +22 -20
- package/es/actions/data/slides.d.ts +0 -37
- package/es/actions/data/slides.js +0 -16
- package/es/actions/ui/finished-slides.d.ts +0 -10
- package/es/actions/ui/finished-slides.js +0 -8
- package/es/actions/ui/review-status.d.ts +0 -7
- package/es/actions/ui/review-status.js +0 -7
- package/es/actions/ui/step-items.d.ts +0 -24
- package/es/actions/ui/step-items.js +0 -11
- package/es/helpers/map-api-slide-to-ui.d.ts +0 -8
- package/es/helpers/map-api-slide-to-ui.js +0 -175
- package/es/helpers/test/fixtures/free-text.d.ts +0 -4
- package/es/helpers/test/fixtures/free-text.js +0 -24
- package/es/helpers/test/fixtures/qcm-drag.d.ts +0 -4
- package/es/helpers/test/fixtures/qcm-drag.js +0 -106
- package/es/helpers/test/fixtures/qcm-graphic.d.ts +0 -4
- package/es/helpers/test/fixtures/qcm-graphic.js +0 -70
- package/es/helpers/test/fixtures/qcm.d.ts +0 -4
- package/es/helpers/test/fixtures/select-template.d.ts +0 -4
- package/es/helpers/test/fixtures/select-template.js +0 -88
- package/es/helpers/test/fixtures/slider.d.ts +0 -4
- package/es/helpers/test/fixtures/slider.js +0 -27
- package/es/helpers/test/fixtures/text-template.d.ts +0 -4
- package/es/reducers/ui/finished-slides.d.ts +0 -7
- package/es/reducers/ui/finished-slides.js +0 -33
- package/es/reducers/ui/review-status.d.ts +0 -4
- package/es/reducers/ui/step-items.d.ts +0 -14
- package/es/reducers/ui/step-items.js +0 -74
- package/es/types/ui-progression.d.ts +0 -10
- package/es/types/views/slides.d.ts +0 -60
- package/lib/actions/data/slides.d.ts +0 -37
- package/lib/actions/data/slides.js +0 -16
- package/lib/actions/ui/finished-slides.d.ts +0 -10
- package/lib/actions/ui/finished-slides.js +0 -8
- package/lib/actions/ui/review-status.d.ts +0 -7
- package/lib/actions/ui/review-status.js +0 -7
- package/lib/actions/ui/step-items.d.ts +0 -24
- package/lib/actions/ui/step-items.js +0 -11
- package/lib/helpers/map-api-slide-to-ui.d.ts +0 -8
- package/lib/helpers/map-api-slide-to-ui.js +0 -181
- package/lib/helpers/test/fixtures/free-text.d.ts +0 -4
- package/lib/helpers/test/fixtures/free-text.js +0 -24
- package/lib/helpers/test/fixtures/qcm-drag.d.ts +0 -4
- package/lib/helpers/test/fixtures/qcm-drag.js +0 -106
- package/lib/helpers/test/fixtures/qcm-graphic.d.ts +0 -4
- package/lib/helpers/test/fixtures/qcm-graphic.js +0 -70
- package/lib/helpers/test/fixtures/qcm.d.ts +0 -4
- package/lib/helpers/test/fixtures/select-template.d.ts +0 -4
- package/lib/helpers/test/fixtures/select-template.js +0 -88
- package/lib/helpers/test/fixtures/slider.d.ts +0 -4
- package/lib/helpers/test/fixtures/slider.js +0 -27
- package/lib/helpers/test/fixtures/text-template.d.ts +0 -4
- package/lib/reducers/ui/finished-slides.d.ts +0 -7
- package/lib/reducers/ui/finished-slides.js +0 -45
- package/lib/reducers/ui/review-status.d.ts +0 -4
- package/lib/reducers/ui/step-items.d.ts +0 -14
- package/lib/reducers/ui/step-items.js +0 -86
- package/lib/types/ui-progression.d.ts +0 -10
- package/lib/types/views/slides.d.ts +0 -60
- package/src/actions/data/slides.ts +0 -65
- package/src/actions/ui/finished-slides.ts +0 -21
- package/src/actions/ui/review-status.ts +0 -19
- package/src/actions/ui/step-items.ts +0 -45
- package/src/helpers/map-api-slide-to-ui.ts +0 -253
- package/src/helpers/test/fixtures/free-text.ts +0 -28
- package/src/helpers/test/fixtures/qcm-drag.ts +0 -110
- package/src/helpers/test/fixtures/qcm-graphic.ts +0 -74
- package/src/helpers/test/fixtures/select-template.ts +0 -92
- package/src/helpers/test/fixtures/slider.ts +0 -31
- package/src/reducers/ui/finished-slides.ts +0 -52
- package/src/reducers/ui/review-status.ts +0 -19
- package/src/reducers/ui/step-items.ts +0 -116
- package/src/types/ui-progression.ts +0 -25
- package/src/types/views/skills.ts +0 -27
- package/src/types/views/slides.ts +0 -65
- /package/es/{helpers/test/map-api-slide-to-ui.test.d.ts → actions/api/test/fetch-skills.test.d.ts} +0 -0
- /package/es/{types/ui-progression.js → actions/api/test/fetch-slide.test.d.ts} +0 -0
- /package/es/{types/views/skills.js → actions/api/test/post-progression.test.d.ts} +0 -0
- /package/es/{types/views/slides.js → reducers/data/test/progression.test.d.ts} +0 -0
- /package/{lib/helpers/test/map-api-slide-to-ui.test.d.ts → es/reducers/data/test/skills.test.d.ts} +0 -0
- /package/{lib/types/ui-progression.js → es/reducers/data/test/slides.test.d.ts} +0 -0
- /package/{lib/types/views/skills.js → es/reducers/data/test/token.test.d.ts} +0 -0
- /package/{lib/types/views/slides.js → es/reducers/ui/test/answers.test.d.ts} +0 -0
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import noop from 'lodash/fp/noop';
|
|
2
|
-
export var selectTemplateSlide = {
|
|
3
|
-
id: 'sli_410xZQxrZ',
|
|
4
|
-
universalRef: 'sli_410xZQxrZ',
|
|
5
|
-
question: {
|
|
6
|
-
type: 'template',
|
|
7
|
-
header: 'sli_410xZQxrZ.header',
|
|
8
|
-
explanation: 'sli_410xZQxrZ.explanation',
|
|
9
|
-
content: {
|
|
10
|
-
template: 'sli_410xZQxrZ.template',
|
|
11
|
-
choices: [
|
|
12
|
-
{
|
|
13
|
-
media: {
|
|
14
|
-
src: [],
|
|
15
|
-
posters: [],
|
|
16
|
-
subtitles: []
|
|
17
|
-
},
|
|
18
|
-
_id: '5fdce726359bf4003ee66967',
|
|
19
|
-
type: 'select',
|
|
20
|
-
name: 'sel36665',
|
|
21
|
-
items: [
|
|
22
|
-
{
|
|
23
|
-
_id: '5fdce726359bf4003ee66968',
|
|
24
|
-
text: 'sli_410xZQxrZ.choice_4yeA4Z7lr~',
|
|
25
|
-
value: 'sli_410xZQxrZ.choice_4yeA4Z7lr~'
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
_id: '5fdce726359bf4003ee66969',
|
|
29
|
-
text: 'sli_410xZQxrZ.choice_VJWCN~mgB~',
|
|
30
|
-
value: 'sli_410xZQxrZ.choice_VJWCN~mgB~'
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
_id: '5fdce726359bf4003ee6696a',
|
|
34
|
-
text: 'sli_410xZQxrZ.choice_VkaH~XgBb',
|
|
35
|
-
value: 'sli_410xZQxrZ.choice_VkaH~XgBb'
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
_id: '5fdce726359bf4003ee6696b',
|
|
39
|
-
text: 'sli_410xZQxrZ.choice_E1uUWXeBb',
|
|
40
|
-
value: 'sli_410xZQxrZ.choice_E1uUWXeBb'
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
clue: 'sli_410xZQxrZ.clue',
|
|
48
|
-
klf: 'sli_410xZQxrZ.klf',
|
|
49
|
-
tips: 'sli_410xZQxrZ.tips'
|
|
50
|
-
};
|
|
51
|
-
export var selectTemplateUISlide = {
|
|
52
|
-
type: 'template',
|
|
53
|
-
template: 'sli_410xZQxrZ.template',
|
|
54
|
-
answers: [
|
|
55
|
-
{
|
|
56
|
-
type: 'select',
|
|
57
|
-
name: 'sel36665',
|
|
58
|
-
onChange: noop,
|
|
59
|
-
options: [
|
|
60
|
-
{ name: 'Select an answer', value: '', validOption: false, selected: true },
|
|
61
|
-
{
|
|
62
|
-
name: 'sli_410xZQxrZ.choice_4yeA4Z7lr~',
|
|
63
|
-
value: 'sli_410xZQxrZ.choice_4yeA4Z7lr~',
|
|
64
|
-
validOption: true,
|
|
65
|
-
selected: false
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: 'sli_410xZQxrZ.choice_VJWCN~mgB~',
|
|
69
|
-
value: 'sli_410xZQxrZ.choice_VJWCN~mgB~',
|
|
70
|
-
validOption: true,
|
|
71
|
-
selected: false
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
name: 'sli_410xZQxrZ.choice_VkaH~XgBb',
|
|
75
|
-
value: 'sli_410xZQxrZ.choice_VkaH~XgBb',
|
|
76
|
-
validOption: true,
|
|
77
|
-
selected: false
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: 'sli_410xZQxrZ.choice_E1uUWXeBb',
|
|
81
|
-
value: 'sli_410xZQxrZ.choice_E1uUWXeBb',
|
|
82
|
-
validOption: true,
|
|
83
|
-
selected: false
|
|
84
|
-
}
|
|
85
|
-
]
|
|
86
|
-
}
|
|
87
|
-
]
|
|
88
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import noop from 'lodash/fp/noop';
|
|
2
|
-
export var sliderSlide = {
|
|
3
|
-
id: 'sli_41D5AovN~',
|
|
4
|
-
universalRef: 'sli_41D5AovN~',
|
|
5
|
-
question: {
|
|
6
|
-
type: 'slider',
|
|
7
|
-
header: 'sli_41D5AovN~.header',
|
|
8
|
-
explanation: 'sli_41D5AovN~.explanation',
|
|
9
|
-
content: {
|
|
10
|
-
min: 1,
|
|
11
|
-
max: 10,
|
|
12
|
-
unitLabel: 'sli_41D5AovN~.unitLabel'
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
clue: 'sli_41D5AovN~.clue',
|
|
16
|
-
klf: 'sli_41D5AovN~.klf',
|
|
17
|
-
tips: 'sli_41D5AovN~.tips'
|
|
18
|
-
};
|
|
19
|
-
export var sliderUISlide = {
|
|
20
|
-
type: 'slider',
|
|
21
|
-
placeholder: 'sli_41D5AovN~.explanation',
|
|
22
|
-
minLabel: '1 undefined',
|
|
23
|
-
maxLabel: '10 undefined',
|
|
24
|
-
title: '0 sli_41D5AovN~.unitLabel',
|
|
25
|
-
value: -0.1111111111111111,
|
|
26
|
-
onChange: noop
|
|
27
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { UpdateFinishedSlides } from '../../actions/ui/finished-slides';
|
|
2
|
-
export declare type FinishedSlidesState = {
|
|
3
|
-
slideNumbers: number[];
|
|
4
|
-
[key: number]: true;
|
|
5
|
-
};
|
|
6
|
-
declare const reducer: (state: FinishedSlidesState | undefined, action: UpdateFinishedSlides) => FinishedSlidesState;
|
|
7
|
-
export default reducer;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import forEach from 'lodash/fp/forEach';
|
|
13
|
-
import { UPDATE_FINISHED_SLIDES } from '../../actions/ui/finished-slides';
|
|
14
|
-
import { slideNumbers } from '../../common';
|
|
15
|
-
var initialState = {
|
|
16
|
-
slideNumbers: slideNumbers
|
|
17
|
-
};
|
|
18
|
-
var _forEach = forEach.convert({
|
|
19
|
-
cap: false
|
|
20
|
-
});
|
|
21
|
-
// -----------------------------------------------------------------------------
|
|
22
|
-
var reducer = function (
|
|
23
|
-
// eslint-disable-next-line default-param-last
|
|
24
|
-
state, action) {
|
|
25
|
-
if (state === void 0) { state = initialState; }
|
|
26
|
-
switch (action.type) {
|
|
27
|
-
case UPDATE_FINISHED_SLIDES: {
|
|
28
|
-
var _slideNumbers = state.slideNumbers, rest = __rest(state, ["slideNumbers"]);
|
|
29
|
-
var _a = action.payload, slideNumber = _a.slideNumber, value = _a.value;
|
|
30
|
-
var _state_1 = {
|
|
31
|
-
slideNumbers: _slideNumbers
|
|
32
|
-
};
|
|
33
|
-
_forEach(function (finishedSlide, index) {
|
|
34
|
-
var previousValue = finishedSlide;
|
|
35
|
-
_state_1[index] = previousValue;
|
|
36
|
-
}, rest);
|
|
37
|
-
_state_1[slideNumber] = value;
|
|
38
|
-
return _state_1;
|
|
39
|
-
}
|
|
40
|
-
default:
|
|
41
|
-
return state;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
// -----------------------------------------------------------------------------
|
|
45
|
-
export default reducer;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { UpdateReviewStatus } from '../../actions/ui/review-status';
|
|
2
|
-
export declare type ReviewStatusState = 'finished' | 'ongoing';
|
|
3
|
-
declare const reducer: (state: ReviewStatusState | undefined, action: UpdateReviewStatus) => ReviewStatusState;
|
|
4
|
-
export default reducer;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IconValue } from '../../types/common';
|
|
2
|
-
import { StepItemsAction } from '../../actions/ui/step-items';
|
|
3
|
-
export declare type StepItem = {
|
|
4
|
-
current: boolean;
|
|
5
|
-
icon: IconValue;
|
|
6
|
-
value: string;
|
|
7
|
-
};
|
|
8
|
-
export declare type StepItemsState = {
|
|
9
|
-
slideNumbers: number[];
|
|
10
|
-
[key: number]: StepItem;
|
|
11
|
-
};
|
|
12
|
-
export declare const initialState: StepItemsState;
|
|
13
|
-
declare const reducer: (state: StepItemsState | undefined, action: StepItemsAction) => StepItemsState;
|
|
14
|
-
export default reducer;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import get from 'lodash/fp/get';
|
|
13
|
-
import has from 'lodash/fp/has';
|
|
14
|
-
import map from 'lodash/fp/map';
|
|
15
|
-
import { UPDATE_STEP_ITEMS_ON_NEXT, UPDATE_STEP_ITEMS_ON_VALIDATION } from '../../actions/ui/step-items';
|
|
16
|
-
import { HIGHEST_INDEX, slideNumbers, TOTAL_SLIDES_STACK } from '../../common';
|
|
17
|
-
var getInitialState = function () {
|
|
18
|
-
var state = {
|
|
19
|
-
slideNumbers: slideNumbers
|
|
20
|
-
};
|
|
21
|
-
// eslint-disable-next-line fp/no-loops
|
|
22
|
-
for (var index = 0; index < TOTAL_SLIDES_STACK; index++) {
|
|
23
|
-
var current = index === 0;
|
|
24
|
-
state[index] = { current: current, value: "".concat(index + 1), icon: 'no-answer' };
|
|
25
|
-
}
|
|
26
|
-
return state;
|
|
27
|
-
};
|
|
28
|
-
export var initialState = getInitialState();
|
|
29
|
-
// -----------------------------------------------------------------------------
|
|
30
|
-
// ||-------> aux function, finds the next consecutive index
|
|
31
|
-
// to loop from 0 to HIGHEST_INDEX (4) & again to 0
|
|
32
|
-
var getNextIndex = function (currentIndex) {
|
|
33
|
-
return currentIndex === HIGHEST_INDEX ? 0 : currentIndex + 1;
|
|
34
|
-
};
|
|
35
|
-
// ||-------> calculates which should be the next step to visit (as there can be already answered slides &&
|
|
36
|
-
// they have to be skipped)
|
|
37
|
-
var calculateNextStepIndex = function (currentStepNumber, finishedSlides, lastVisitedIndex) {
|
|
38
|
-
if (lastVisitedIndex === void 0) { lastVisitedIndex = -1; }
|
|
39
|
-
// only one slide remaining, the step should stay on the same number
|
|
40
|
-
if (lastVisitedIndex === currentStepNumber) {
|
|
41
|
-
return currentStepNumber;
|
|
42
|
-
}
|
|
43
|
-
var indexToVisit = getNextIndex(lastVisitedIndex === -1 ? currentStepNumber : lastVisitedIndex);
|
|
44
|
-
// if the index is already included in the correctly answered (finished) slides, then we proceed to check for the next one
|
|
45
|
-
return has(indexToVisit, finishedSlides)
|
|
46
|
-
? calculateNextStepIndex(currentStepNumber, finishedSlides, indexToVisit)
|
|
47
|
-
: indexToVisit;
|
|
48
|
-
};
|
|
49
|
-
var recalculateStepItemsState = function (state, stepNumber, stepItemToUpdateProps) {
|
|
50
|
-
var nextIndex = get('nextIndex', stepItemToUpdateProps);
|
|
51
|
-
var _state = {
|
|
52
|
-
slideNumbers: slideNumbers
|
|
53
|
-
};
|
|
54
|
-
// eslint-disable-next-line lodash-fp/no-unused-result
|
|
55
|
-
map(function (index) {
|
|
56
|
-
var previousValue = state[index];
|
|
57
|
-
if (stepNumber === index)
|
|
58
|
-
_state[stepNumber] = __assign(__assign({}, previousValue), stepItemToUpdateProps);
|
|
59
|
-
/* only for UPDATE_STEP_ITEMS_ON_NEXT -> */ else if (nextIndex === index) {
|
|
60
|
-
_state[index] = __assign(__assign({}, previousValue), { current: true });
|
|
61
|
-
}
|
|
62
|
-
else
|
|
63
|
-
_state[index] = previousValue;
|
|
64
|
-
}, state.slideNumbers);
|
|
65
|
-
return _state;
|
|
66
|
-
};
|
|
67
|
-
// -----------------------------------------------------------------------------
|
|
68
|
-
// eslint-disable-next-line default-param-last
|
|
69
|
-
var reducer = function (state, action) {
|
|
70
|
-
if (state === void 0) { state = initialState; }
|
|
71
|
-
switch (action.type) {
|
|
72
|
-
case UPDATE_STEP_ITEMS_ON_VALIDATION: {
|
|
73
|
-
var _a = action.payload, stepNumber = _a.stepNumber, icon = _a.icon;
|
|
74
|
-
return recalculateStepItemsState(state, stepNumber, { icon: icon });
|
|
75
|
-
}
|
|
76
|
-
case UPDATE_STEP_ITEMS_ON_NEXT: {
|
|
77
|
-
var _b = action.payload, stepNumber = _b.stepNumber, finishedSlides = _b.finishedSlides, current = _b.current;
|
|
78
|
-
var nextIndex = !current ? calculateNextStepIndex(stepNumber, finishedSlides) : -1;
|
|
79
|
-
return recalculateStepItemsState(state, stepNumber, { current: current, nextIndex: nextIndex });
|
|
80
|
-
}
|
|
81
|
-
default:
|
|
82
|
-
return state;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
// -----------------------------------------------------------------------------
|
|
86
|
-
export default reducer;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { StoreState } from '../../reducers';
|
|
2
|
-
import { Dispatchers } from '../../actions';
|
|
3
|
-
declare type SlidesViewStaticProps = {
|
|
4
|
-
slides: StoreState['data']['slides'];
|
|
5
|
-
headerProps: {
|
|
6
|
-
mode: string;
|
|
7
|
-
skillName: string;
|
|
8
|
-
onQuitClick: Function;
|
|
9
|
-
'aria-label'?: string;
|
|
10
|
-
closeButtonAriaLabel: string;
|
|
11
|
-
};
|
|
12
|
-
finishedSlides: StoreState['ui']['finishedSlides'];
|
|
13
|
-
stepItems: StoreState['ui']['stepItems'];
|
|
14
|
-
reviewStatus: StoreState['ui']['reviewStatus'];
|
|
15
|
-
validate: {
|
|
16
|
-
label: string;
|
|
17
|
-
};
|
|
18
|
-
congratsProps?: {
|
|
19
|
-
'aria-label'?: string;
|
|
20
|
-
'data-name'?: string;
|
|
21
|
-
animationLottie: any;
|
|
22
|
-
title: string;
|
|
23
|
-
cardCongratsStar: any;
|
|
24
|
-
cardCongratsRank: any;
|
|
25
|
-
buttonRevising: {
|
|
26
|
-
'aria-label'?: string;
|
|
27
|
-
label: string;
|
|
28
|
-
onClick: Function;
|
|
29
|
-
type: string;
|
|
30
|
-
};
|
|
31
|
-
buttonRevisingSkill: {
|
|
32
|
-
'aria-label'?: string;
|
|
33
|
-
label: string;
|
|
34
|
-
onClick: Function;
|
|
35
|
-
type: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
correctionPopinProps?: {
|
|
39
|
-
klf: {
|
|
40
|
-
label: string;
|
|
41
|
-
onClick: Function;
|
|
42
|
-
tooltip: string;
|
|
43
|
-
};
|
|
44
|
-
information: {
|
|
45
|
-
label: string;
|
|
46
|
-
message: string;
|
|
47
|
-
};
|
|
48
|
-
next: {
|
|
49
|
-
label: string;
|
|
50
|
-
ariaLabel: string;
|
|
51
|
-
};
|
|
52
|
-
successLabel: string;
|
|
53
|
-
failureLabel: string;
|
|
54
|
-
};
|
|
55
|
-
reviewBackgroundAriaLabel?: string;
|
|
56
|
-
progression: StoreState['data']['progression'];
|
|
57
|
-
};
|
|
58
|
-
declare type SlidesViewDispatcherProps = Omit<Dispatchers, 'navigateTo' | 'navigateBack'>;
|
|
59
|
-
declare type SlidesViewProps = SlidesViewStaticProps & SlidesViewDispatcherProps;
|
|
60
|
-
export { SlidesViewStaticProps, SlidesViewDispatcherProps, SlidesViewProps };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import {UISlide} from '../../types/slides';
|
|
2
|
-
import {ReceivedSlide} from '../api/fetch-slide';
|
|
3
|
-
|
|
4
|
-
// -----------------------------------------------------------------------------
|
|
5
|
-
|
|
6
|
-
export const UPDATE_SLIDES_ON_VALIDATION = '@@slide/UPDATE_SLIDES_ON_VALIDATION';
|
|
7
|
-
export const UPDATE_SLIDES_ON_NEXT = '@@slide/UPDATE_SLIDES_ON_NEXT';
|
|
8
|
-
export const VALIDATE_SLIDE = '@@slide/VALIDATE';
|
|
9
|
-
|
|
10
|
-
// -----------------------------------------------------------------------------
|
|
11
|
-
|
|
12
|
-
type SlideUIAnimations = 'unstack' | 'restack';
|
|
13
|
-
|
|
14
|
-
export type Slide = UISlide & {
|
|
15
|
-
hidden?: boolean;
|
|
16
|
-
position: number;
|
|
17
|
-
animationType?: SlideUIAnimations;
|
|
18
|
-
isCorrect?: boolean;
|
|
19
|
-
endReview?: boolean;
|
|
20
|
-
nextContent?: Omit<Slide, 'endReview' | 'hidden' | 'position' | 'nextContent'>;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
// TODO: complete or modify typing as needed on Fetch Slide ticket
|
|
24
|
-
export type ValidationPayload = {
|
|
25
|
-
slideNumber: number;
|
|
26
|
-
newSlideContent: Slide;
|
|
27
|
-
numberOfFinishedSlides: number;
|
|
28
|
-
nextContent: Slide;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export type OnNextPayload = Omit<ValidationPayload, 'nextContent'>;
|
|
32
|
-
|
|
33
|
-
// -----------------------------------------------------------------------------
|
|
34
|
-
|
|
35
|
-
export type UpdateSlidesOnValidation = {
|
|
36
|
-
type: typeof UPDATE_SLIDES_ON_VALIDATION;
|
|
37
|
-
payload: ValidationPayload;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export type UpdateSlidesOnNext = {
|
|
41
|
-
type: typeof UPDATE_SLIDES_ON_NEXT;
|
|
42
|
-
payload: OnNextPayload;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export type ValidateSlide = {
|
|
46
|
-
type: typeof VALIDATE_SLIDE;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export type SlidesAction = ReceivedSlide | UpdateSlidesOnValidation | UpdateSlidesOnNext;
|
|
50
|
-
|
|
51
|
-
// -----------------------------------------------------------------------------
|
|
52
|
-
|
|
53
|
-
export const updateSlidesOnValidation = (payload: ValidationPayload): UpdateSlidesOnValidation => ({
|
|
54
|
-
type: UPDATE_SLIDES_ON_VALIDATION,
|
|
55
|
-
payload
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
export const updateSlidesOnNext = (payload: OnNextPayload): UpdateSlidesOnNext => ({
|
|
59
|
-
type: UPDATE_SLIDES_ON_NEXT,
|
|
60
|
-
payload
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
export const validateSlide = (): ValidateSlide => ({
|
|
64
|
-
type: VALIDATE_SLIDE
|
|
65
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// Stores only successful slides
|
|
2
|
-
|
|
3
|
-
export type FinishedSlide = {slideNumber: number; value: true};
|
|
4
|
-
|
|
5
|
-
// -----------------------------------------------------------------------------
|
|
6
|
-
|
|
7
|
-
export const UPDATE_FINISHED_SLIDES = '@@finished-slides/UPDATE_FINISHED_SLIDES';
|
|
8
|
-
|
|
9
|
-
// -----------------------------------------------------------------------------
|
|
10
|
-
|
|
11
|
-
export type UpdateFinishedSlides = {
|
|
12
|
-
type: typeof UPDATE_FINISHED_SLIDES;
|
|
13
|
-
payload: FinishedSlide;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
// -----------------------------------------------------------------------------
|
|
17
|
-
|
|
18
|
-
export const updateFinishedSlides = (payload: FinishedSlide): UpdateFinishedSlides => ({
|
|
19
|
-
type: UPDATE_FINISHED_SLIDES,
|
|
20
|
-
payload
|
|
21
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// -----------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
export const UPDATE_REVIEW_STATUS = '@@review-status/UPDATE_REVIEW_STATUS';
|
|
4
|
-
|
|
5
|
-
// -----------------------------------------------------------------------------
|
|
6
|
-
|
|
7
|
-
export type FinishedStatus = 'finished';
|
|
8
|
-
|
|
9
|
-
export type UpdateReviewStatus = {
|
|
10
|
-
type: typeof UPDATE_REVIEW_STATUS;
|
|
11
|
-
payload: FinishedStatus;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
// -----------------------------------------------------------------------------
|
|
15
|
-
|
|
16
|
-
export const updateReviewStatus = (payload: FinishedStatus): UpdateReviewStatus => ({
|
|
17
|
-
type: UPDATE_REVIEW_STATUS,
|
|
18
|
-
payload
|
|
19
|
-
});
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import {FinishedSlides, IconValue} from '../../types/common';
|
|
2
|
-
|
|
3
|
-
export const UPDATE_STEP_ITEMS_ON_VALIDATION = '@@step-items/UPDATE_STEP_ITEMS_ON_VALIDATION';
|
|
4
|
-
export const UPDATE_STEP_ITEMS_ON_NEXT = '@@step-items/UPDATE_STEP_ITEMS_ON_NEXT';
|
|
5
|
-
|
|
6
|
-
type UpdateStepItemsOnValidationClickPayload = {
|
|
7
|
-
stepNumber: number;
|
|
8
|
-
icon: IconValue;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
type UpdateStepItemsOnNextClickPayload = {
|
|
12
|
-
stepNumber: number;
|
|
13
|
-
finishedSlides: FinishedSlides;
|
|
14
|
-
current: boolean;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// -----------------------------------------------------------------------------
|
|
18
|
-
|
|
19
|
-
export type UpdateStepItemsOnValidation = {
|
|
20
|
-
type: typeof UPDATE_STEP_ITEMS_ON_VALIDATION;
|
|
21
|
-
payload: UpdateStepItemsOnValidationClickPayload;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type UpdateStepItemsOnNext = {
|
|
25
|
-
type: typeof UPDATE_STEP_ITEMS_ON_NEXT;
|
|
26
|
-
payload: UpdateStepItemsOnNextClickPayload;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export type StepItemsAction = UpdateStepItemsOnValidation | UpdateStepItemsOnNext;
|
|
30
|
-
|
|
31
|
-
// -----------------------------------------------------------------------------
|
|
32
|
-
|
|
33
|
-
export const updateStepItemsOnValidation = (
|
|
34
|
-
payload: UpdateStepItemsOnValidationClickPayload
|
|
35
|
-
): UpdateStepItemsOnValidation => ({
|
|
36
|
-
type: UPDATE_STEP_ITEMS_ON_VALIDATION,
|
|
37
|
-
payload
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
export const updateStepItemsOnNext = (
|
|
41
|
-
payload: UpdateStepItemsOnNextClickPayload
|
|
42
|
-
): UpdateStepItemsOnNext => ({
|
|
43
|
-
type: UPDATE_STEP_ITEMS_ON_NEXT,
|
|
44
|
-
payload
|
|
45
|
-
});
|