@nakamura-123/pages 0.1.32 → 0.1.35
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/dist/component/Basic/BasicContents.js +2 -0
- package/dist/component/Basic/BasicProgressBar.d.ts +8 -0
- package/dist/component/Basic/BasicProgressBar.js +50 -0
- package/dist/component/Grade/UnitCircles copy.d.ts +7 -0
- package/dist/component/Grade/UnitCircles copy.js +58 -0
- package/dist/component/Grade/UnitCircles.d.ts +7 -0
- package/dist/component/Grade/UnitCircles.js +58 -0
- package/dist/component/Grade/YearCircles.d.ts +7 -0
- package/dist/component/Grade/YearCircles.js +57 -0
- package/dist/component/Result/ScoreCircle.js +6 -4
- package/dist/component/TagBadge5s.d.ts +2 -2
- package/dist/functions/gradeFnc.d.ts +1 -1
- package/dist/functions/gradeFnc.js +1 -1
- package/dist/functions/tagFncD.d.ts +1 -1
- package/dist/functions/tagFncJ.d.ts +1 -1
- package/dist/page/GradePage.js +9 -2
- package/dist/page/HomePage.js +1 -1
- package/dist/quiz/Title.js +22 -10
- package/dist/quiz/question/QuestionFormats.js +4 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -40,6 +40,7 @@ var BasicSetting_1 = __importDefault(require("./BasicSetting"));
|
|
|
40
40
|
var Guide_1 = __importDefault(require("../Guide"));
|
|
41
41
|
var SelectedExamCnt_1 = __importDefault(require("./SelectedExamCnt"));
|
|
42
42
|
var react_i18next_1 = require("react-i18next");
|
|
43
|
+
var BasicProgressBar_1 = __importDefault(require("./BasicProgressBar"));
|
|
43
44
|
var BasicPage = function (_a) {
|
|
44
45
|
var navigation = _a.navigation, subject = _a.subject, index = _a.index;
|
|
45
46
|
var dispatch = (0, react_redux_1.useDispatch)();
|
|
@@ -102,6 +103,7 @@ var BasicPage = function (_a) {
|
|
|
102
103
|
<react_native_1.View style={styles.navBar}/>
|
|
103
104
|
</Guide_1.default>
|
|
104
105
|
<common_1.RoundRectangle title={categoryName} style={styles.categoryName}/>
|
|
106
|
+
<BasicProgressBar_1.default subject={subject} index={index}/>
|
|
105
107
|
<SelectedExamCnt_1.default type={subject.type}/>
|
|
106
108
|
<common_1.HelpMark name="basicList" marginTop={20} top={-23}/>
|
|
107
109
|
<SubCategoryList_1.default navigation={navigation} topSubject={subject} index={index}/>
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
var common_1 = require("@nakamura-123/common");
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var react_native_1 = require("react-native");
|
|
9
|
+
var react_redux_1 = require("react-redux");
|
|
10
|
+
var basicHook_1 = require("../../hooks/basicHook");
|
|
11
|
+
var tagFncJ_1 = require("../../functions/tagFncJ");
|
|
12
|
+
var tagFncD_1 = require("../../functions/tagFncD");
|
|
13
|
+
var BasicProgressBar = function (_a) {
|
|
14
|
+
var subject = _a.subject, index = _a.index;
|
|
15
|
+
var selectKey = (0, react_redux_1.useSelector)(function (state) { return state.app[subject.list][index].key; });
|
|
16
|
+
var outOfYearRangeStore = (0, react_redux_1.useSelector)(function (state) { return state.quizCfg.startCfg.outOfYearRange; });
|
|
17
|
+
var outOfYearRange = subject.type === "unit" ? outOfYearRangeStore : undefined;
|
|
18
|
+
// Realm データベースクエリ
|
|
19
|
+
var QuestionDBInfo = (0, basicHook_1.useGetQuestionQuery)();
|
|
20
|
+
var getCategoryTags = QuestionDBInfo.system === "JLPT"
|
|
21
|
+
? (0, tagFncJ_1.getCategoryTagLevelCntsJ)(QuestionDBInfo.query, selectKey, subject.tag)
|
|
22
|
+
: (0, tagFncD_1.getCategoryTagLevelCntsD)(QuestionDBInfo.query, selectKey, subject.type, outOfYearRange);
|
|
23
|
+
var rate = Math.round((0, tagFncD_1.getCategoryRate)(getCategoryTags));
|
|
24
|
+
var progressColor = rate > 85 ? "red" : rate > 70 ? "green" : rate > 50 ? "yellow" : "blue";
|
|
25
|
+
return (<react_native_1.View style={styles.container}>
|
|
26
|
+
<react_native_1.View style={styles.progressBox}>
|
|
27
|
+
<common_1.ProgressBar progress={rate} barColor={progressColor} height={20}/>
|
|
28
|
+
</react_native_1.View>
|
|
29
|
+
<react_native_1.View style={styles.textBox}>
|
|
30
|
+
<common_1.MyText>{rate}%</common_1.MyText>
|
|
31
|
+
</react_native_1.View>
|
|
32
|
+
</react_native_1.View>);
|
|
33
|
+
};
|
|
34
|
+
var styles = react_native_1.StyleSheet.create({
|
|
35
|
+
container: {
|
|
36
|
+
// marginTop: 10,
|
|
37
|
+
// marginBottom: 5,
|
|
38
|
+
flexDirection: "row",
|
|
39
|
+
},
|
|
40
|
+
progressBox: {
|
|
41
|
+
flex: 1,
|
|
42
|
+
},
|
|
43
|
+
textBox: {
|
|
44
|
+
width: 50,
|
|
45
|
+
height: 20,
|
|
46
|
+
justifyContent: "flex-start",
|
|
47
|
+
alignItems: "center",
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
exports.default = BasicProgressBar;
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var react_native_1 = require("react-native");
|
|
8
|
+
var react_redux_1 = require("react-redux");
|
|
9
|
+
var tagFncJ_1 = require("../../functions/tagFncJ");
|
|
10
|
+
var tagFncD_1 = require("../../functions/tagFncD");
|
|
11
|
+
var SubCategoryLeft_1 = __importDefault(require("../Basic/SubCategoryLeft"));
|
|
12
|
+
var lib_1 = require("@nakamura-123/lib");
|
|
13
|
+
var common_1 = require("@nakamura-123/common");
|
|
14
|
+
var UnitCircles = function (_a) {
|
|
15
|
+
var QuestionDBInfo = _a.QuestionDBInfo;
|
|
16
|
+
var unitList = (0, react_redux_1.useSelector)(function (state) { return state.app.unitList; });
|
|
17
|
+
var outOfYearRange = (0, react_redux_1.useSelector)(function (state) { return state.quizCfg.startCfg.outOfYearRange; });
|
|
18
|
+
var circleInfos = unitList.map(function (_a) {
|
|
19
|
+
var key = _a.key, title = _a.title;
|
|
20
|
+
var tags = QuestionDBInfo.system === "JLPT"
|
|
21
|
+
? (0, tagFncJ_1.getCategoryTagLevelCntsJ)(QuestionDBInfo.query, key, "basicTag")
|
|
22
|
+
: (0, tagFncD_1.getCategoryTagLevelCntsD)(QuestionDBInfo.query, key, "unit", outOfYearRange);
|
|
23
|
+
var rate = Math.round((0, tagFncD_1.getCategoryRate)(tags));
|
|
24
|
+
return { title: title, rate: rate };
|
|
25
|
+
});
|
|
26
|
+
return (<react_native_1.View style={styles.container}>
|
|
27
|
+
{circleInfos.map(function (_a) {
|
|
28
|
+
var title = _a.title, rate = _a.rate;
|
|
29
|
+
return (<react_native_1.View key={title} style={styles.itemBox}>
|
|
30
|
+
<SubCategoryLeft_1.default rate={rate} isLocked={false}/>
|
|
31
|
+
<common_1.MyText style={{ fontSize: 11 }}>{title}</common_1.MyText>
|
|
32
|
+
</react_native_1.View>);
|
|
33
|
+
})}
|
|
34
|
+
</react_native_1.View>);
|
|
35
|
+
};
|
|
36
|
+
var styles = react_native_1.StyleSheet.create({
|
|
37
|
+
container: {
|
|
38
|
+
flex: 1,
|
|
39
|
+
flexDirection: "row",
|
|
40
|
+
flexWrap: "wrap",
|
|
41
|
+
justifyContent: "center",
|
|
42
|
+
alignItems: "center",
|
|
43
|
+
backgroundColor: lib_1.colors.bkBeige,
|
|
44
|
+
borderWidth: 1,
|
|
45
|
+
borderColor: lib_1.colors.ltBlack,
|
|
46
|
+
borderRadius: 20,
|
|
47
|
+
paddingTop: 10,
|
|
48
|
+
marginTop: 10,
|
|
49
|
+
},
|
|
50
|
+
itemBox: {
|
|
51
|
+
width: 80,
|
|
52
|
+
height: 80,
|
|
53
|
+
justifyContent: "flex-start",
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
// margin: 5,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
exports.default = UnitCircles;
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var react_native_1 = require("react-native");
|
|
8
|
+
var react_redux_1 = require("react-redux");
|
|
9
|
+
var tagFncJ_1 = require("../../functions/tagFncJ");
|
|
10
|
+
var tagFncD_1 = require("../../functions/tagFncD");
|
|
11
|
+
var SubCategoryLeft_1 = __importDefault(require("../Basic/SubCategoryLeft"));
|
|
12
|
+
var lib_1 = require("@nakamura-123/lib");
|
|
13
|
+
var common_1 = require("@nakamura-123/common");
|
|
14
|
+
var UnitCircles = function (_a) {
|
|
15
|
+
var QuestionDBInfo = _a.QuestionDBInfo;
|
|
16
|
+
var unitList = (0, react_redux_1.useSelector)(function (state) { return state.app.unitList; });
|
|
17
|
+
var outOfYearRange = (0, react_redux_1.useSelector)(function (state) { return state.quizCfg.startCfg.outOfYearRange; });
|
|
18
|
+
var circleInfos = unitList.map(function (_a) {
|
|
19
|
+
var key = _a.key, title = _a.title;
|
|
20
|
+
var tags = QuestionDBInfo.system === "JLPT"
|
|
21
|
+
? (0, tagFncJ_1.getCategoryTagLevelCntsJ)(QuestionDBInfo.query, key, "basicTag")
|
|
22
|
+
: (0, tagFncD_1.getCategoryTagLevelCntsD)(QuestionDBInfo.query, key, "unit", outOfYearRange);
|
|
23
|
+
var rate = Math.round((0, tagFncD_1.getCategoryRate)(tags));
|
|
24
|
+
return { title: title, rate: rate };
|
|
25
|
+
});
|
|
26
|
+
return (<react_native_1.View style={styles.container}>
|
|
27
|
+
{circleInfos.map(function (_a) {
|
|
28
|
+
var title = _a.title, rate = _a.rate;
|
|
29
|
+
return (<react_native_1.View key={title} style={styles.itemBox}>
|
|
30
|
+
<SubCategoryLeft_1.default rate={rate} isLocked={false}/>
|
|
31
|
+
<common_1.MyText style={{ fontSize: 11 }}>{title}</common_1.MyText>
|
|
32
|
+
</react_native_1.View>);
|
|
33
|
+
})}
|
|
34
|
+
</react_native_1.View>);
|
|
35
|
+
};
|
|
36
|
+
var styles = react_native_1.StyleSheet.create({
|
|
37
|
+
container: {
|
|
38
|
+
flex: 1,
|
|
39
|
+
flexDirection: "row",
|
|
40
|
+
flexWrap: "wrap",
|
|
41
|
+
justifyContent: "center",
|
|
42
|
+
alignItems: "center",
|
|
43
|
+
backgroundColor: lib_1.colors.bkBeige,
|
|
44
|
+
borderWidth: 1,
|
|
45
|
+
borderColor: lib_1.colors.ltBlack,
|
|
46
|
+
borderRadius: 20,
|
|
47
|
+
paddingTop: 10,
|
|
48
|
+
marginTop: 10,
|
|
49
|
+
},
|
|
50
|
+
itemBox: {
|
|
51
|
+
width: 80,
|
|
52
|
+
height: 80,
|
|
53
|
+
justifyContent: "flex-start",
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
// margin: 5,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
exports.default = UnitCircles;
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var react_native_1 = require("react-native");
|
|
8
|
+
var react_redux_1 = require("react-redux");
|
|
9
|
+
var tagFncJ_1 = require("../../functions/tagFncJ");
|
|
10
|
+
var tagFncD_1 = require("../../functions/tagFncD");
|
|
11
|
+
var SubCategoryLeft_1 = __importDefault(require("../Basic/SubCategoryLeft"));
|
|
12
|
+
var lib_1 = require("@nakamura-123/lib");
|
|
13
|
+
var common_1 = require("@nakamura-123/common");
|
|
14
|
+
var YearCircles = function (_a) {
|
|
15
|
+
var QuestionDBInfo = _a.QuestionDBInfo;
|
|
16
|
+
var yearList = (0, react_redux_1.useSelector)(function (state) { return state.app.yearList; });
|
|
17
|
+
var circleInfos = yearList.map(function (_a) {
|
|
18
|
+
var key = _a.key, title = _a.title;
|
|
19
|
+
var tags = QuestionDBInfo.system === "JLPT"
|
|
20
|
+
? (0, tagFncJ_1.getCategoryTagLevelCntsJ)(QuestionDBInfo.query, key, "listenTag")
|
|
21
|
+
: (0, tagFncD_1.getCategoryTagLevelCntsD)(QuestionDBInfo.query, key, "year");
|
|
22
|
+
var rate = Math.round((0, tagFncD_1.getCategoryRate)(tags));
|
|
23
|
+
return { title: title, rate: rate };
|
|
24
|
+
});
|
|
25
|
+
return (<react_native_1.View style={styles.container}>
|
|
26
|
+
{circleInfos.map(function (_a) {
|
|
27
|
+
var title = _a.title, rate = _a.rate;
|
|
28
|
+
return (<react_native_1.View key={title} style={styles.itemBox}>
|
|
29
|
+
<SubCategoryLeft_1.default rate={rate} isLocked={false}/>
|
|
30
|
+
<common_1.MyText style={{ fontSize: 11 }}>{title}</common_1.MyText>
|
|
31
|
+
</react_native_1.View>);
|
|
32
|
+
})}
|
|
33
|
+
</react_native_1.View>);
|
|
34
|
+
};
|
|
35
|
+
var styles = react_native_1.StyleSheet.create({
|
|
36
|
+
container: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
flexDirection: "row",
|
|
39
|
+
flexWrap: "wrap",
|
|
40
|
+
justifyContent: "center",
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
backgroundColor: lib_1.colors.bkBeige,
|
|
43
|
+
borderWidth: 1,
|
|
44
|
+
borderColor: lib_1.colors.ltBlack,
|
|
45
|
+
borderRadius: 20,
|
|
46
|
+
paddingTop: 10,
|
|
47
|
+
marginTop: 10,
|
|
48
|
+
},
|
|
49
|
+
itemBox: {
|
|
50
|
+
width: 80,
|
|
51
|
+
height: 80,
|
|
52
|
+
justifyContent: "flex-start",
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
// margin: 5,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
exports.default = YearCircles;
|
|
@@ -23,6 +23,9 @@ var ScoreCircle = function (_a) {
|
|
|
23
23
|
/{quizCnt}
|
|
24
24
|
</common_1.MyText>
|
|
25
25
|
</react_native_1.View>
|
|
26
|
+
<common_1.MyText fsize="sm" color="ltBlack">
|
|
27
|
+
({Math.round((score / quizCnt) * 100)}%)
|
|
28
|
+
</common_1.MyText>
|
|
26
29
|
</react_native_1.View>);
|
|
27
30
|
};
|
|
28
31
|
var styles = react_native_1.StyleSheet.create({
|
|
@@ -42,18 +45,17 @@ var styles = react_native_1.StyleSheet.create({
|
|
|
42
45
|
top: -15,
|
|
43
46
|
},
|
|
44
47
|
title: {
|
|
45
|
-
|
|
46
|
-
marginTop: 10,
|
|
48
|
+
marginTop: 20,
|
|
47
49
|
},
|
|
48
50
|
scoreBox: {
|
|
49
51
|
flexDirection: "row",
|
|
50
52
|
alignItems: "flex-end",
|
|
51
53
|
},
|
|
52
54
|
score: {
|
|
53
|
-
fontSize:
|
|
55
|
+
fontSize: 18,
|
|
54
56
|
},
|
|
55
57
|
cnt: {
|
|
56
|
-
fontSize:
|
|
58
|
+
fontSize: 13,
|
|
57
59
|
},
|
|
58
60
|
});
|
|
59
61
|
exports.default = ScoreCircle;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Db } from "@nakamura-123/types";
|
|
3
|
-
interface
|
|
3
|
+
interface Props {
|
|
4
4
|
subject: Db.SubjectInfo;
|
|
5
5
|
index: number;
|
|
6
6
|
}
|
|
7
|
-
declare const TagBadge5s: React.FC<
|
|
7
|
+
declare const TagBadge5s: React.FC<Props>;
|
|
8
8
|
export default TagBadge5s;
|
|
@@ -13,5 +13,5 @@ export declare const findMaxQuizCntLog: (DailyDB: RD) => DailyLogSchema | null;
|
|
|
13
13
|
export declare const getTotalQuizCnt: (DailyLogDB: RD) => number;
|
|
14
14
|
export declare const getConsecutiveStudyDays: (DailyLogDB: RD) => number;
|
|
15
15
|
export declare const getLongestConsecutiveStudyDays: (DailyLogDB: RD) => number;
|
|
16
|
-
export declare const promptStoreReview: (
|
|
16
|
+
export declare const promptStoreReview: () => Promise<void>;
|
|
17
17
|
export {};
|
|
@@ -141,7 +141,7 @@ var getLongestConsecutiveStudyDays = function (DailyLogDB) {
|
|
|
141
141
|
return longestStreak;
|
|
142
142
|
};
|
|
143
143
|
exports.getLongestConsecutiveStudyDays = getLongestConsecutiveStudyDays;
|
|
144
|
-
var promptStoreReview = function (
|
|
144
|
+
var promptStoreReview = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
145
145
|
var isAvailable;
|
|
146
146
|
return __generator(this, function (_a) {
|
|
147
147
|
switch (_a.label) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColorKeys } from "@nakamura-123/lib";
|
|
2
2
|
import { QSelected, Lib } from "@nakamura-123/types";
|
|
3
3
|
import { QRD, TagInfo } from "../types/filterType";
|
|
4
|
-
export declare function getCategoryTagLevelCntsD(QuestionDB: QRD, category: number, type: "unit" | "year", outOfYearRange?: number[] | undefined):
|
|
4
|
+
export declare function getCategoryTagLevelCntsD(QuestionDB: QRD, category: number, type: "unit" | "year", outOfYearRange?: number[] | undefined): Lib.LevelNames[];
|
|
5
5
|
export declare function getUnitSubTagLevelCnts(QuestionDB: QRD, unitId: number, subUnitId: number, outOfYearRange?: number[]): string[];
|
|
6
6
|
export declare function getYearSubTagLevelCnts(QuestionDB: QRD, year: number, key: number): string[];
|
|
7
7
|
export declare const getSubTagLevelCnts: (QuestionDB: QRD, selected: QSelected.SelectedUnit | QSelected.SelectedYear, outOfYearRange?: number[]) => Lib.LevelNames[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Db, JAssets } from "@nakamura-123/types";
|
|
2
2
|
import { QSelected, Lib } from "@nakamura-123/types";
|
|
3
3
|
import type { QRJ } from "../types/filterType";
|
|
4
|
-
export declare function getCategoryTagLevelCntsJ(QuestionDB: QRJ, category: number, tag?: JAssets.JTag):
|
|
4
|
+
export declare function getCategoryTagLevelCntsJ(QuestionDB: QRJ, category: number, tag?: JAssets.JTag): Lib.LevelNames[];
|
|
5
5
|
export declare function getUnitSubTagLevelCntsJ(QuestionDB: QRJ, unitId: number, subUnitId: number, tag?: JAssets.JTag): string[];
|
|
6
6
|
export declare const getSubTagLevelCntsJ: (QuestionDB: QRJ, selected: QSelected.SelectedUnit | QSelected.SelectedYear) => Lib.LevelNames[];
|
|
7
7
|
export declare const getTagNameFilterJ: (QuestionDB: QRJ, tagName?: Db.SubjectTag) => Lib.LevelNames[];
|
package/dist/page/GradePage.js
CHANGED
|
@@ -39,17 +39,22 @@ var gradeFnc_1 = require("../functions/gradeFnc");
|
|
|
39
39
|
var react_i18next_1 = require("react-i18next");
|
|
40
40
|
var react_redux_1 = require("react-redux");
|
|
41
41
|
var JAllTags_1 = __importDefault(require("../component/Grade/JAllTags"));
|
|
42
|
+
var lib_1 = require("@nakamura-123/lib");
|
|
43
|
+
var UnitCircles_1 = __importDefault(require("../component/Grade/UnitCircles"));
|
|
44
|
+
var basicHook_1 = require("../hooks/basicHook");
|
|
45
|
+
var YearCircles_1 = __importDefault(require("../component/Grade/YearCircles"));
|
|
42
46
|
var GradePage = function (_a) {
|
|
43
47
|
var navigation = _a.navigation;
|
|
44
48
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
45
49
|
var realm = (0, react_2.useRealm)();
|
|
46
50
|
var DailyLogDB = (0, react_2.useQuery)(db_1.DailyLogSchema);
|
|
51
|
+
var QuestionDBInfo = (0, basicHook_1.useGetQuestionQuery)();
|
|
47
52
|
var appSystem = (0, react_redux_1.useSelector)(function (state) { return state.app.appSetting.setting.appSystem; }) ||
|
|
48
53
|
"drill";
|
|
49
54
|
var totalCnt = (0, gradeFnc_1.getTotalQuizCnt)(DailyLogDB);
|
|
50
55
|
// レビューをリクエスト可能か確認
|
|
51
56
|
(0, react_1.useEffect)(function () {
|
|
52
|
-
(0, gradeFnc_1.promptStoreReview)(
|
|
57
|
+
(0, gradeFnc_1.promptStoreReview)();
|
|
53
58
|
db_1.DailyLogModel.mergeDuplicateDailyLogs(realm);
|
|
54
59
|
}, []);
|
|
55
60
|
return (<react_native_1.ScrollView style={styles.page} contentContainerStyle={styles.container}>
|
|
@@ -57,7 +62,9 @@ var GradePage = function (_a) {
|
|
|
57
62
|
<QuizCntGraph_1.default DailyLogDB={DailyLogDB}/>
|
|
58
63
|
<Square4s_1.default DailyLogDB={DailyLogDB}/>
|
|
59
64
|
{appSystem === "JLPT" ? <JAllTags_1.default /> : <AllTags_1.default />}
|
|
60
|
-
<
|
|
65
|
+
<UnitCircles_1.default QuestionDBInfo={QuestionDBInfo}/>
|
|
66
|
+
<YearCircles_1.default QuestionDBInfo={QuestionDBInfo}/>
|
|
67
|
+
<common_1.RoundRectangleIcon title={t("grade.allBadges")} onPress={function () { return navigation.navigate("Badge"); }} icon="shield-alt" style={{ backgroundColor: lib_1.colors.ltRed }}/>
|
|
61
68
|
</react_native_1.ScrollView>);
|
|
62
69
|
};
|
|
63
70
|
var styles = react_native_1.StyleSheet.create({
|
package/dist/page/HomePage.js
CHANGED
|
@@ -144,7 +144,7 @@ var HomePage = function (_a) {
|
|
|
144
144
|
})}
|
|
145
145
|
<react_native_1.View style={styles.settingBtns}>
|
|
146
146
|
<common_1.SettingBtn icon="gem" title={t("home.setting.coin")} onPress={function () { return navigation.navigate("Coin"); }}/>
|
|
147
|
-
<common_1.SettingBtn icon="question" title={t("home.setting.FAQ")} onPress={function () { return
|
|
147
|
+
<common_1.SettingBtn icon="question" title={t("home.setting.FAQ")} onPress={function () { return react_native_1.Linking.openURL("https://drill-notes.com/faq"); }}/>
|
|
148
148
|
<common_1.SettingBtn icon="cog" title={t("home.setting.setting")} onPress={function () { return navigation.navigate("Setting"); }}/>
|
|
149
149
|
</react_native_1.View>
|
|
150
150
|
<react_native_1.View style={styles.settingBtns}>
|
package/dist/quiz/Title.js
CHANGED
|
@@ -11,28 +11,40 @@ var common_1 = require("@nakamura-123/common");
|
|
|
11
11
|
var quizHook_1 = require("../hooks/quizHook");
|
|
12
12
|
var QuizTitle = function () {
|
|
13
13
|
var _a;
|
|
14
|
-
var
|
|
14
|
+
var _b = (0, react_redux_1.useSelector)(function (state) { return state.quiz.currentInfo.state; }), turn = _b.turn, score = _b.score;
|
|
15
|
+
var mode = (0, quizHook_1.useGetMode)();
|
|
15
16
|
var question = (0, quizHook_1.useQuestionDataD)();
|
|
16
17
|
var allQuizCnt = (0, react_redux_1.useSelector)(function (state) { return state.quiz.quizList.length; });
|
|
17
18
|
var isShowTag = (0, react_redux_1.useSelector)(function (state) { return state.quizCfg.inQuizOption.isShowTag; });
|
|
18
19
|
if (!question)
|
|
19
20
|
return null;
|
|
20
21
|
var title = question.title;
|
|
21
|
-
var cntText = "".concat(turn + 1, " / ").concat(allQuizCnt, "\u554F\u76EE");
|
|
22
22
|
var tagColor = ((_a = lib_1.tagLevels.find(function (tag) { return tag.level === question.tag; })) === null || _a === void 0 ? void 0 : _a.color) || "ltBlack";
|
|
23
|
+
var rateCnt = mode === "quiz" ? turn || 1 : turn + 1 || 1;
|
|
24
|
+
var rate = Math.round((score / rateCnt) * 100).toString();
|
|
25
|
+
// 文章
|
|
26
|
+
var cntText = "".concat(turn + 1, "/").concat(allQuizCnt, "\u554F\u76EE");
|
|
27
|
+
var correctText = "\u3000".concat(score, "\u554F\u6B63\u89E3(").concat(rate, "%)");
|
|
23
28
|
return (<react_native_1.View style={styles.container}>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{title}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
<react_native_1.View style={{ flexDirection: "row", alignItems: "center" }}>
|
|
30
|
+
{isShowTag && <common_1.Icon5 name="tag" size={15} color={tagColor}/>}
|
|
31
|
+
<common_1.MyText fsize="md" style={styles.title}>
|
|
32
|
+
{title}
|
|
33
|
+
</common_1.MyText>
|
|
34
|
+
</react_native_1.View>
|
|
35
|
+
<react_native_1.View style={{ flexDirection: "row", alignItems: "center" }}>
|
|
36
|
+
<common_1.MyText fsize="sm" style={styles.cntText}>
|
|
37
|
+
{cntText}
|
|
38
|
+
</common_1.MyText>
|
|
39
|
+
<common_1.MyText fsize="sm" style={styles.cntText}>
|
|
40
|
+
{correctText}
|
|
41
|
+
</common_1.MyText>
|
|
42
|
+
</react_native_1.View>
|
|
31
43
|
</react_native_1.View>);
|
|
32
44
|
};
|
|
33
45
|
var styles = react_native_1.StyleSheet.create({
|
|
34
46
|
container: {
|
|
35
|
-
flexDirection: "
|
|
47
|
+
flexDirection: "column",
|
|
36
48
|
justifyContent: "center",
|
|
37
49
|
alignItems: "center",
|
|
38
50
|
backgroundColor: lib_1.colors.ltBeige,
|
|
@@ -57,6 +57,10 @@ var checkMultiState = function (multiState, index) {
|
|
|
57
57
|
};
|
|
58
58
|
// 04.check時とresult時の表示
|
|
59
59
|
var checkMultiStateResult = function (multiSel, selectedIndexes, index) {
|
|
60
|
+
console.log("multiSel", multiSel);
|
|
61
|
+
console.log("selectedIndexes", selectedIndexes);
|
|
62
|
+
if (!selectedIndexes || selectedIndexes.length === 0)
|
|
63
|
+
return "inCorrect";
|
|
60
64
|
var selectedIndex = selectedIndexes[index];
|
|
61
65
|
var isCorrect = multiSel[index][selectedIndex].isCorrect;
|
|
62
66
|
if (isCorrect)
|