@coorpacademy/app-review 0.10.3 → 0.10.4

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.
Files changed (92) hide show
  1. package/es/actions/api/fetch-correction.d.ts +2 -1
  2. package/es/actions/api/fetch-rank.d.ts +2 -1
  3. package/es/actions/api/fetch-skill.d.ts +2 -1
  4. package/es/actions/api/fetch-skills.d.ts +2 -1
  5. package/es/actions/api/fetch-slide.d.ts +2 -1
  6. package/es/actions/api/fetch-slides-to-review-by-skill-ref.d.ts +2 -1
  7. package/es/actions/api/post-answer.d.ts +2 -1
  8. package/es/actions/api/post-progression.d.ts +2 -1
  9. package/es/actions/ui/navigation.d.ts +1 -1
  10. package/es/actions/ui/slides.d.ts +1 -1
  11. package/es/common/index.d.ts +1 -1
  12. package/es/configure-store.d.ts +1 -1
  13. package/es/configure-store.js +1 -1
  14. package/es/reducers/data/corrections.d.ts +1 -1
  15. package/es/reducers/data/current-skill.d.ts +1 -1
  16. package/es/reducers/data/progression.d.ts +1 -1
  17. package/es/reducers/data/skills.d.ts +1 -1
  18. package/es/reducers/data/slides.d.ts +1 -1
  19. package/es/types/common.d.ts +10 -186
  20. package/es/views/skills/index.d.ts +1 -1
  21. package/es/views/slides/index.d.ts +1 -1
  22. package/es/views/slides/map-api-slide-to-ui.d.ts +2 -1
  23. package/es/views/slides/map-api-slide-to-ui.js +1 -1
  24. package/lib/actions/api/fetch-correction.d.ts +2 -1
  25. package/lib/actions/api/fetch-rank.d.ts +2 -1
  26. package/lib/actions/api/fetch-skill.d.ts +2 -1
  27. package/lib/actions/api/fetch-skills.d.ts +2 -1
  28. package/lib/actions/api/fetch-slide.d.ts +2 -1
  29. package/lib/actions/api/fetch-slides-to-review-by-skill-ref.d.ts +2 -1
  30. package/lib/actions/api/post-answer.d.ts +2 -1
  31. package/lib/actions/api/post-progression.d.ts +2 -1
  32. package/lib/actions/ui/navigation.d.ts +1 -1
  33. package/lib/actions/ui/slides.d.ts +1 -1
  34. package/lib/common/index.d.ts +1 -1
  35. package/lib/configure-store.d.ts +1 -1
  36. package/lib/configure-store.js +2 -2
  37. package/lib/reducers/data/corrections.d.ts +1 -1
  38. package/lib/reducers/data/current-skill.d.ts +1 -1
  39. package/lib/reducers/data/progression.d.ts +1 -1
  40. package/lib/reducers/data/skills.d.ts +1 -1
  41. package/lib/reducers/data/slides.d.ts +1 -1
  42. package/lib/types/common.d.ts +10 -186
  43. package/lib/views/skills/index.d.ts +1 -1
  44. package/lib/views/slides/index.d.ts +1 -1
  45. package/lib/views/slides/map-api-slide-to-ui.d.ts +2 -1
  46. package/lib/views/slides/map-api-slide-to-ui.js +1 -1
  47. package/package.json +5 -3
  48. package/es/services/fetch-correction.d.ts +0 -2
  49. package/es/services/fetch-correction.js +0 -14
  50. package/es/services/fetch-rank.d.ts +0 -2
  51. package/es/services/fetch-rank.js +0 -10
  52. package/es/services/fetch-skill.d.ts +0 -2
  53. package/es/services/fetch-skill.js +0 -11
  54. package/es/services/fetch-skills.d.ts +0 -2
  55. package/es/services/fetch-skills.js +0 -10
  56. package/es/services/fetch-slide.d.ts +0 -2
  57. package/es/services/fetch-slide.js +0 -10
  58. package/es/services/fetch-slides-to-review-by-skill-ref.d.ts +0 -2
  59. package/es/services/fetch-slides-to-review-by-skill-ref.js +0 -10
  60. package/es/services/index.d.ts +0 -2
  61. package/es/services/index.js +0 -18
  62. package/es/services/post-answer.d.ts +0 -2
  63. package/es/services/post-answer.js +0 -20
  64. package/es/services/post-progression.d.ts +0 -2
  65. package/es/services/post-progression.js +0 -21
  66. package/es/services/tools/fetch-responses.d.ts +0 -7
  67. package/es/services/tools/fetch-responses.js +0 -33
  68. package/es/services/tools/sleep.d.ts +0 -1
  69. package/es/services/tools/sleep.js +0 -3
  70. package/lib/services/fetch-correction.d.ts +0 -2
  71. package/lib/services/fetch-correction.js +0 -21
  72. package/lib/services/fetch-rank.d.ts +0 -2
  73. package/lib/services/fetch-rank.js +0 -17
  74. package/lib/services/fetch-skill.d.ts +0 -2
  75. package/lib/services/fetch-skill.js +0 -18
  76. package/lib/services/fetch-skills.d.ts +0 -2
  77. package/lib/services/fetch-skills.js +0 -17
  78. package/lib/services/fetch-slide.d.ts +0 -2
  79. package/lib/services/fetch-slide.js +0 -17
  80. package/lib/services/fetch-slides-to-review-by-skill-ref.d.ts +0 -2
  81. package/lib/services/fetch-slides-to-review-by-skill-ref.js +0 -17
  82. package/lib/services/index.d.ts +0 -2
  83. package/lib/services/index.js +0 -22
  84. package/lib/services/post-answer.d.ts +0 -2
  85. package/lib/services/post-answer.js +0 -27
  86. package/lib/services/post-progression.d.ts +0 -2
  87. package/lib/services/post-progression.js +0 -28
  88. package/lib/services/tools/fetch-responses.d.ts +0 -7
  89. package/lib/services/tools/fetch-responses.js +0 -40
  90. package/lib/services/tools/sleep.d.ts +0 -1
  91. package/lib/services/tools/sleep.js +0 -7
  92. package/locales/.mtslconfig.json +0 -1
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
+ import type { CorrectionFromAPI } from '@coorpacademy/review-services';
3
+ import type { ThunkOptions } from '../../types/common';
2
4
  import type { StoreState } from '../../reducers';
