@coorpacademy/app-review 0.9.2 → 0.9.3
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/reducers/ui/slide.js +1 -1
- package/es/types/common.d.ts +24 -0
- package/lib/reducers/ui/slide.js +1 -1
- package/lib/types/common.d.ts +24 -0
- package/package.json +3 -2
package/es/reducers/ui/slide.js
CHANGED
|
@@ -39,7 +39,7 @@ state = initialState, action) => {
|
|
|
39
39
|
const { currentSlideRef, nextSlideRef } = action.payload;
|
|
40
40
|
if (nextSlideRef === 'successExitNode')
|
|
41
41
|
return state;
|
|
42
|
-
return pipe(set([currentSlideRef, 'animateCorrectionPopin'], false), set([currentSlideRef, 'animationType'], action.payload.animationType))(state);
|
|
42
|
+
return pipe(set([currentSlideRef, 'animateCorrectionPopin'], false), set([currentSlideRef, 'animationType'], action.payload.animationType), set([currentSlideRef, 'showCorrectionPopin'], false))(state);
|
|
43
43
|
}
|
|
44
44
|
case POST_PROGRESSION_REQUEST: {
|
|
45
45
|
return initialState;
|
package/es/types/common.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare type ChoiceFromAPI = {
|
|
|
19
19
|
declare type BaseContent = {
|
|
20
20
|
media?: unknown;
|
|
21
21
|
choices: ChoiceFromAPI[];
|
|
22
|
+
answers: string[][];
|
|
22
23
|
};
|
|
23
24
|
declare type BaseQuestion = {
|
|
24
25
|
header?: string;
|
|
@@ -41,6 +42,7 @@ export declare type BasicQuestion = Omit<BaseQuestion, 'content'> & {
|
|
|
41
42
|
label?: string;
|
|
42
43
|
placeholder?: string;
|
|
43
44
|
id: string;
|
|
45
|
+
answers: string[][];
|
|
44
46
|
};
|
|
45
47
|
};
|
|
46
48
|
export declare type SliderQuestion = Omit<BaseQuestion, 'content'> & {
|
|
@@ -50,12 +52,14 @@ export declare type SliderQuestion = Omit<BaseQuestion, 'content'> & {
|
|
|
50
52
|
min: number;
|
|
51
53
|
max: number;
|
|
52
54
|
step?: number;
|
|
55
|
+
answers: string[][];
|
|
53
56
|
};
|
|
54
57
|
type: 'slider';
|
|
55
58
|
};
|
|
56
59
|
export declare type TemplateQuestion = Omit<BaseQuestion, 'content'> & {
|
|
57
60
|
content: BaseContent & {
|
|
58
61
|
template: string;
|
|
62
|
+
answers: string[][];
|
|
59
63
|
};
|
|
60
64
|
type: 'template';
|
|
61
65
|
};
|
|
@@ -96,8 +100,15 @@ export declare type ProgressionState = {
|
|
|
96
100
|
allAnswers: ProgressionAnswerItem[];
|
|
97
101
|
content?: SlideContent;
|
|
98
102
|
isCorrect: boolean;
|
|
103
|
+
lives?: number;
|
|
104
|
+
livesDisabled?: boolean;
|
|
105
|
+
hasViewedAResourceAtThisStep?: boolean;
|
|
99
106
|
nextContent: SlideContent | SuccessNodeContent;
|
|
100
107
|
pendingSlides: string[];
|
|
108
|
+
remainingLifeRequests?: number;
|
|
109
|
+
requestedClues?: [];
|
|
110
|
+
variables?: {};
|
|
111
|
+
viewedResources?: [];
|
|
101
112
|
slides: string[];
|
|
102
113
|
step: {
|
|
103
114
|
current: number;
|
|
@@ -180,4 +191,17 @@ export declare type Skin = {
|
|
|
180
191
|
primary: string;
|
|
181
192
|
};
|
|
182
193
|
};
|
|
194
|
+
export declare type Config = {
|
|
195
|
+
version: string;
|
|
196
|
+
livesDisabled: boolean;
|
|
197
|
+
lives: number;
|
|
198
|
+
maxTypos: number;
|
|
199
|
+
slidesToComplete: number;
|
|
200
|
+
shuffleChoices?: boolean;
|
|
201
|
+
answerBoundaryLimit: number;
|
|
202
|
+
starsPerAskingClue: number;
|
|
203
|
+
starsPerCorrectAnswer: number;
|
|
204
|
+
starsPerResourceViewed: number;
|
|
205
|
+
remainingLifeRequests: number;
|
|
206
|
+
};
|
|
183
207
|
export {};
|
package/lib/reducers/ui/slide.js
CHANGED
|
@@ -45,7 +45,7 @@ state = exports.initialState, action) => {
|
|
|
45
45
|
const { currentSlideRef, nextSlideRef } = action.payload;
|
|
46
46
|
if (nextSlideRef === 'successExitNode')
|
|
47
47
|
return state;
|
|
48
|
-
return (0, pipe_1.default)((0, set_1.default)([currentSlideRef, 'animateCorrectionPopin'], false), (0, set_1.default)([currentSlideRef, 'animationType'], action.payload.animationType))(state);
|
|
48
|
+
return (0, pipe_1.default)((0, set_1.default)([currentSlideRef, 'animateCorrectionPopin'], false), (0, set_1.default)([currentSlideRef, 'animationType'], action.payload.animationType), (0, set_1.default)([currentSlideRef, 'showCorrectionPopin'], false))(state);
|
|
49
49
|
}
|
|
50
50
|
case post_progression_1.POST_PROGRESSION_REQUEST: {
|
|
51
51
|
return exports.initialState;
|
package/lib/types/common.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare type ChoiceFromAPI = {
|
|
|
19
19
|
declare type BaseContent = {
|
|
20
20
|
media?: unknown;
|
|
21
21
|
choices: ChoiceFromAPI[];
|
|
22
|
+
answers: string[][];
|
|
22
23
|
};
|
|
23
24
|
declare type BaseQuestion = {
|
|
24
25
|
header?: string;
|
|
@@ -41,6 +42,7 @@ export declare type BasicQuestion = Omit<BaseQuestion, 'content'> & {
|
|
|
41
42
|
label?: string;
|
|
42
43
|
placeholder?: string;
|
|
43
44
|
id: string;
|
|
45
|
+
answers: string[][];
|
|
44
46
|
};
|
|
45
47
|
};
|
|
46
48
|
export declare type SliderQuestion = Omit<BaseQuestion, 'content'> & {
|
|
@@ -50,12 +52,14 @@ export declare type SliderQuestion = Omit<BaseQuestion, 'content'> & {
|
|
|
50
52
|
min: number;
|
|
51
53
|
max: number;
|
|
52
54
|
step?: number;
|
|
55
|
+
answers: string[][];
|
|
53
56
|
};
|
|
54
57
|
type: 'slider';
|
|
55
58
|
};
|
|
56
59
|
export declare type TemplateQuestion = Omit<BaseQuestion, 'content'> & {
|
|
57
60
|
content: BaseContent & {
|
|
58
61
|
template: string;
|
|
62
|
+
answers: string[][];
|
|
59
63
|
};
|
|
60
64
|
type: 'template';
|
|
61
65
|
};
|
|
@@ -96,8 +100,15 @@ export declare type ProgressionState = {
|
|
|
96
100
|
allAnswers: ProgressionAnswerItem[];
|
|
97
101
|
content?: SlideContent;
|
|
98
102
|
isCorrect: boolean;
|
|
103
|
+
lives?: number;
|
|
104
|
+
livesDisabled?: boolean;
|
|
105
|
+
hasViewedAResourceAtThisStep?: boolean;
|
|
99
106
|
nextContent: SlideContent | SuccessNodeContent;
|
|
100
107
|
pendingSlides: string[];
|
|
108
|
+
remainingLifeRequests?: number;
|
|
109
|
+
requestedClues?: [];
|
|
110
|
+
variables?: {};
|
|
111
|
+
viewedResources?: [];
|
|
101
112
|
slides: string[];
|
|
102
113
|
step: {
|
|
103
114
|
current: number;
|
|
@@ -180,4 +191,17 @@ export declare type Skin = {
|
|
|
180
191
|
primary: string;
|
|
181
192
|
};
|
|
182
193
|
};
|
|
194
|
+
export declare type Config = {
|
|
195
|
+
version: string;
|
|
196
|
+
livesDisabled: boolean;
|
|
197
|
+
lives: number;
|
|
198
|
+
maxTypos: number;
|
|
199
|
+
slidesToComplete: number;
|
|
200
|
+
shuffleChoices?: boolean;
|
|
201
|
+
answerBoundaryLimit: number;
|
|
202
|
+
starsPerAskingClue: number;
|
|
203
|
+
starsPerCorrectAnswer: number;
|
|
204
|
+
starsPerResourceViewed: number;
|
|
205
|
+
remainingLifeRequests: number;
|
|
206
|
+
};
|
|
183
207
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/app-review",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16.15.0"
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"module": "es/index.js",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@coorpacademy/components": "10.29.2",
|
|
39
|
+
"@coorpacademy/progression-engine": "11.5.1",
|
|
39
40
|
"@coorpacademy/redux-task": "1.1.6",
|
|
40
41
|
"@coorpacademy/translate": "6.2.0",
|
|
41
42
|
"cross-fetch": "^3.1.5",
|
|
@@ -71,5 +72,5 @@
|
|
|
71
72
|
"webpack-cli": "^4.10.0",
|
|
72
73
|
"webpack-dev-server": "^4.11.1"
|
|
73
74
|
},
|
|
74
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "b19a45149c174adceace9ac95e31bcfa6d5f66eb"
|
|
75
76
|
}
|