@coorpacademy/app-review 0.7.6-alpha.24 → 0.7.6-alpha.26
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/services/fetch-skill.d.ts +2 -0
- package/es/services/fetch-skill.js +10 -0
- package/es/services/index.js +2 -0
- package/es/types/common.d.ts +2 -1
- package/lib/services/fetch-skill.d.ts +2 -0
- package/lib/services/fetch-skill.js +17 -0
- package/lib/services/index.js +2 -0
- package/lib/types/common.d.ts +2 -1
- package/locales/bs/review.json +44 -8
- package/locales/hy/review.json +43 -7
- package/package.json +3 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import crossFetch from 'cross-fetch';
|
|
2
|
+
import decode from 'jwt-decode';
|
|
3
|
+
import { toJSON } from './tools/fetch-responses';
|
|
4
|
+
export const fetchSkill = async (skillRef, token) => {
|
|
5
|
+
const { host } = decode(token);
|
|
6
|
+
const response = await crossFetch(`${host}/api/v2/skills?conditions={"ref":"${skillRef}"}`, {
|
|
7
|
+
headers: { authorization: token }
|
|
8
|
+
});
|
|
9
|
+
return toJSON(response);
|
|
10
|
+
};
|
package/es/services/index.js
CHANGED
|
@@ -5,9 +5,11 @@ import { fetchSlide } from './fetch-slide';
|
|
|
5
5
|
import { fetchSlidesToReviewBySkillRef } from './fetch-slides-to-review-by-skill-ref';
|
|
6
6
|
import { postAnswer } from './post-answer';
|
|
7
7
|
import { postProgression } from './post-progression';
|
|
8
|
+
import { fetchSkill } from './fetch-skill';
|
|
8
9
|
export const getServices = () => ({
|
|
9
10
|
fetchCorrection,
|
|
10
11
|
fetchRank,
|
|
12
|
+
fetchSkill,
|
|
11
13
|
fetchSkills,
|
|
12
14
|
fetchSlide,
|
|
13
15
|
fetchSlidesToReviewBySkillRef,
|
package/es/types/common.d.ts
CHANGED
|
@@ -130,9 +130,10 @@ export declare type SkillToReview = {
|
|
|
130
130
|
};
|
|
131
131
|
export declare type Skill = {
|
|
132
132
|
name: string;
|
|
133
|
-
|
|
133
|
+
ref: string;
|
|
134
134
|
};
|
|
135
135
|
export declare type Services = {
|
|
136
|
+
fetchSkill(skillRef: string, token: string): Promise<Skill>;
|
|
136
137
|
fetchSkills(token: string): Promise<SkillToReview[]>;
|
|
137
138
|
fetchSlide(slideRef: string, token: string): Promise<SlideFromAPI | void>;
|
|
138
139
|
postProgression(skillRef: string, token: string): Promise<ProgressionFromAPI>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.fetchSkill = void 0;
|
|
7
|
+
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
8
|
+
const jwt_decode_1 = __importDefault(require("jwt-decode"));
|
|
9
|
+
const fetch_responses_1 = require("./tools/fetch-responses");
|
|
10
|
+
const fetchSkill = async (skillRef, token) => {
|
|
11
|
+
const { host } = (0, jwt_decode_1.default)(token);
|
|
12
|
+
const response = await (0, cross_fetch_1.default)(`${host}/api/v2/skills?conditions={"ref":"${skillRef}"}`, {
|
|
13
|
+
headers: { authorization: token }
|
|
14
|
+
});
|
|
15
|
+
return (0, fetch_responses_1.toJSON)(response);
|
|
16
|
+
};
|
|
17
|
+
exports.fetchSkill = fetchSkill;
|
package/lib/services/index.js
CHANGED
|
@@ -8,9 +8,11 @@ const fetch_slide_1 = require("./fetch-slide");
|
|
|
8
8
|
const fetch_slides_to_review_by_skill_ref_1 = require("./fetch-slides-to-review-by-skill-ref");
|
|
9
9
|
const post_answer_1 = require("./post-answer");
|
|
10
10
|
const post_progression_1 = require("./post-progression");
|
|
11
|
+
const fetch_skill_1 = require("./fetch-skill");
|
|
11
12
|
const getServices = () => ({
|
|
12
13
|
fetchCorrection: fetch_correction_1.fetchCorrection,
|
|
13
14
|
fetchRank: fetch_rank_1.fetchRank,
|
|
15
|
+
fetchSkill: fetch_skill_1.fetchSkill,
|
|
14
16
|
fetchSkills: fetch_skills_1.fetchSkills,
|
|
15
17
|
fetchSlide: fetch_slide_1.fetchSlide,
|
|
16
18
|
fetchSlidesToReviewBySkillRef: fetch_slides_to_review_by_skill_ref_1.fetchSlidesToReviewBySkillRef,
|
package/lib/types/common.d.ts
CHANGED
|
@@ -130,9 +130,10 @@ export declare type SkillToReview = {
|
|
|
130
130
|
};
|
|
131
131
|
export declare type Skill = {
|
|
132
132
|
name: string;
|
|
133
|
-
|
|
133
|
+
ref: string;
|
|
134
134
|
};
|
|
135
135
|
export declare type Services = {
|
|
136
|
+
fetchSkill(skillRef: string, token: string): Promise<Skill>;
|
|
136
137
|
fetchSkills(token: string): Promise<SkillToReview[]>;
|
|
137
138
|
fetchSlide(slideRef: string, token: string): Promise<SlideFromAPI | void>;
|
|
138
139
|
postProgression(skillRef: string, token: string): Promise<ProgressionFromAPI>;
|
package/locales/bs/review.json
CHANGED
|
@@ -2,17 +2,53 @@
|
|
|
2
2
|
"Review Title": "Recenzija Mode",
|
|
3
3
|
"Content Parent Title": "Od `{{contentTitle}}` `{{contentType}}`",
|
|
4
4
|
"Validate": "Potvrdi",
|
|
5
|
-
"Next
|
|
6
|
-
"KLF": "
|
|
7
|
-
"Correct Answer": "
|
|
5
|
+
"Next Question": "Sljedeće pitanje",
|
|
6
|
+
"KLF": "Ključna tačka",
|
|
7
|
+
"Correct Answer": "Dobar odgovor",
|
|
8
8
|
"Wrong Answer": "Pogrešan odgovor",
|
|
9
9
|
"You have won": "Pobijedio si",
|
|
10
10
|
"You are now": "Sada jesi",
|
|
11
|
-
"Revise another skill": "
|
|
11
|
+
"Revise another skill": "Pregledajte drugu vještinu",
|
|
12
12
|
"Continue reviewing": "Nastavite sa pregledom",
|
|
13
13
|
"Congratulations!": "Čestitamo!",
|
|
14
|
-
"
|
|
15
|
-
"Quit
|
|
16
|
-
"
|
|
17
|
-
"
|
|
14
|
+
"aria_label": "Pregledajte predložak vještina",
|
|
15
|
+
"Quit Title": "Jeste li sigurni da želite odustati?",
|
|
16
|
+
"Quit Description Text": "Na pravom ste putu! Ako sada odustanete, izgubit ćete svoj napredak.",
|
|
17
|
+
"Stop learning": "Završi sesiju",
|
|
18
|
+
"Continue learning": "Nastavite sa učenjem",
|
|
19
|
+
"presentation": {
|
|
20
|
+
"aria_label": "Pregledajte Presentation Container",
|
|
21
|
+
"title": "Šta je<br/> Revision Mode ?",
|
|
22
|
+
"text": "Informacije nestaju iz vašeg uma čim uđu u njega? Sasvim je normalno: nema zadržavanja bez ponavljanja! Da biste zadržali svoje znanje dugoročno, koristite Revision Mode da osvježite svoje pamćenje!",
|
|
23
|
+
"button": "Ok, shvatio sam!",
|
|
24
|
+
"label_list": {
|
|
25
|
+
"skills": {
|
|
26
|
+
"text": "Odaberite 1 vještinu",
|
|
27
|
+
"tooltip": "Možete pregledati jednu po jednu vještinu."
|
|
28
|
+
},
|
|
29
|
+
"questions": {
|
|
30
|
+
"text": "Odgovorite na 5 pitanja",
|
|
31
|
+
"tooltip": "Odgovorite na 5 pitanja ispravno da potvrdite svoju sesiju modusa revizije."
|
|
32
|
+
},
|
|
33
|
+
"lifes": {
|
|
34
|
+
"text": "Imate beskonačan život",
|
|
35
|
+
"tooltip": "Možete odgovoriti koliko god puta želite da završite sesiju."
|
|
36
|
+
},
|
|
37
|
+
"allright": {
|
|
38
|
+
"text": "U redu",
|
|
39
|
+
"tooltip": "Da biste potvrdili svoju sesiju, morate dobiti tačan odgovor na svako pitanje."
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"list_title": "Vještine koje možete pregledati",
|
|
44
|
+
"list_aria_label": "Pregledajte Spremnik vještina",
|
|
45
|
+
"card": {
|
|
46
|
+
"aria_label": "Kartica vještina",
|
|
47
|
+
"text": "{{total}} pitanja za pregled",
|
|
48
|
+
"button_text": "Pregledajte ovu vještinu"
|
|
49
|
+
},
|
|
50
|
+
"no_skills": {
|
|
51
|
+
"title": "Još nemate vještinu za reviziju",
|
|
52
|
+
"text": "Prvo morate završiti kurseve prije nego što možete provjeriti različite vještine."
|
|
53
|
+
}
|
|
18
54
|
}
|
package/locales/hy/review.json
CHANGED
|
@@ -2,17 +2,53 @@
|
|
|
2
2
|
"Review Title": "Վերանայման ռեժիմ",
|
|
3
3
|
"Content Parent Title": "'{{contentTitle}}՝ ՝{{contentType}}՝-ից",
|
|
4
4
|
"Validate": "Վավերացնել",
|
|
5
|
-
"Next
|
|
6
|
-
"KLF": "
|
|
7
|
-
"Correct Answer": "
|
|
5
|
+
"Next Question": "Հաջորդ Հարցը",
|
|
6
|
+
"KLF": "Կարեւոր կետ",
|
|
7
|
+
"Correct Answer": "Լավ պատասխան",
|
|
8
8
|
"Wrong Answer": "Սխալ պատասխանը",
|
|
9
9
|
"You have won": "Դու հաղթել ես",
|
|
10
10
|
"You are now": "Դուք հիմա եք",
|
|
11
11
|
"Revise another skill": "Վերանայեք մեկ այլ հմտություն",
|
|
12
12
|
"Continue reviewing": "Շարունակեք վերանայել",
|
|
13
13
|
"Congratulations!": "Շնորհավորում եմ:",
|
|
14
|
-
"
|
|
15
|
-
"Quit
|
|
16
|
-
"
|
|
17
|
-
"
|
|
14
|
+
"aria_label": "Վերանայման հմտությունների ձևանմուշ",
|
|
15
|
+
"Quit Title": "Դուք վստահ եք, որ ցանկանում եք դուրս գալ ?",
|
|
16
|
+
"Quit Description Text": "Դուք ճիշտ ուղու վրա եք: Եթե հիմա թողնեք, կկորցնեք ձեր առաջընթացը:",
|
|
17
|
+
"Stop learning": "Ավարտել նիստը",
|
|
18
|
+
"Continue learning": "Շարունակեք սովորել",
|
|
19
|
+
"presentation": {
|
|
20
|
+
"aria_label": "Վերանայման ներկայացման կոնտեյներ",
|
|
21
|
+
"title": "Ինչ է<br/> Վերանայման ռեժիմ.",
|
|
22
|
+
"text": "Տեղեկատվությունը անհետանում է ձեր մտքից հենց այն մտնում է այն: Դա միանգամայն նորմալ է. չկա պահպանում առանց կրկնության: Ձեր գիտելիքները երկարաժամկետ պահպանելու համար օգտագործեք Վերանայման ռեժիմը՝ ձեր հիշողությունը թարմացնելու համար:",
|
|
23
|
+
"button": "Լավ, հասկացա!",
|
|
24
|
+
"label_list": {
|
|
25
|
+
"skills": {
|
|
26
|
+
"text": "Ընտրեք 1 հմտություն",
|
|
27
|
+
"tooltip": "Դուք կարող եք միաժամանակ վերանայել մեկ հմտություն:"
|
|
28
|
+
},
|
|
29
|
+
"questions": {
|
|
30
|
+
"text": "Պատասխանեք 5 հարցի",
|
|
31
|
+
"tooltip": "Ճիշտ պատասխանեք 5 հարցերին՝ ձեր վերանայման ռեժիմի նիստը հաստատելու համար:"
|
|
32
|
+
},
|
|
33
|
+
"lifes": {
|
|
34
|
+
"text": "Դուք ունեք անսահման կենդանի",
|
|
35
|
+
"tooltip": "Դուք կարող եք պատասխանել այնքան անգամ, որքան ցանկանում եք, որպեսզի ավարտեք ձեր նիստը:"
|
|
36
|
+
},
|
|
37
|
+
"allright": {
|
|
38
|
+
"text": "Ստացեք ամեն ինչ ճիշտ",
|
|
39
|
+
"tooltip": "Ձեր նիստը հաստատելու համար դուք պետք է ստանաք ճիշտ պատասխան յուրաքանչյուր հարցի համար:"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"list_title": "Հմտություններ, որոնք կարող եք վերանայել",
|
|
44
|
+
"list_aria_label": "Review Skills Container",
|
|
45
|
+
"card": {
|
|
46
|
+
"aria_label": "Հմտության քարտ",
|
|
47
|
+
"text": "{{total}} հարցեր վերանայելու համար",
|
|
48
|
+
"button_text": "Վերանայեք այս հմտությունը"
|
|
49
|
+
},
|
|
50
|
+
"no_skills": {
|
|
51
|
+
"title": "Դեռևս վերանայելու հմտություն չունեք",
|
|
52
|
+
"text": "Սկզբում դուք պետք է ավարտեք դասընթացները, որպեսզի կարողանաք վերանայել տարբեր հմտություններ:"
|
|
53
|
+
}
|
|
18
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/app-review",
|
|
3
|
-
"version": "0.7.6-alpha.
|
|
3
|
+
"version": "0.7.6-alpha.26+4709f4e75",
|
|
4
4
|
"description": "",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16.15.0"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"main": "lib/index.js",
|
|
36
36
|
"module": "es/index.js",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@coorpacademy/components": "10.27.
|
|
38
|
+
"@coorpacademy/components": "10.27.4",
|
|
39
39
|
"@coorpacademy/redux-task": "1.1.6",
|
|
40
40
|
"@coorpacademy/translate": "6.1.5",
|
|
41
41
|
"cross-fetch": "^3.1.5",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"webpack-cli": "^4.10.0",
|
|
72
72
|
"webpack-dev-server": "^4.11.1"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "4709f4e75d13150f87add8b363314a8058e3ddb5"
|
|
75
75
|
}
|