@coorpacademy/app-review 0.1.8 → 0.1.10
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 +8 -5
- package/es/actions/api/fetch-slide.d.ts +8 -5
- package/es/actions/api/post-progression.d.ts +8 -5
- package/es/actions/ui/navigation.d.ts +1 -1
- package/es/fixtures/qcm-slide.js +1 -1
- package/es/helpers/map-api-slide-to-ui.d.ts +8 -0
- package/es/helpers/map-api-slide-to-ui.js +175 -0
- package/es/helpers/test/fixtures/free-text.d.ts +4 -0
- package/es/helpers/test/fixtures/free-text.js +24 -0
- package/es/helpers/test/fixtures/qcm-drag.d.ts +4 -0
- package/es/helpers/test/fixtures/qcm-drag.js +106 -0
- package/es/helpers/test/fixtures/qcm-graphic.d.ts +4 -0
- package/es/helpers/test/fixtures/qcm-graphic.js +70 -0
- package/es/helpers/test/fixtures/qcm.d.ts +4 -0
- package/es/helpers/test/fixtures/qcm.js +99 -0
- package/es/helpers/test/fixtures/select-template.d.ts +4 -0
- package/es/helpers/test/fixtures/select-template.js +88 -0
- package/es/helpers/test/fixtures/slider.d.ts +4 -0
- package/es/helpers/test/fixtures/slider.js +27 -0
- package/es/helpers/test/fixtures/text-template.d.ts +4 -0
- package/es/helpers/test/fixtures/text-template.js +48 -0
- package/es/helpers/test/map-api-slide-to-ui.test.d.ts +1 -0
- package/es/helpers/test/map-api-slide-to-ui.test.js +32 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +31 -16
- package/es/reducers/ui/navigation.d.ts +1 -1
- package/es/test/index.test.js +18 -15
- package/es/test/util/services.mock.js +2 -32
- package/es/types/common.d.ts +62 -5
- package/es/types/slides.d.ts +27 -16
- package/lib/actions/api/fetch-skills.d.ts +8 -5
- package/lib/actions/api/fetch-slide.d.ts +8 -5
- package/lib/actions/api/post-progression.d.ts +8 -5
- package/lib/actions/ui/navigation.d.ts +1 -1
- package/lib/fixtures/qcm-slide.js +1 -1
- package/lib/helpers/map-api-slide-to-ui.d.ts +8 -0
- package/lib/helpers/map-api-slide-to-ui.js +181 -0
- package/lib/helpers/test/fixtures/free-text.d.ts +4 -0
- package/lib/helpers/test/fixtures/free-text.js +24 -0
- package/lib/helpers/test/fixtures/qcm-drag.d.ts +4 -0
- package/lib/helpers/test/fixtures/qcm-drag.js +106 -0
- package/lib/helpers/test/fixtures/qcm-graphic.d.ts +4 -0
- package/lib/helpers/test/fixtures/qcm-graphic.js +70 -0
- package/lib/helpers/test/fixtures/qcm.d.ts +4 -0
- package/lib/helpers/test/fixtures/qcm.js +99 -0
- package/lib/helpers/test/fixtures/select-template.d.ts +4 -0
- package/lib/helpers/test/fixtures/select-template.js +88 -0
- package/lib/helpers/test/fixtures/slider.d.ts +4 -0
- package/lib/helpers/test/fixtures/slider.js +27 -0
- package/lib/helpers/test/fixtures/text-template.d.ts +4 -0
- package/lib/helpers/test/fixtures/text-template.js +48 -0
- package/lib/helpers/test/map-api-slide-to-ui.test.d.ts +1 -0
- package/lib/helpers/test/map-api-slide-to-ui.test.js +43 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +31 -16
- package/lib/reducers/ui/navigation.d.ts +1 -1
- package/lib/test/index.test.js +19 -16
- package/lib/test/util/services.mock.js +13 -32
- package/lib/types/common.d.ts +62 -5
- package/lib/types/slides.d.ts +27 -16
- package/package.json +3 -3
- package/src/actions/api/fetch-skills.ts +8 -4
- package/src/actions/api/fetch-slide.ts +8 -4
- package/src/actions/api/post-progression.ts +14 -4
- package/src/actions/ui/navigation.ts +1 -1
- package/src/fixtures/qcm-slide.ts +1 -1
- package/src/helpers/map-api-slide-to-ui.ts +253 -0
- package/src/helpers/test/fixtures/free-text.ts +28 -0
- package/src/helpers/test/fixtures/qcm-drag.ts +110 -0
- package/src/helpers/test/fixtures/qcm-graphic.ts +74 -0
- package/src/helpers/test/fixtures/qcm.ts +108 -0
- package/src/helpers/test/fixtures/select-template.ts +92 -0
- package/src/helpers/test/fixtures/slider.ts +31 -0
- package/src/helpers/test/fixtures/text-template.ts +52 -0
- package/src/helpers/test/map-api-slide-to-ui.test.ts +55 -0
- package/src/index.tsx +39 -30
- package/src/reducers/ui/navigation.ts +1 -1
- package/src/test/index.test.tsx +23 -12
- package/src/test/util/services.mock.ts +2 -32
- package/src/types/common.ts +74 -5
- package/src/types/globals.d.ts +0 -5
- package/src/types/slides.ts +29 -12
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AnswerUI } from '../types/slides';
|
|
2
|
+
import { SlideFromAPI } from '../types/common';
|
|
3
|
+
declare type UiUtils = {
|
|
4
|
+
translate: (text: string) => string;
|
|
5
|
+
};
|
|
6
|
+
export declare const getQuestionType: (slide: SlideFromAPI) => SlideFromAPI['question']['type'];
|
|
7
|
+
export declare const mapApiSlideToUi: (uiUtils: UiUtils) => (slide: SlideFromAPI) => AnswerUI['model'] | void;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { concat, divide, get, getOr, head, includes, indexOf, isEmpty, map, noop, pipe, rangeStep, size, toInteger } from 'lodash/fp';
|
|
2
|
+
var qcmProps = function (question) {
|
|
3
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
4
|
+
var answers = [];
|
|
5
|
+
return {
|
|
6
|
+
type: 'qcm',
|
|
7
|
+
answers: map(function (choice) { return ({
|
|
8
|
+
title: choice.label,
|
|
9
|
+
selected: includes(choice.label, answers),
|
|
10
|
+
// TODO: EDIT_CHOICES
|
|
11
|
+
onClick: noop,
|
|
12
|
+
ariaLabel: choice.label
|
|
13
|
+
}); },
|
|
14
|
+
// TODO: EDIT_CHOICES -> getChoices
|
|
15
|
+
question.content.choices)
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
var qcmDragProps = function (question) {
|
|
19
|
+
// mock the answers
|
|
20
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
21
|
+
var answers = [];
|
|
22
|
+
return {
|
|
23
|
+
type: 'qcmDrag',
|
|
24
|
+
answers: map(function (choice) {
|
|
25
|
+
var indexInAnswer = indexOf(choice.label, answers);
|
|
26
|
+
return {
|
|
27
|
+
title: choice.label,
|
|
28
|
+
selected: indexInAnswer !== -1,
|
|
29
|
+
order: indexInAnswer,
|
|
30
|
+
// TODO: EDIT_CHOICES
|
|
31
|
+
onClick: noop
|
|
32
|
+
};
|
|
33
|
+
// TODO: EDIT_CHOICES -> getChoices
|
|
34
|
+
}, question.content.choices)
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
var qcmGraphicProps = function (question) {
|
|
38
|
+
// mock the answers
|
|
39
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
40
|
+
var answers = [];
|
|
41
|
+
return {
|
|
42
|
+
type: 'qcmGraphic',
|
|
43
|
+
answers: map(function (choice) { return ({
|
|
44
|
+
title: choice.label,
|
|
45
|
+
image: get('media.src.0.url', choice),
|
|
46
|
+
selected: includes(choice.label, answers),
|
|
47
|
+
// TODO: EDIT_CHOICES
|
|
48
|
+
onClick: noop
|
|
49
|
+
}); },
|
|
50
|
+
// TODO: EDIT_CHOICES -> getChoices
|
|
51
|
+
question.content.choices)
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
var templateTextProps = function (uiUtils) {
|
|
55
|
+
return function (choice, index) {
|
|
56
|
+
var translate = uiUtils.translate;
|
|
57
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
58
|
+
var answers = [];
|
|
59
|
+
return {
|
|
60
|
+
type: 'text',
|
|
61
|
+
name: getOr('', 'name', choice),
|
|
62
|
+
placeholder: translate('Type here'),
|
|
63
|
+
value: get(index, answers),
|
|
64
|
+
// TODO: EDIT_CHOICES
|
|
65
|
+
onChange: noop
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
// const getItemText = (item: ChoiceFromAPI['items'][0]): item['text'] is string =>
|
|
70
|
+
var templateSelectProps = function (uiUtils) {
|
|
71
|
+
return function (choice, index) {
|
|
72
|
+
var translate = uiUtils.translate;
|
|
73
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
74
|
+
var answers = [];
|
|
75
|
+
var answer = get(index, answers);
|
|
76
|
+
var temporaryOption = {
|
|
77
|
+
name: translate('Select an answer'),
|
|
78
|
+
value: '',
|
|
79
|
+
validOption: false,
|
|
80
|
+
selected: true
|
|
81
|
+
};
|
|
82
|
+
var selectOptions = choice.items.map(function (item) {
|
|
83
|
+
var itemText = getOr('', 'text', item);
|
|
84
|
+
return {
|
|
85
|
+
name: itemText,
|
|
86
|
+
value: itemText,
|
|
87
|
+
validOption: true,
|
|
88
|
+
selected: itemText === answer
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
return {
|
|
92
|
+
type: 'select',
|
|
93
|
+
name: getOr('', 'name', choice),
|
|
94
|
+
// TODO: EDIT_CHOICES
|
|
95
|
+
onChange: noop,
|
|
96
|
+
options: isEmpty(answer) ? concat([temporaryOption], selectOptions) : selectOptions
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
var templateProps = function (uiUtils) {
|
|
101
|
+
var templateTextProps_ = templateTextProps(uiUtils);
|
|
102
|
+
var templateSelectProps_ = templateSelectProps(uiUtils);
|
|
103
|
+
return function (question) {
|
|
104
|
+
// TODO: EDIT_CHOICES -> getChoices
|
|
105
|
+
var choices = question.content.choices;
|
|
106
|
+
return {
|
|
107
|
+
type: 'template',
|
|
108
|
+
template: get('content.template', question),
|
|
109
|
+
answers: choices.map(function (choice, index) {
|
|
110
|
+
return choice.type === 'text'
|
|
111
|
+
? templateTextProps_(choice, index)
|
|
112
|
+
: templateSelectProps_(choice, index);
|
|
113
|
+
})
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
var basicProps = function (uiUtils) {
|
|
118
|
+
var translate = uiUtils.translate;
|
|
119
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
120
|
+
var answers = [];
|
|
121
|
+
return function () {
|
|
122
|
+
return {
|
|
123
|
+
type: 'freeText',
|
|
124
|
+
placeholder: translate('Type here'),
|
|
125
|
+
value: head(answers),
|
|
126
|
+
// TODO: EDIT_CHOICES
|
|
127
|
+
onChange: noop
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
var sliderProps = function (question) {
|
|
132
|
+
var values = rangeStep(getOr(1, 'content.step', question), getOr(Number.NaN, 'content.min', question), getOr(Number.NaN, 'content.max', question) + 1
|
|
133
|
+
// Lodash doesn't infere the type very well here
|
|
134
|
+
);
|
|
135
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
136
|
+
var answers = [];
|
|
137
|
+
var stateValue = head(answers);
|
|
138
|
+
var currentValue = toInteger(stateValue);
|
|
139
|
+
var indexValue = indexOf(currentValue, values);
|
|
140
|
+
var sliderPosition = divide(indexValue, size(values) - 1);
|
|
141
|
+
var unitLabel = get('question.content.unitLabel', question);
|
|
142
|
+
return {
|
|
143
|
+
type: 'slider',
|
|
144
|
+
placeholder: question.explanation,
|
|
145
|
+
minLabel: "".concat(question.content.min, " ").concat(unitLabel),
|
|
146
|
+
maxLabel: "".concat(question.content.max, " ").concat(unitLabel),
|
|
147
|
+
title: "".concat(currentValue, " ").concat(question.content.unitLabel),
|
|
148
|
+
value: sliderPosition,
|
|
149
|
+
// TODO: EDIT_CHOICES
|
|
150
|
+
onChange: noop
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
export var getQuestionType = function (slide) {
|
|
154
|
+
return slide.question.type;
|
|
155
|
+
};
|
|
156
|
+
export var mapApiSlideToUi = function (uiUtils) {
|
|
157
|
+
var basicProps_ = basicProps(uiUtils);
|
|
158
|
+
var templateProps_ = templateProps(uiUtils);
|
|
159
|
+
return function (slide) {
|
|
160
|
+
if (!slide) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
var type = getQuestionType(slide);
|
|
164
|
+
switch (type) {
|
|
165
|
+
case 'qcm':
|
|
166
|
+
return pipe(get('question'), qcmProps)(slide);
|
|
167
|
+
case 'qcmGraphic':
|
|
168
|
+
return pipe(get('question'), qcmGraphicProps)(slide);
|
|
169
|
+
case 'qcmDrag':
|
|
170
|
+
return pipe(get('question'), qcmDragProps)(slide);
|
|
171
|
+
case 'basic':
|
|
172
|
+
return basicProps_();
|
|
173
|
+
case 'template':
|
|
174
|
+
return pipe(get('question'), templateProps_)(slide);
|
|
175
|
+
case 'slider':
|
|
176
|
+
return pipe(get('question'), sliderProps)(slide);
|
|
177
|
+
default:
|
|
178
|
+
throw new Error("".concat(type, " is not an handled question.type"));
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import noop from 'lodash/fp/noop';
|
|
2
|
+
export var freeTextSlide = {
|
|
3
|
+
id: 'sli_E1Pcl-XAYbi',
|
|
4
|
+
universalRef: 'sli_E1Pcl-XAYbi',
|
|
5
|
+
question: {
|
|
6
|
+
type: 'basic',
|
|
7
|
+
header: 'sli_E1Pcl-XAYbi.header',
|
|
8
|
+
explanation: 'sli_E1Pcl-XAYbi.explanation',
|
|
9
|
+
content: {
|
|
10
|
+
label: 'sli_E1Pcl-XAYbi.label',
|
|
11
|
+
placeholder: 'sli_E1Pcl-XAYbi.placeholder',
|
|
12
|
+
id: 'sli_E1Pcl-XAYbi.choice_1'
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
clue: 'sli_E1Pcl-XAYbi.clue',
|
|
16
|
+
klf: 'sli_E1Pcl-XAYbi.klf',
|
|
17
|
+
tips: 'sli_E1Pcl-XAYbi.tips'
|
|
18
|
+
};
|
|
19
|
+
export var freeTextUISlide = {
|
|
20
|
+
type: 'freeText',
|
|
21
|
+
placeholder: 'Type here',
|
|
22
|
+
value: undefined,
|
|
23
|
+
onChange: noop
|
|
24
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import noop from 'lodash/fp/noop';
|
|
2
|
+
export var qcmDragSlide = {
|
|
3
|
+
id: 'sli_419IlQQnf',
|
|
4
|
+
universalRef: 'sli_419IlQQnf',
|
|
5
|
+
question: {
|
|
6
|
+
type: 'qcmDrag',
|
|
7
|
+
header: 'sli_419IlQQnf.header',
|
|
8
|
+
explanation: 'sli_419IlQQnf.explanation',
|
|
9
|
+
content: {
|
|
10
|
+
choices: [
|
|
11
|
+
{
|
|
12
|
+
media: {
|
|
13
|
+
src: [],
|
|
14
|
+
posters: [],
|
|
15
|
+
subtitles: []
|
|
16
|
+
},
|
|
17
|
+
_id: '62b1ba3ec4f4015504212571',
|
|
18
|
+
label: 'sli_419IlQQnf.choice_4kWwlQXhG',
|
|
19
|
+
value: 'sli_419IlQQnf.choice_4kWwlQXhG',
|
|
20
|
+
items: []
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
media: {
|
|
24
|
+
src: [],
|
|
25
|
+
posters: [],
|
|
26
|
+
subtitles: []
|
|
27
|
+
},
|
|
28
|
+
_id: '62b1ba3ec4f4015504212572',
|
|
29
|
+
label: 'sli_419IlQQnf.choice_NJxbwgXm2G',
|
|
30
|
+
value: 'sli_419IlQQnf.choice_NJxbwgXm2G',
|
|
31
|
+
items: []
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
media: {
|
|
35
|
+
src: [],
|
|
36
|
+
posters: [],
|
|
37
|
+
subtitles: []
|
|
38
|
+
},
|
|
39
|
+
_id: '62b1ba3ec4f4015504212573',
|
|
40
|
+
label: 'sli_419IlQQnf.choice_41fwgQXnf',
|
|
41
|
+
value: 'sli_419IlQQnf.choice_41fwgQXnf',
|
|
42
|
+
items: []
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
media: {
|
|
46
|
+
src: [],
|
|
47
|
+
posters: [],
|
|
48
|
+
subtitles: []
|
|
49
|
+
},
|
|
50
|
+
_id: '62b1ba3ec4f4015504212574',
|
|
51
|
+
label: 'sli_419IlQQnf.choice_VJmweQ7nz',
|
|
52
|
+
value: 'sli_419IlQQnf.choice_VJmweQ7nz',
|
|
53
|
+
items: []
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
media: {
|
|
57
|
+
src: [],
|
|
58
|
+
posters: [],
|
|
59
|
+
subtitles: []
|
|
60
|
+
},
|
|
61
|
+
_id: '62b1ba3ec4f4015504212575',
|
|
62
|
+
label: 'sli_419IlQQnf.choice_4kDDgXQhz',
|
|
63
|
+
value: 'sli_419IlQQnf.choice_4kDDgXQhz',
|
|
64
|
+
items: []
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
klf: 'sli_419IlQQnf.klf',
|
|
70
|
+
tips: 'sli_419IlQQnf.tips'
|
|
71
|
+
};
|
|
72
|
+
export var qcmDragUISlide = {
|
|
73
|
+
type: 'qcmDrag',
|
|
74
|
+
answers: [
|
|
75
|
+
{
|
|
76
|
+
title: 'sli_419IlQQnf.choice_4kWwlQXhG',
|
|
77
|
+
selected: false,
|
|
78
|
+
order: -1,
|
|
79
|
+
onClick: noop
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
title: 'sli_419IlQQnf.choice_NJxbwgXm2G',
|
|
83
|
+
selected: false,
|
|
84
|
+
order: -1,
|
|
85
|
+
onClick: noop
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
title: 'sli_419IlQQnf.choice_41fwgQXnf',
|
|
89
|
+
selected: false,
|
|
90
|
+
order: -1,
|
|
91
|
+
onClick: noop
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
title: 'sli_419IlQQnf.choice_VJmweQ7nz',
|
|
95
|
+
selected: false,
|
|
96
|
+
order: -1,
|
|
97
|
+
onClick: noop
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
title: 'sli_419IlQQnf.choice_4kDDgXQhz',
|
|
101
|
+
selected: false,
|
|
102
|
+
order: -1,
|
|
103
|
+
onClick: noop
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import noop from 'lodash/fp/noop';
|
|
2
|
+
export var qcmGraphicSlide = {
|
|
3
|
+
id: 'sli_41~RSVclH',
|
|
4
|
+
universalRef: 'sli_41~RSVclH',
|
|
5
|
+
question: {
|
|
6
|
+
type: 'qcmGraphic',
|
|
7
|
+
header: 'sli_41~RSVclH.header',
|
|
8
|
+
explanation: 'sli_41~RSVclH.explanation',
|
|
9
|
+
content: {
|
|
10
|
+
choices: [
|
|
11
|
+
{
|
|
12
|
+
media: {
|
|
13
|
+
type: 'img',
|
|
14
|
+
src: [
|
|
15
|
+
{
|
|
16
|
+
_id: '5fdce726359bf4003ee66997',
|
|
17
|
+
mimeType: 'image/png',
|
|
18
|
+
url: 'med_4JVRrE5gH.mediaUrl_VkBtUV9gB'
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
posters: [],
|
|
22
|
+
subtitles: []
|
|
23
|
+
},
|
|
24
|
+
_id: '5fdce726359bf4003ee66996',
|
|
25
|
+
label: 'sli_41~RSVclH.choice_V1gN0r4qgS',
|
|
26
|
+
value: 'sli_41~RSVclH.choice_V1gN0r4qgS',
|
|
27
|
+
items: []
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
media: {
|
|
31
|
+
type: 'img',
|
|
32
|
+
src: [
|
|
33
|
+
{
|
|
34
|
+
_id: '5fdce726359bf4003ee66999',
|
|
35
|
+
mimeType: 'image/png',
|
|
36
|
+
url: 'med_Ek8gIEqxB.mediaUrl_EkcFUEclH'
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
posters: [],
|
|
40
|
+
subtitles: []
|
|
41
|
+
},
|
|
42
|
+
_id: '5fdce726359bf4003ee66998',
|
|
43
|
+
label: 'sli_41~RSVclH.choice_4JlLeLE5lS',
|
|
44
|
+
value: 'sli_41~RSVclH.choice_4JlLeLE5lS',
|
|
45
|
+
items: []
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
clue: 'sli_41~RSVclH.clue',
|
|
51
|
+
klf: 'sli_41~RSVclH.klf',
|
|
52
|
+
tips: 'sli_41~RSVclH.tips'
|
|
53
|
+
};
|
|
54
|
+
export var qcmGraphicUISlide = {
|
|
55
|
+
type: 'qcmGraphic',
|
|
56
|
+
answers: [
|
|
57
|
+
{
|
|
58
|
+
title: 'sli_41~RSVclH.choice_V1gN0r4qgS',
|
|
59
|
+
image: 'med_4JVRrE5gH.mediaUrl_VkBtUV9gB',
|
|
60
|
+
selected: false,
|
|
61
|
+
onClick: noop
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: 'sli_41~RSVclH.choice_4JlLeLE5lS',
|
|
65
|
+
image: 'med_Ek8gIEqxB.mediaUrl_EkcFUEclH',
|
|
66
|
+
selected: false,
|
|
67
|
+
onClick: noop
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import noop from 'lodash/fp/noop';
|
|
2
|
+
export var qcmSlide = {
|
|
3
|
+
question: {
|
|
4
|
+
content: {
|
|
5
|
+
media: {
|
|
6
|
+
src: [],
|
|
7
|
+
posters: [],
|
|
8
|
+
subtitles: []
|
|
9
|
+
},
|
|
10
|
+
choices: [
|
|
11
|
+
{
|
|
12
|
+
media: {
|
|
13
|
+
src: [],
|
|
14
|
+
posters: [],
|
|
15
|
+
subtitles: []
|
|
16
|
+
},
|
|
17
|
+
items: [],
|
|
18
|
+
_id: '62c853412d0f9b088718e759',
|
|
19
|
+
label: 'Le créateur peut fixer un pourcentage pour chaque transaction future',
|
|
20
|
+
value: 'sli_N1XACJobn.choice_4JjaSesZh',
|
|
21
|
+
id: '62c853412d0f9b088718e759'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
media: {
|
|
25
|
+
src: [],
|
|
26
|
+
posters: [],
|
|
27
|
+
subtitles: []
|
|
28
|
+
},
|
|
29
|
+
items: [],
|
|
30
|
+
_id: '62c853412d0f9b088718e75a',
|
|
31
|
+
label: "Pour chaque transaction il existe un pourcentage fixe déterminé par le droit d'auteur du pays où se tient la vente",
|
|
32
|
+
value: 'sli_N1XACJobn.choice_Ny78UlsWh',
|
|
33
|
+
id: '62c853412d0f9b088718e75a'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
media: {
|
|
37
|
+
src: [],
|
|
38
|
+
posters: [],
|
|
39
|
+
subtitles: []
|
|
40
|
+
},
|
|
41
|
+
items: [],
|
|
42
|
+
_id: '62c853412d0f9b088718e75b',
|
|
43
|
+
label: "Seule la galerie ou la plateforme peut toucher une commission sur la vente d'un NFT",
|
|
44
|
+
value: 'sli_N1XACJobn.choice_Eypt8esW2',
|
|
45
|
+
id: '62c853412d0f9b088718e75b'
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
media: {
|
|
49
|
+
src: [],
|
|
50
|
+
posters: [],
|
|
51
|
+
subtitles: []
|
|
52
|
+
},
|
|
53
|
+
items: [],
|
|
54
|
+
_id: '62c853412d0f9b088718e75c',
|
|
55
|
+
label: "Les NFT payés en ETH ne peuvent pas être soumis au paiement d'une commission",
|
|
56
|
+
value: 'sli_N1XACJobn.choice_VyS3LxjZh',
|
|
57
|
+
id: '62c853412d0f9b088718e75c'
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
type: 'qcm',
|
|
62
|
+
header: "Après la vente d'un NFT, son créateur peut-il toucher de l'argent ?",
|
|
63
|
+
explanation: 'Sélectionnez la bonne réponse.'
|
|
64
|
+
},
|
|
65
|
+
klf: 'Si vous êtes le créateur d’un NFT, vous pouvez choisir le pourcentage de commission pour chaque transaction de votre NFT. Certains choisissent de ne rien toucher pour fluidifier le marché.',
|
|
66
|
+
tips: 'En 2021, le média en ligne Numerama a créé un NFT vendu aux enchères sur OpenSea. Sur cette plateforme, il est obligatoire de mettre un prix de réserve, autrement dit un prix minimum au-dessous duquel la vente ne sera pas automatiquement acceptée. Sur OpenSea il ne peut être inférieur à 1 ETH. Si le prix de réserve est atteint, pas de problème, les "gas fees" (les frais de gaz) sont couverts par OpenSea. Mais, si ce n’est pas le cas, c’est au vendeur de s’en acquitter. <br/>Le NFT en question est parti à 0,021 ETH, soit 40€ au cours de l\'époque, un prix inférieur au prix de réserve. Numerama a dû acquitter des frais de gaz, et payer 190 €. <br/>Avec les NFT, on ne gagne pas à tous les coups.',
|
|
67
|
+
universalRef: 'sli_N1XACJobn',
|
|
68
|
+
hasClue: true,
|
|
69
|
+
id: 'sli_N1XACJobn'
|
|
70
|
+
};
|
|
71
|
+
export var qcmUISlide = {
|
|
72
|
+
type: 'qcm',
|
|
73
|
+
answers: [
|
|
74
|
+
{
|
|
75
|
+
title: 'Le créateur peut fixer un pourcentage pour chaque transaction future',
|
|
76
|
+
selected: false,
|
|
77
|
+
onClick: noop,
|
|
78
|
+
ariaLabel: 'Le créateur peut fixer un pourcentage pour chaque transaction future'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
title: "Pour chaque transaction il existe un pourcentage fixe déterminé par le droit d'auteur du pays où se tient la vente",
|
|
82
|
+
selected: false,
|
|
83
|
+
onClick: noop,
|
|
84
|
+
ariaLabel: "Pour chaque transaction il existe un pourcentage fixe déterminé par le droit d'auteur du pays où se tient la vente"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
title: "Seule la galerie ou la plateforme peut toucher une commission sur la vente d'un NFT",
|
|
88
|
+
selected: false,
|
|
89
|
+
onClick: noop,
|
|
90
|
+
ariaLabel: "Seule la galerie ou la plateforme peut toucher une commission sur la vente d'un NFT"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
title: "Les NFT payés en ETH ne peuvent pas être soumis au paiement d'une commission",
|
|
94
|
+
selected: false,
|
|
95
|
+
onClick: noop,
|
|
96
|
+
ariaLabel: "Les NFT payés en ETH ne peuvent pas être soumis au paiement d'une commission"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
};
|