3
- import type { CorrectionFromAPI, ThunkOptions } from '../../types/common';
4
5
  export declare const CORRECTION_FETCH_REQUEST: "@@correction/FETCH_REQUEST";
5
6
  export declare const CORRECTION_FETCH_SUCCESS: "@@correction/FETCH_SUCCESS";
6
7
  export declare const CORRECTION_FETCH_FAILURE: "@@correction/FETCH_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
+ import type { Rank, Services } from '@coorpacademy/review-services';
3
+ import type { ThunkOptions } from '../../types/common';
2
4
  import type { StoreState } from '../../reducers';
3
- import type { Rank, Services, ThunkOptions } from '../../types/common';
4
5
  export declare const RANK_FETCH_START_REQUEST: "@@rank/FETCH_START_REQUEST";
5
6
  export declare const RANK_FETCH_START_SUCCESS: "@@rank/FETCH_START_SUCCESS";
6
7
  export declare const RANK_FETCH_START_FAILURE: "@@rank/FETCH_START_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import { Dispatch } from 'redux';
2
+ import type { Skill } from '@coorpacademy/review-services';
3
+ import type { ThunkOptions } from '../../types/common';
2
4
  import type { StoreState } from '../../reducers';
3
- import type { Skill, ThunkOptions } from '../../types/common';
4
5
  export declare const SKILL_FETCH_REQUEST: "@@skill/FETCH_REQUEST";
5
6
  export declare const SKILL_FETCH_SUCCESS: "@@skill/FETCH_SUCCESS";
6
7
  export declare const SKILL_FETCH_FAILURE: "@@skill/FETCH_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
+ import type { SkillToReview } from '@coorpacademy/review-services';
2
3
  import type { StoreState } from '../../reducers';
3
- import type { ThunkOptions, SkillToReview } from '../../types/common';
4
+ import type { ThunkOptions } from '../../types/common';
4
5
  export declare const SKILLS_FETCH_REQUEST: "@@skills/FETCH_REQUEST";
5
6
  export declare const SKILLS_FETCH_SUCCESS: "@@skills/FETCH_SUCCESS";
