@coorpacademy/app-review 0.1.9 → 0.1.11
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/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.js +29 -9
- 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/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.js +29 -9
- 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 +4 -3
- 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 +35 -11
- 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/slides.ts +29 -12
|
@@ -2,7 +2,7 @@ import { AppOptions } from '../../types/common';
|
|
|
2
2
|
export declare const NAVIGATE_TO = "@@navigation/NAVIGATE_TO";
|
|
3
3
|
export declare const NAVIGATE_BACK = "@@navigation/NAVIGATE_BACK";
|
|
4
4
|
export declare const START_APP = "@@navigation/START_APP";
|
|
5
|
-
export declare type ViewPath = 'skills' | 'onboarding' | 'slides';
|
|
5
|
+
export declare type ViewPath = 'skills' | 'onboarding' | 'slides' | 'loader';
|
|
6
6
|
export declare type NavigateTo = {
|
|
7
7
|
type: '@@navigation/NAVIGATE_TO';
|
|
8
8
|
payload: ViewPath;
|
package/es/fixtures/qcm-slide.js
CHANGED
|
@@ -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,175 @@
|
|
|
1
|
+
import { concat, divide, get, getOr, head, includes, indexOf, isEmpty, map, noop, pipe, rangeStep, size, toInteger } from 'lodash/fp';
|
|
2
|
+
const qcmProps = (question) => {
|
|
3
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
4
|
+
const answers = [];
|
|
5
|
+
return {
|
|
6
|
+
type: 'qcm',
|
|
7
|
+
answers: map(choice => ({
|
|
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
|
+
const qcmDragProps = (question) => {
|
|
19
|
+
// mock the answers
|
|
20
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
21
|
+
const answers = [];
|
|
22
|
+
return {
|
|
23
|
+
type: 'qcmDrag',
|
|
24
|
+
answers: map(choice => {
|
|
25
|
+
const 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
|
+
const qcmGraphicProps = (question) => {
|
|
38
|
+
// mock the answers
|
|
39
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
40
|
+
const answers = [];
|
|
41
|
+
return {
|
|
42
|
+
type: 'qcmGraphic',
|
|
43
|
+
answers: map(choice => ({
|
|
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
|
+
const templateTextProps = (uiUtils) => (choice, index) => {
|
|
55
|
+
const { translate } = uiUtils;
|
|
56
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
57
|
+
const answers = [];
|
|
58
|
+
return {
|
|
59
|
+
type: 'text',
|
|
60
|
+
name: getOr('', 'name', choice),
|
|
61
|
+
placeholder: translate('Type here'),
|
|
62
|
+
value: get(index, answers),
|
|
63
|
+
// TODO: EDIT_CHOICES
|
|
64
|
+
onChange: noop
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
// const getItemText = (item: ChoiceFromAPI['items'][0]): item['text'] is string =>
|
|
68
|
+
const templateSelectProps = (uiUtils) => {
|
|
69
|
+
return (choice, index) => {
|
|
70
|
+
const { translate } = uiUtils;
|
|
71
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
72
|
+
const answers = [];
|
|
73
|
+
const answer = get(index, answers);
|
|
74
|
+
const temporaryOption = {
|
|
75
|
+
name: translate('Select an answer'),
|
|
76
|
+
value: '',
|
|
77
|
+
validOption: false,
|
|
78
|
+
selected: true
|
|
79
|
+
};
|
|
80
|
+
const selectOptions = choice.items.map(item => {
|
|
81
|
+
const itemText = getOr('', 'text', item);
|
|
82
|
+
return {
|
|
83
|
+
name: itemText,
|
|
84
|
+
value: itemText,
|
|
85
|
+
validOption: true,
|
|
86
|
+
selected: itemText === answer
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
return {
|
|
90
|
+
type: 'select',
|
|
91
|
+
name: getOr('', 'name', choice),
|
|
92
|
+
// TODO: EDIT_CHOICES
|
|
93
|
+
onChange: noop,
|
|
94
|
+
options: isEmpty(answer) ? concat([temporaryOption], selectOptions) : selectOptions
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
const templateProps = (uiUtils) => {
|
|
99
|
+
const templateTextProps_ = templateTextProps(uiUtils);
|
|
100
|
+
const templateSelectProps_ = templateSelectProps(uiUtils);
|
|
101
|
+
return question => {
|
|
102
|
+
// TODO: EDIT_CHOICES -> getChoices
|
|
103
|
+
const choices = question.content.choices;
|
|
104
|
+
return {
|
|
105
|
+
type: 'template',
|
|
106
|
+
template: get('content.template', question),
|
|
107
|
+
answers: choices.map((choice, index) => choice.type === 'text'
|
|
108
|
+
? templateTextProps_(choice, index)
|
|
109
|
+
: templateSelectProps_(choice, index))
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
const basicProps = (uiUtils) => {
|
|
114
|
+
const { translate } = uiUtils;
|
|
115
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
116
|
+
const answers = [];
|
|
117
|
+
return () => {
|
|
118
|
+
return {
|
|
119
|
+
type: 'freeText',
|
|
120
|
+
placeholder: translate('Type here'),
|
|
121
|
+
value: head(answers),
|
|
122
|
+
// TODO: EDIT_CHOICES
|
|
123
|
+
onChange: noop
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
const sliderProps = (question) => {
|
|
128
|
+
const values = rangeStep(getOr(1, 'content.step', question), getOr(Number.NaN, 'content.min', question), getOr(Number.NaN, 'content.max', question) + 1
|
|
129
|
+
// Lodash doesn't infere the type very well here
|
|
130
|
+
);
|
|
131
|
+
// TODO: EDIT_CHOICES -> getAnswerValues
|
|
132
|
+
const answers = [];
|
|
133
|
+
const stateValue = head(answers);
|
|
134
|
+
const currentValue = toInteger(stateValue);
|
|
135
|
+
const indexValue = indexOf(currentValue, values);
|
|
136
|
+
const sliderPosition = divide(indexValue, size(values) - 1);
|
|
137
|
+
const unitLabel = get('question.content.unitLabel', question);
|
|
138
|
+
return {
|
|
139
|
+
type: 'slider',
|
|
140
|
+
placeholder: question.explanation,
|
|
141
|
+
minLabel: `${question.content.min} ${unitLabel}`,
|
|
142
|
+
maxLabel: `${question.content.max} ${unitLabel}`,
|
|
143
|
+
title: `${currentValue} ${question.content.unitLabel}`,
|
|
144
|
+
value: sliderPosition,
|
|
145
|
+
// TODO: EDIT_CHOICES
|
|
146
|
+
onChange: noop
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
export const getQuestionType = (slide) => slide.question.type;
|
|
150
|
+
export const mapApiSlideToUi = (uiUtils) => {
|
|
151
|
+
const basicProps_ = basicProps(uiUtils);
|
|
152
|
+
const templateProps_ = templateProps(uiUtils);
|
|
153
|
+
return (slide) => {
|
|
154
|
+
if (!slide) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const type = getQuestionType(slide);
|
|
158
|
+
switch (type) {
|
|
159
|
+
case 'qcm':
|
|
160
|
+
return pipe(get('question'), qcmProps)(slide);
|
|
161
|
+
case 'qcmGraphic':
|
|
162
|
+
return pipe(get('question'), qcmGraphicProps)(slide);
|
|
163
|
+
case 'qcmDrag':
|
|
164
|
+
return pipe(get('question'), qcmDragProps)(slide);
|
|
165
|
+
case 'basic':
|
|
166
|
+
return basicProps_();
|
|
167
|
+
case 'template':
|
|
168
|
+
return pipe(get('question'), templateProps_)(slide);
|
|
169
|
+
case 'slider':
|
|
170
|
+
return pipe(get('question'), sliderProps)(slide);
|
|
171
|
+
default:
|
|
172
|
+
throw new Error(`${type} is not an handled question.type`);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import noop from 'lodash/fp/noop';
|
|
2
|
+
export const 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 const 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 const 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 const 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 const 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 const 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 const 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 const 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 const 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 const 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 const 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 const 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
|
+
};
|