6
7
  export declare const SKILLS_FETCH_FAILURE: "@@skills/FETCH_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
+ import type { SlideFromAPI } from '@coorpacademy/review-services';
3
+ import type { ThunkOptions } from '../../types/common';
2
4
  import type { StoreState } from '../../reducers';
3
- import type { ThunkOptions, SlideFromAPI } from '../../types/common';
4
5
  export declare const SLIDE_FETCH_REQUEST: "@@slides/FETCH_REQUEST";
5
6
  export declare const SLIDE_FETCH_SUCCESS: "@@slides/FETCH_SUCCESS";
6
7
  export declare const SLIDE_FETCH_FAILURE: "@@slides/FETCH_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
+ import type { SlideIdFromAPI } from '@coorpacademy/review-services';
3
+ import { Options } from '../../types/common';
2
4
  import type { StoreState } from '../../reducers';
3
- import type { Options, SlideIdFromAPI } from '../../types/common';
4
5
  export declare const SLIDES_TO_REVIEW_FETCH_REQUEST: "@@slidesToReview/FETCH_REQUEST";
5
6
  export declare const SLIDES_TO_REVIEW_FETCH_SUCCESS: "@@slidesToReview/FETCH_SUCCESS";
6
7
  export declare const SLIDES_TO_REVIEW_FETCH_FAILURE: "@@slidesToReview/FETCH_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
- import type { ThunkOptions, ProgressionFromAPI } from '../../types/common';
2
+ import type { ProgressionFromAPI } from '@coorpacademy/review-services';
3
3
  import type { StoreState } from '../../reducers';
4
+ import type { ThunkOptions } from '../../types/common';
4
5
  export declare const POST_ANSWER_REQUEST: "@@answer/POST_REQUEST";
5
6
  export declare const POST_ANSWER_SUCCESS: "@@answer/POST_SUCCESS";
6
7
  export declare const POST_ANSWER_FAILURE: "@@answer/POST_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
- import type { ThunkOptions, ProgressionFromAPI } from '../../types/common';
2
+ import type { ProgressionFromAPI } from '@coorpacademy/review-services';
3
3
  import type { StoreState } from '../../reducers';
4
+ import type { ThunkOptions } from '../../types/common';
4
5
  export declare const POST_PROGRESSION_REQUEST: "@@progression/POST_REQUEST";
5
6
  export declare const POST_PROGRESSION_SUCCESS: "@@progression/POST_SUCCESS";
6
7
  export declare const POST_PROGRESSION_FAILURE: "@@progression/POST_FAILURE";
@@ -1,6 +1,6 @@
1
1
  import { Dispatch } from 'redux';
2
- import type { StoreState } from '../../reducers';
3
2
  import { ThunkOptions, AppOptions, ViewName } from '../../types/common';
3
+ import type { StoreState } from '../../reducers';
4
4
  export declare type NavigateToAction = {
5
5
  type: '@@navigation/NAVIGATE_TO';
6
6
  payload: ViewName;
@@ -1,4 +1,4 @@
1
- import { SlideFromAPI } from '../../types/common';
1
+ import type { SlideFromAPI } from '@coorpacademy/review-services';
2
2
  import { AnswerUI } from '../../types/slides';
3
3
  declare type SlideUIAnimations = 'unstack' | 'restack';
4
4
  export declare type Slide = {
@@ -1,4 +1,4 @@
1
- import type { ProgressionFromAPI } from '../types/common';
1
+ import type { ProgressionFromAPI } from '@coorpacademy/review-services';
2
2
  export declare const slideIndexes: readonly ["0", "1", "2", "3", "4"];
3
3
  export declare type SlideIndexes = typeof slideIndexes[number];
4
4
  export declare const getProgressionSlidesRefs: (progression: ProgressionFromAPI) => string[];
@@ -1,4 +1,4 @@
1
1
  import { AnyAction, Store } from 'redux';
2
2
  import { StoreState } from './reducers';
3
- import { AppOptions } from './types/common';
3
+ import type { AppOptions } from './types/common';
4
4
  export default function configureStore(options: AppOptions): Store<StoreState, AnyAction>;
@@ -1,7 +1,7 @@
1
1
  import { applyMiddleware, compose, createStore } from 'redux';
2
2
  import thunk from 'redux-thunk';
3
+ import { getServices } from '@coorpacademy/review-services';
3
4
  import rootReducer from './reducers';
4
- import { getServices } from './services';
5
5
  export default function configureStore(options) {
6
6
  const _compose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
7
7
  ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
@@ -1,4 +1,4 @@
1
- import type { CorrectionFromAPI } from '../../types/common';
1
+ import type { CorrectionFromAPI } from '@coorpacademy/review-services';
2
2
  import { ReceivedCorrection, FetchCorrection } from '../../actions/api/fetch-correction';
3
3
  import { FetchProgression } from '../../actions/api/post-progression';
4
4
  export declare type CorrectionsState = Record<string, CorrectionFromAPI>;
@@ -1,5 +1,5 @@
1
+ import type { Skill } from '@coorpacademy/review-services';
1
2
  import { ReceivedSkill } from '../../actions/api/fetch-skill';
2
- import { Skill } from '../../types/common';
3
3
  export declare type CurrentSkillState = Skill | null;
4
4
  declare const reducer: (state: CurrentSkillState | undefined, action: ReceivedSkill) => CurrentSkillState;
5
5
  export default reducer;
@@ -1,6 +1,6 @@
1
+ import type { ProgressionFromAPI } from '@coorpacademy/review-services';
1
2
  import { PostAnswerSuccessAction } from '../../actions/api/post-answer';
2
3
  import { FetchProgression, ReceivedProgression } from '../../actions/api/post-progression';
3
- import { ProgressionFromAPI } from '../../types/common';
4
4
  export declare type ProgressionState = ProgressionFromAPI | null;
5
5
  declare const reducer: (state: ProgressionState | undefined, action: ReceivedProgression | PostAnswerSuccessAction | FetchProgression) => ProgressionState;
6
6
  export default reducer;
@@ -1,4 +1,4 @@
1
- import { SkillToReview } from '../../types/common';
1
+ import type { SkillToReview } from '@coorpacademy/review-services';
2
2
  import { ReceivedSkills } from '../../actions/api/fetch-skills';
3
3
  export declare type SkillsState = SkillToReview[];
4
4
  declare const reducer: (state: SkillsState | undefined, action: ReceivedSkills) => SkillsState;
@@ -1,6 +1,6 @@
1
+ import type { SlideFromAPI } from '@coorpacademy/review-services';
1
2
  import { ReceivedSlide, FetchSlide } from '../../actions/api/fetch-slide';
2
3
  import { FetchProgression } from '../../actions/api/post-progression';
3
- import { SlideFromAPI } from '../../types/common';
4
4
  export declare type SlidesAction = FetchSlide | ReceivedSlide;
5
5
  export declare type SlidesState = Record<string, SlideFromAPI | null>;
6
6
  export declare const initialState: SlidesState;
@@ -1,163 +1,15 @@
1
- export declare type ViewName = 'skills' | 'onboarding' | 'slides' | 'loader';
1
+ import type { Services } from '@coorpacademy/review-services';
2
+ export declare type WithRequired<T, K extends keyof T> = T & {
3
+ [P in K]-?: T[P];
4
+ };
2
5
  export interface Translate {
3
6
  (key: string, data?: Record<string, string>): string;
4
7
  }
5
- export declare type ChoiceFromAPI = {
6
- _id: string;
7
- id?: string;
8
- value?: string;
9
- name?: string;
10
- type?: 'text' | 'select';
11
- label?: string;
12
- items: {
13
- text: string;
14
- value: string;
15
- _id: string;
16
- }[];
17
- media?: unknown;
18
- };
19
- declare type BaseContent = {
20
- media?: unknown;
21
- choices: ChoiceFromAPI[];
22
- answers: string[][];
23
- };
24
- declare type BaseQuestion = {
25
- header?: string;
26
- content: BaseContent;
27
- explanation?: string;
28
- };
29
- export declare type QcmQuestion = BaseQuestion & {
30
- type: 'qcm';
31
- };
32
- export declare type QcmGraphicQuestion = BaseQuestion & {
33
- type: 'qcmGraphic';
34
- };
35
- export declare type QcmDragQuestion = BaseQuestion & {
36
- type: 'qcmDrag';
37
- };
38
- export declare type BasicQuestion = Omit<BaseQuestion, 'content'> & {
39
- type: 'basic';
40
- content: {
41
- media?: unknown;
42
- label?: string;
43
- placeholder?: string;
44
- id: string;
45
- answers: string[][];
46
- };
47
- };
48
- export declare type SliderQuestion = Omit<BaseQuestion, 'content'> & {
49
- content: {
50
- media?: unknown;
51
- unitLabel: string;
52
- min: number;
53
- max: number;
54
- step?: number;
55
- answers: string[][];
56
- };
57
- type: 'slider';
58
- };
59
- export declare type TemplateQuestion = Omit<BaseQuestion, 'content'> & {
60
- content: BaseContent & {
61
- template: string;
62
- answers: string[][];
63
- };
64
- type: 'template';
65
- };
66
- export declare type Question = QcmQuestion | QcmGraphicQuestion | QcmDragQuestion | BasicQuestion | SliderQuestion | TemplateQuestion;
67
- export declare type SlideFromAPI = {
68
- _id: string;
69
- question: Question;
70
- klf: string;
71
- universalRef: string;
72
- tips?: string;
73
- clue?: string;
74
- hasClue?: boolean;
75
- parentContentTitle: {
76
- title: string;
77
- type: 'chapter' | 'course';
78
- };
79
- };
80
- export declare type SlideIdFromAPI = {
81
- slideId: string;
82
- };
83
- export declare type Rank = {
84
- rank: number;
85
- };
86
- export declare type ProgressionAnswerItem = {
87
- isCorrect: boolean;
88
- slideRef: string;
89
- answer: string[];
90
- };
91
- export declare type SlideContent = {
92
- type: 'slide';
93
- ref: string;
94
- };
95
- export declare type SuccessNodeContent = {
96
- type: 'success';
97
- ref: 'successExitNode';
98
- };
99
- export declare type ProgressionState = {
100
- allAnswers: ProgressionAnswerItem[];
101
- content?: SlideContent;
102
- isCorrect: boolean;
103
- lives?: number;
104
- livesDisabled?: boolean;
105
- hasViewedAResourceAtThisStep?: boolean;
106
- nextContent: SlideContent | SuccessNodeContent;
107
- pendingSlides: string[];
108
- remainingLifeRequests?: number;
109
- requestedClues?: [];
110
- variables?: {};
111
- viewedResources?: [];
112
- slides: string[];
113
- step: {
114
- current: number;
8
+ export declare type ViewName = 'skills' | 'onboarding' | 'slides' | 'loader';
9
+ export declare type Skin = {
10
+ common: {
11
+ primary: string;
115
12
  };
116
- stars: number;
117
- };
118
- export declare type ReviewContent = {
119
- type: 'skill';
120
- ref: string;
121
- };
122
- export declare type ReviewEngine = {
123
- ref: 'review';
124
- };
125
- export declare type ProgressionFromAPI = {
126
- _id: string;
127
- content: ReviewContent;
128
- engine: ReviewEngine;
129
- state: ProgressionState;
130
- };
131
- export declare type CorrectedChoice = {
132
- answer: string;
133
- isCorrect: boolean;
134
- };
135
- export declare type CorrectionFromAPI = {
136
- correctAnswer: string[];
137
- corrections: CorrectedChoice[];
138
- };
139
- export declare type SkillToReview = {
140
- skillRef: string;
141
- slidesToReview: number;
142
- custom: boolean;
143
- name: string;
144
- };
145
- export declare type Skill = {
146
- name: string;
147
- ref: string;
148
- };
149
- export declare type Services = {
150
- fetchSkill(skillRef: string, token: string): Promise<Skill>;
151
- fetchSkills(token: string): Promise<SkillToReview[]>;
152
- fetchSlide(slideRef: string, token: string): Promise<SlideFromAPI | void>;
153
- postProgression(skillRef: string, token: string): Promise<ProgressionFromAPI>;
154
- postAnswer(progression: ProgressionFromAPI, token: string, answer: string[]): Promise<ProgressionFromAPI>;
155
- fetchCorrection(slideRef: string, token: string, progressionId: string, answer: string[]): Promise<CorrectionFromAPI | void>;
156
- fetchRank(token: string): Promise<Rank>;
157
- fetchSlidesToReviewBySkillRef(token: string, skillRef: string): Promise<SlideIdFromAPI[]>;
158
- };
159
- export declare type Options = {
160
- services: Services;
161
13
  };
162
14
  export declare type ConnectedOptions = {
163
15
  translate: Translate;
@@ -174,34 +26,6 @@ export declare type ThunkOptions = {
174
26
  callbackOnViewChanged?: AppOptions['callbackOnViewChanged'];
175
27
  services: Services;
176
28
  };
177
- export declare type JWT = {
178
- exp: number;
179
- iat: number;
180
- grants: unknown;
181
- iss: string;
182
- user: string;
183
- usage: string;
184
- host: string;
185
- };
186
- export declare type WithRequired<T, K extends keyof T> = T & {
187
- [P in K]-?: T[P];
188
- };
189
- export declare type Skin = {
190
- common: {
191
- primary: string;
192
- };
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;
29
+ export declare type Options = {
30
+ services: Services;
206
31
  };
207
- export {};
@@ -1,4 +1,4 @@
1
1
  import { ReviewSkillsProps } from '@coorpacademy/components/es/template/app-review/skills/prop-types';
2
- import { StoreState } from '../../reducers';
3
2
  import type { ConnectedOptions } from '../../types/common';
3
+ import { StoreState } from '../../reducers';
4
4
  export declare const mapStateToSkillsProps: (state: StoreState, options: ConnectedOptions) => ReviewSkillsProps;
@@ -1,7 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
2
  import { ReviewPlayerProps } from '@coorpacademy/components/es/template/app-review/player/prop-types';
3
3
  import { SlideProps } from '@coorpacademy/components/es/organism/review-slide/prop-types';
4
- import type { ConnectedOptions } from '../../types/common';
4
+ import { ConnectedOptions } from '../../types/common';
5
5
  import type { StoreState } from '../../reducers';
6
6
  import type { AnswerUI } from '../../types/slides';
7
7
  declare const ICON_VALUES: {
@@ -1,6 +1,7 @@
1
1
  import { Dispatch } from 'redux';
2
+ import type { Question, SlideFromAPI } from '@coorpacademy/review-services';
2
3
  import { AnswerUI } from '../../types/slides';
3
- import { Question, SlideFromAPI, Translate } from '../../types/common';
4
+ import { Translate } from '../../types/common';
4
5
  export declare const getQuestionType: (question: Question) => Question['type'];
5
6
  export declare const mapApiSlideToUi: (dispatch: Dispatch, translate: Translate) => (slide: SlideFromAPI, answers: string[]) => {
6
7
  questionText: string;
@@ -74,7 +74,7 @@ const templateSelectProps = (dispatch, translate, answers, choice, index, maxLen
74
74
  validOption: false,
75
75
  selected: true
76
76
  };
77
- const selectOptions = choice.items.map(item => {
77
+ const selectOptions = choice.items.map((item) => {
78
78
  const itemText = getOr('', 'text', item);
79
79
  return {
80
80
  name: itemText,
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
+ import type { CorrectionFromAPI } from '@coorpacademy/review-services';
3
+ import type { ThunkOptions } from '../../types/common';
2
4
  import type { StoreState } from '../../reducers';
3
- import type { CorrectionFromAPI, ThunkOptions } from '../../types/common';
4
5
  export declare const CORRECTION_FETCH_REQUEST: "@@correction/FETCH_REQUEST";
5
6
  export declare const CORRECTION_FETCH_SUCCESS: "@@correction/FETCH_SUCCESS";
6
7
  export declare const CORRECTION_FETCH_FAILURE: "@@correction/FETCH_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
+ import type { Rank, Services } from '@coorpacademy/review-services';
3
+ import type { ThunkOptions } from '../../types/common';
2
4
  import type { StoreState } from '../../reducers';
3
- import type { Rank, Services, ThunkOptions } from '../../types/common';
4
5
  export declare const RANK_FETCH_START_REQUEST: "@@rank/FETCH_START_REQUEST";
5
6
  export declare const RANK_FETCH_START_SUCCESS: "@@rank/FETCH_START_SUCCESS";
6
7
  export declare const RANK_FETCH_START_FAILURE: "@@rank/FETCH_START_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import { Dispatch } from 'redux';
2
+ import type { Skill } from '@coorpacademy/review-services';
3
+ import type { ThunkOptions } from '../../types/common';
2
4
  import type { StoreState } from '../../reducers';
3
- import type { Skill, ThunkOptions } from '../../types/common';
4
5
  export declare const SKILL_FETCH_REQUEST: "@@skill/FETCH_REQUEST";
5
6
  export declare const SKILL_FETCH_SUCCESS: "@@skill/FETCH_SUCCESS";
6
7
  export declare const SKILL_FETCH_FAILURE: "@@skill/FETCH_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
+ import type { SkillToReview } from '@coorpacademy/review-services';
2
3
  import type { StoreState } from '../../reducers';
3
- import type { ThunkOptions, SkillToReview } from '../../types/common';
4
+ import type { ThunkOptions } from '../../types/common';
4
5
  export declare const SKILLS_FETCH_REQUEST: "@@skills/FETCH_REQUEST";
5
6
  export declare const SKILLS_FETCH_SUCCESS: "@@skills/FETCH_SUCCESS";
6
7
  export declare const SKILLS_FETCH_FAILURE: "@@skills/FETCH_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
+ import type { SlideFromAPI } from '@coorpacademy/review-services';
3
+ import type { ThunkOptions } from '../../types/common';
2
4
  import type { StoreState } from '../../reducers';
3
- import type { ThunkOptions, SlideFromAPI } from '../../types/common';
4
5
  export declare const SLIDE_FETCH_REQUEST: "@@slides/FETCH_REQUEST";
5
6
  export declare const SLIDE_FETCH_SUCCESS: "@@slides/FETCH_SUCCESS";
6
7
  export declare const SLIDE_FETCH_FAILURE: "@@slides/FETCH_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
+ import type { SlideIdFromAPI } from '@coorpacademy/review-services';
3
+ import { Options } from '../../types/common';
2
4
  import type { StoreState } from '../../reducers';
3
- import type { Options, SlideIdFromAPI } from '../../types/common';
4
5
  export declare const SLIDES_TO_REVIEW_FETCH_REQUEST: "@@slidesToReview/FETCH_REQUEST";
5
6
  export declare const SLIDES_TO_REVIEW_FETCH_SUCCESS: "@@slidesToReview/FETCH_SUCCESS";
6
7
  export declare const SLIDES_TO_REVIEW_FETCH_FAILURE: "@@slidesToReview/FETCH_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
- import type { ThunkOptions, ProgressionFromAPI } from '../../types/common';
2
+ import type { ProgressionFromAPI } from '@coorpacademy/review-services';
3
3
  import type { StoreState } from '../../reducers';
4
+ import type { ThunkOptions } from '../../types/common';
4
5
  export declare const POST_ANSWER_REQUEST: "@@answer/POST_REQUEST";
5
6
  export declare const POST_ANSWER_SUCCESS: "@@answer/POST_SUCCESS";
6
7
  export declare const POST_ANSWER_FAILURE: "@@answer/POST_FAILURE";
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from 'redux';
2
- import type { ThunkOptions, ProgressionFromAPI } from '../../types/common';
2
+ import type { ProgressionFromAPI } from '@coorpacademy/review-services';
3
3
  import type { StoreState } from '../../reducers';
4
+ import type { ThunkOptions } from '../../types/common';
4
5
  export declare const POST_PROGRESSION_REQUEST: "@@progression/POST_REQUEST";
5
6
  export declare const POST_PROGRESSION_SUCCESS: "@@progression/POST_SUCCESS";
6
7
  export declare const POST_PROGRESSION_FAILURE: "@@progression/POST_FAILURE";
@@ -1,6 +1,6 @@
1
1
  import { Dispatch } from 'redux';
2
- import type { StoreState } from '../../reducers';
3
2
  import { ThunkOptions, AppOptions, ViewName } from '../../types/common';
3
+ import type { StoreState } from '../../reducers';
4
4
  export declare type NavigateToAction = {
5
5
  type: '@@navigation/NAVIGATE_TO';
6
6
  payload: ViewName;
@@ -1,4 +1,4 @@
1
- import { SlideFromAPI } from '../../types/common';
1
+ import type { SlideFromAPI } from '@coorpacademy/review-services';
2
2
  import { AnswerUI } from '../../types/slides';
3
3
  declare type SlideUIAnimations = 'unstack' | 'restack';
4
4
  export declare type Slide = {
@@ -1,4 +1,4 @@
1
- import type { ProgressionFromAPI } from '../types/common';
1
+ import type { ProgressionFromAPI } from '@coorpacademy/review-services';
2
2
  export declare const slideIndexes: readonly ["0", "1", "2", "3", "4"];
3
3
  export declare type SlideIndexes = typeof slideIndexes[number];
4
4
  export declare const getProgressionSlidesRefs: (progression: ProgressionFromAPI) => string[];
@@ -1,4 +1,4 @@
1
1
  import { AnyAction, Store } from 'redux';
2
2
  import { StoreState } from './reducers';
3
- import { AppOptions } from './types/common';
3
+ import type { AppOptions } from './types/common';
4
4
  export default function configureStore(options: AppOptions): Store<StoreState, AnyAction>;
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const redux_1 = require("redux");
7
7
  const redux_thunk_1 = __importDefault(require("redux-thunk"));
8
+ const review_services_1 = require("@coorpacademy/review-services");
8
9
  const reducers_1 = __importDefault(require("./reducers"));
9
- const services_1 = require("./services");
10
10
  function configureStore(options) {
11
11
  const _compose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
12
12
  ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
@@ -16,7 +16,7 @@ function configureStore(options) {
16
16
  })
17
17
  : redux_1.compose;
18
18
  const thunkOptions = {
19
- services: options.services || (0, services_1.getServices)(),
19
+ services: options.services || (0, review_services_1.getServices)(),
20
20
  callbackOnViewChanged: options.callbackOnViewChanged
21
21
  };
22
22
  const thunkMiddleware = redux_thunk_1.default.withExtraArgument(thunkOptions);
@@ -1,4 +1,4 @@
1
- import type { CorrectionFromAPI } from '../../types/common';
1
+ import type { CorrectionFromAPI } from '@coorpacademy/review-services';
2
2
  import { ReceivedCorrection, FetchCorrection } from '../../actions/api/fetch-correction';
3
3
  import { FetchProgression } from '../../actions/api/post-progression';
4
4
  export declare type CorrectionsState = Record<string, CorrectionFromAPI>;
@@ -1,5 +1,5 @@
1
+ import type { Skill } from '@coorpacademy/review-services';
1
2
  import { ReceivedSkill } from '../../actions/api/fetch-skill';
2
- import { Skill } from '../../types/common';
3
3
  export declare type CurrentSkillState = Skill | null;
4
4
  declare const reducer: (state: CurrentSkillState | undefined, action: ReceivedSkill) => CurrentSkillState;
5
5
  export default reducer;
@@ -1,6 +1,6 @@
1
+ import type { ProgressionFromAPI } from '@coorpacademy/review-services';
1
2
  import { PostAnswerSuccessAction } from '../../actions/api/post-answer';
2
3
  import { FetchProgression, ReceivedProgression } from '../../actions/api/post-progression';
3
- import { ProgressionFromAPI } from '../../types/common';
4
4
  export declare type ProgressionState = ProgressionFromAPI | null;
5
5
  declare const reducer: (state: ProgressionState | undefined, action: ReceivedProgression | PostAnswerSuccessAction | FetchProgression) => ProgressionState;
6
6
  export default reducer;
@@ -1,4 +1,4 @@
1
- import { SkillToReview } from '../../types/common';
1
+ import type { SkillToReview } from '@coorpacademy/review-services';
2
2
  import { ReceivedSkills } from '../../actions/api/fetch-skills';
3
3
  export declare type SkillsState = SkillToReview[];
4
4
  declare const reducer: (state: SkillsState | undefined, action: ReceivedSkills) => SkillsState;
@@ -1,6 +1,6 @@
1
+ import type { SlideFromAPI } from '@coorpacademy/review-services';
1
2
  import { ReceivedSlide, FetchSlide } from '../../actions/api/fetch-slide';
2
3
  import { FetchProgression } from '../../actions/api/post-progression';
3
- import { SlideFromAPI } from '../../types/common';
4
4
  export declare type SlidesAction = FetchSlide | ReceivedSlide;
5
5
  export declare type SlidesState = Record<string, SlideFromAPI | null>;
6
6
  export declare const initialState: SlidesState;