@nakamura-123/pages 1.3.16 → 1.4.0
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/Article/ArticleCategoryList.js +88 -33
- package/dist/component/Article/ArticleContentView.d.ts +1 -0
- package/dist/component/Article/ArticleContentView.js +44 -9
- package/dist/component/Article/ArticleRow.d.ts +3 -2
- package/dist/component/Article/ArticleRow.js +42 -16
- package/dist/component/Basic/BasicProgressBar.js +7 -5
- package/dist/component/Basic/MiniTestCard.js +15 -9
- package/dist/component/Basic/Paw5s.js +2 -1
- package/dist/component/Basic/SubCategoryList.js +13 -18
- package/dist/component/Coin/CoinCheck.js +1 -1
- package/dist/component/Coin/CoinFnc.d.ts +2 -2
- package/dist/component/Coin/CoinFnc.js +13 -11
- package/dist/component/Coin/WaitingPayBanner.js +2 -3
- package/dist/component/Grade/GAllTags.d.ts +3 -0
- package/dist/component/Grade/GAllTags.js +45 -0
- package/dist/component/Grade/GradeCard/ChangeWeeklyModal.js +7 -3
- package/dist/component/Grade/GradeCard/DatePickerModal.js +2 -1
- package/dist/component/Grade/GradeCard/Square3sGrade.js +1 -1
- package/dist/component/Grade/GradeCard/TargetDate.js +1 -1
- package/dist/component/Grade/QuizCntGraph.js +2 -1
- package/dist/component/Grade/Square4s.js +4 -4
- package/dist/component/Grade/UnitCircles.d.ts +4 -2
- package/dist/component/Grade/UnitCircles.js +6 -5
- package/dist/component/Grade/YearCircles.d.ts +4 -2
- package/dist/component/Grade/YearCircles.js +7 -5
- package/dist/component/KeyboardCloseBar.js +2 -1
- package/dist/component/QuizSet/QuizOptionDrill.js +3 -14
- package/dist/component/Result/QuizFlatList.js +159 -56
- package/dist/component/Result/ResultActions.d.ts +7 -0
- package/dist/component/Result/ResultActions.js +107 -0
- package/dist/component/Result/ResultHero.d.ts +7 -0
- package/dist/component/Result/ResultHero.js +166 -0
- package/dist/component/SettingBtns/LanguageModal.d.ts +9 -0
- package/dist/component/SettingBtns/LanguageModal.js +103 -0
- package/dist/component/SettingBtns/TransBtn.js +7 -84
- package/dist/component/Tag5s.js +2 -2
- package/dist/component/TagBadge5s.js +7 -5
- package/dist/component/TestPage/BarChartContainer.js +2 -1
- package/dist/component/TestPage/Square3s.js +3 -2
- package/dist/engine/components.d.ts +19 -0
- package/dist/engine/components.js +19 -0
- package/dist/engine/drill.d.ts +3 -0
- package/dist/engine/drill.js +24 -0
- package/dist/engine/grammar.d.ts +3 -0
- package/dist/engine/grammar.js +22 -0
- package/dist/engine/index.d.ts +5 -0
- package/dist/engine/index.js +17 -0
- package/dist/engine/tango.d.ts +3 -0
- package/dist/engine/tango.js +28 -0
- package/dist/engine/types.d.ts +46 -0
- package/dist/engine/types.js +2 -0
- package/dist/functions/createQuizFncG.d.ts +12 -0
- package/dist/functions/createQuizFncG.js +40 -0
- package/dist/functions/nextItemFnc.d.ts +12 -0
- package/dist/functions/nextItemFnc.js +56 -0
- package/dist/functions/questionFormatG.d.ts +7 -0
- package/dist/functions/questionFormatG.js +31 -0
- package/dist/functions/tagFncG.d.ts +5 -0
- package/dist/functions/tagFncG.js +24 -0
- package/dist/functions/tagFncJ.d.ts +2 -2
- package/dist/functions/tagFncJ.js +1 -1
- package/dist/hooks/BadgeHook.d.ts +1 -1
- package/dist/hooks/BadgeHook.js +3 -3
- package/dist/hooks/ExitQuizHook.js +9 -7
- package/dist/hooks/basicHook.d.ts +9 -1
- package/dist/hooks/basicHook.js +17 -8
- package/dist/hooks/quizActionHook.d.ts +3 -1
- package/dist/hooks/quizActionHook.js +33 -1
- package/dist/hooks/quizHook.d.ts +6 -2
- package/dist/hooks/quizHook.js +39 -4
- package/dist/hooks/resultHook.d.ts +9 -0
- package/dist/hooks/resultHook.js +74 -0
- package/dist/page/ArticleDetail.js +25 -12
- package/dist/page/CoinPage.js +2 -2
- package/dist/page/FAQPage.js +4 -3
- package/dist/page/GetBadgePage.js +5 -4
- package/dist/page/GradePage.js +6 -9
- package/dist/page/HistoryPage.js +7 -4
- package/dist/page/HomePage.js +7 -3
- package/dist/page/QuizPage.js +4 -4
- package/dist/page/QuizSettingPage.js +3 -6
- package/dist/page/QuizSetupPage.js +6 -14
- package/dist/page/ReportPage.js +1 -1
- package/dist/page/ResultPage.js +6 -24
- package/dist/page/SettingPage.js +36 -3
- package/dist/page/TestPage.js +7 -14
- package/dist/quiz/Title.js +5 -2
- package/dist/quiz/check/Check.js +11 -7
- package/dist/quiz/check/NextQuizBtn.js +3 -2
- package/dist/quiz/check/SelectTag.js +7 -0
- package/dist/quiz/common/MyTextqqyy.d.ts +1 -0
- package/dist/quiz/common/MyTextqqyy.js +2 -2
- package/dist/quiz/common/RenderImgOrText.d.ts +2 -0
- package/dist/quiz/common/RenderImgOrText.js +2 -2
- package/dist/quiz/common/RubyText.d.ts +3 -1
- package/dist/quiz/common/RubyText.js +20 -5
- package/dist/quiz/grammar/GAnswer.d.ts +8 -0
- package/dist/quiz/grammar/GAnswer.js +115 -0
- package/dist/quiz/grammar/GGuideBtn.d.ts +8 -0
- package/dist/quiz/grammar/GGuideBtn.js +43 -0
- package/dist/quiz/grammar/GQuestion.d.ts +8 -0
- package/dist/quiz/grammar/GQuestion.js +109 -0
- package/dist/quiz/grammar/QuizContentsGrammar.d.ts +10 -0
- package/dist/quiz/grammar/QuizContentsGrammar.js +31 -0
- package/dist/quiz/jAnswer/JAnswerContents.js +12 -5
- package/dist/quiz/jQuestion/JQuestionBottomText.d.ts +2 -1
- package/dist/quiz/jQuestion/JQuestionBottomText.js +3 -1
- package/dist/quiz/save/QuizSaveData.js +1 -1
- package/dist/quiz/setting/Above3BtnJ.js +5 -4
- package/dist/quiz/setting/Bottom3Btn.js +5 -4
- package/dist/quiz/setting/GuideBtn.js +3 -2
- package/dist/quiz/setting/RepeatBtn.js +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/filterType.d.ts +2 -1
- package/package.json +23 -3
package/dist/page/HistoryPage.js
CHANGED
|
@@ -10,6 +10,7 @@ const lib_1 = require("@nakamura-123/lib");
|
|
|
10
10
|
const common_1 = require("@nakamura-123/common");
|
|
11
11
|
const db_1 = require("@nakamura-123/db");
|
|
12
12
|
const HistoryPage = ({ route }) => {
|
|
13
|
+
const { t } = (0, common_1.useDrillTranslation)();
|
|
13
14
|
const { subject, db } = route.params.info;
|
|
14
15
|
if (db !== "test" && db !== "boot")
|
|
15
16
|
return null;
|
|
@@ -17,7 +18,7 @@ const HistoryPage = ({ route }) => {
|
|
|
17
18
|
const DB = (0, react_2.useQuery)(schema);
|
|
18
19
|
const filterdDB = DB.filtered("subject == $0 ", subject);
|
|
19
20
|
const sortedDB = filterdDB.sorted("createdAt", false);
|
|
20
|
-
const formattedRecord = formatRecord(sortedDB, db).reverse();
|
|
21
|
+
const formattedRecord = formatRecord(sortedDB, db, t).reverse();
|
|
21
22
|
// リストのコンポーネント
|
|
22
23
|
const Compornent = ({ item }) => {
|
|
23
24
|
const { point, percent, color, date, success } = item;
|
|
@@ -27,13 +28,15 @@ const HistoryPage = ({ route }) => {
|
|
|
27
28
|
<react_native_1.FlatList data={formattedRecord} renderItem={({ item }) => <Compornent item={item}/>} style={styles.flatList} keyExtractor={(_, i) => i.toString()} ItemSeparatorComponent={() => <react_native_1.View style={styles.separate}/>}/>
|
|
28
29
|
</react_native_1.View>);
|
|
29
30
|
};
|
|
30
|
-
const formatRecord = (record, db) => {
|
|
31
|
+
const formatRecord = (record, db, t) => {
|
|
31
32
|
return record.map(({ quizCnt, point, percent, level, createdAt }, index) => ({
|
|
32
|
-
point:
|
|
33
|
+
point: t("test.history.point", { no: index + 1, point, cnt: quizCnt }),
|
|
33
34
|
percent,
|
|
34
35
|
color: lib_1.utilFnc.getLevelColor(level),
|
|
35
36
|
date: `${lib_1.timeFnc.formatDateYS(createdAt)}`,
|
|
36
|
-
success: db === "test"
|
|
37
|
+
success: db === "test"
|
|
38
|
+
? t(level === "l4" ? "test.history.pass" : "test.history.fail")
|
|
39
|
+
: "",
|
|
37
40
|
}));
|
|
38
41
|
};
|
|
39
42
|
const styles = react_native_1.StyleSheet.create({
|
package/dist/page/HomePage.js
CHANGED
|
@@ -77,15 +77,19 @@ const HomePage = ({ menuLists, navigation, warningContent, }) => {
|
|
|
77
77
|
return;
|
|
78
78
|
dispatch({ type: "setting/guideStateFalse", payload: "loadOldData" });
|
|
79
79
|
dispatch(stores_1.settingStorage.saveSetting());
|
|
80
|
-
// これにより Provider から渡されたインスタンスが確実に使われます
|
|
81
|
-
i18n === null || i18n === void 0 ? void 0 : i18n.changeLanguage(language);
|
|
82
80
|
const fetchOldData = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
83
81
|
const existOldMarkData = yield (0, oldStorageFnc_1.existOldData)();
|
|
84
82
|
if (existOldMarkData && oldInfo.testInfo)
|
|
85
83
|
(0, oldStorageFnc_1.handleOldData)(realm, oldInfo, dispatch, t, LOAD_OLD_MSG);
|
|
86
84
|
});
|
|
87
85
|
fetchOldData();
|
|
88
|
-
}, [showLoadOldData, settingAsyncLoaded
|
|
86
|
+
}, [showLoadOldData, settingAsyncLoaded]);
|
|
87
|
+
// 保存された言語を起動のたびに当てる(以前は旧データ引き継ぎの中にあり、初回の起動でしか当たらなかった)
|
|
88
|
+
(0, react_1.useEffect)(() => {
|
|
89
|
+
if (!settingAsyncLoaded)
|
|
90
|
+
return;
|
|
91
|
+
i18n === null || i18n === void 0 ? void 0 : i18n.changeLanguage(language);
|
|
92
|
+
}, [settingAsyncLoaded, language]);
|
|
89
93
|
// これはデバッグ用です。
|
|
90
94
|
(0, react_1.useEffect)(() => {
|
|
91
95
|
if (__DEV__)
|
package/dist/page/QuizPage.js
CHANGED
|
@@ -10,8 +10,8 @@ const Check_1 = __importDefault(require("../quiz/check/Check"));
|
|
|
10
10
|
const quizHook_1 = require("../hooks/quizHook");
|
|
11
11
|
const ExitQuizHook_1 = require("../hooks/ExitQuizHook");
|
|
12
12
|
const Guide_1 = __importDefault(require("../component/Guide"));
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const components_1 = require("../engine/components");
|
|
14
|
+
const basicHook_1 = require("../hooks/basicHook");
|
|
15
15
|
const KeyboardCloseBar_1 = __importDefault(require("../component/KeyboardCloseBar"));
|
|
16
16
|
const QuizPage = ({ navigation }) => {
|
|
17
17
|
// スワイプの動作処理
|
|
@@ -24,7 +24,7 @@ const QuizPage = ({ navigation }) => {
|
|
|
24
24
|
const isResult = (0, react_redux_1.useSelector)((state) => state.quiz.currentInfo.state.mode) ===
|
|
25
25
|
"result";
|
|
26
26
|
const turn = (0, react_redux_1.useSelector)((state) => state.quiz.currentInfo.state.turn);
|
|
27
|
-
const
|
|
27
|
+
const { QuizContents } = components_1.engineComponents[(0, basicHook_1.useQuizEngine)()];
|
|
28
28
|
// ガイド表示
|
|
29
29
|
const guide = (0, react_redux_1.useSelector)((state) => state.setting.guide);
|
|
30
30
|
const showTagGuide = guide.quizPageTag && turn === 0 && isCheck;
|
|
@@ -34,7 +34,7 @@ const QuizPage = ({ navigation }) => {
|
|
|
34
34
|
// クイズ終了確認フック
|
|
35
35
|
(0, ExitQuizHook_1.useConfirmExit)(navigation);
|
|
36
36
|
return (<react_native_1.View style={styles.wrapper}>
|
|
37
|
-
|
|
37
|
+
<QuizContents navigation={navigation} guideName={guideName} showSwipe1Guide={showSwipe1Guide} showSwipe2Guide={showSwipe2Guide} isCheck={isCheck} isResult={isResult} isNotInput={isNotInput} isNotQuiz={isNotQuiz} isInputQuizMode={isInputQuizMode} turn={turn}/>
|
|
38
38
|
{/* 下に固定しておくボタンを設置 */}
|
|
39
39
|
{isNotQuiz && (<react_native_1.View style={styles.fixedBottom}>
|
|
40
40
|
<Guide_1.default name="quizPageTag" isVisible={showTagGuide}>
|
|
@@ -30,21 +30,18 @@ const react_1 = __importStar(require("react"));
|
|
|
30
30
|
const react_native_1 = require("react-native");
|
|
31
31
|
const react_native_gesture_handler_1 = require("react-native-gesture-handler");
|
|
32
32
|
const react_redux_1 = require("react-redux");
|
|
33
|
-
const lib_1 = require("@nakamura-123/lib");
|
|
34
33
|
const stores_1 = require("@nakamura-123/stores");
|
|
35
34
|
const QuizOptionSelector_1 = __importDefault(require("../component/SettingBtns/QuizOptionSelector"));
|
|
36
35
|
const MyTextqqyy_1 = __importDefault(require("../quiz/common/MyTextqqyy"));
|
|
37
36
|
const common_1 = require("@nakamura-123/common");
|
|
38
|
-
const
|
|
37
|
+
const engine_1 = require("../engine");
|
|
38
|
+
const basicHook_1 = require("../hooks/basicHook");
|
|
39
39
|
const QuizSetting = ({ route }) => {
|
|
40
40
|
var _a;
|
|
41
41
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
42
|
-
const isJLPT = (0, react_redux_2.useSelector)((state) => state.app.appSetting.setting.appSystem) === "JLPT";
|
|
43
42
|
const { t } = (0, common_1.useDrillTranslation)();
|
|
44
43
|
const isArticleScope = ((_a = route === null || route === void 0 ? void 0 : route.params) === null || _a === void 0 ? void 0 : _a.scope) === "article";
|
|
45
|
-
const allOptions =
|
|
46
|
-
? lib_1.inQuizOption.jInQuizOption
|
|
47
|
-
: lib_1.inQuizOption.dInQuizOption;
|
|
44
|
+
const allOptions = engine_1.engines[(0, basicHook_1.useQuizEngine)()].inQuizOptions;
|
|
48
45
|
const options = isArticleScope
|
|
49
46
|
? allOptions.filter((O) => O.type === "fsize" || O.type === "fWeight")
|
|
50
47
|
: allOptions;
|
|
@@ -11,15 +11,11 @@ const common_1 = require("@nakamura-123/common");
|
|
|
11
11
|
const stores_1 = require("@nakamura-123/stores");
|
|
12
12
|
const { saveBasicPreSelect } = stores_1.setAction;
|
|
13
13
|
const { toResult } = stores_1.quizAction;
|
|
14
|
-
const tagFncD_1 = require("../functions/tagFncD");
|
|
15
|
-
const createQuizFncD_1 = require("../functions/createQuizFncD");
|
|
16
14
|
const TagBadge5sPress_1 = __importDefault(require("../component/TagBadge5sPress"));
|
|
17
15
|
const QuizOptionDrill_1 = __importDefault(require("../component/QuizSet/QuizOptionDrill"));
|
|
18
16
|
const quizActionHook_1 = require("../hooks/quizActionHook");
|
|
19
17
|
const Guide_1 = __importDefault(require("../component/Guide"));
|
|
20
18
|
const basicHook_1 = require("../hooks/basicHook");
|
|
21
|
-
const tagFncJ_1 = require("../functions/tagFncJ");
|
|
22
|
-
const createQuizFncJ_1 = require("../functions/createQuizFncJ");
|
|
23
19
|
const QuizSetup = ({ navigation }) => {
|
|
24
20
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
25
21
|
const { t } = (0, common_1.useDrillTranslation)();
|
|
@@ -33,20 +29,15 @@ const QuizSetup = ({ navigation }) => {
|
|
|
33
29
|
const quizTitle = lesson.title;
|
|
34
30
|
// タグの選択
|
|
35
31
|
// const QuestionDB = useQuery(DQuestionSchema);
|
|
36
|
-
const
|
|
37
|
-
const { query, system } = QuestionDBInfo;
|
|
32
|
+
const { engine, ops, query } = (0, basicHook_1.useEngineQuery)();
|
|
38
33
|
// ==========ここの修正から ===============
|
|
39
34
|
// これよく見ると違うな
|
|
40
35
|
if (type !== "unit" && type !== "year")
|
|
41
36
|
return null;
|
|
42
|
-
const lessonTags =
|
|
43
|
-
? (0, tagFncJ_1.getSubTagLevelCntsJ)(query, selected)
|
|
44
|
-
: (0, tagFncD_1.getSubTagLevelCnts)(query, selected, outOfYearRange);
|
|
37
|
+
const lessonTags = ops.lessonTagLevels(query, selected, outOfYearRange);
|
|
45
38
|
// クイズ開始
|
|
46
39
|
const handleStart = () => {
|
|
47
|
-
const quizList =
|
|
48
|
-
? (0, createQuizFncJ_1.getBasicQuizListJ)(query, startCfg, selected)
|
|
49
|
-
: (0, createQuizFncD_1.getBasicQuizList)(query, startCfg, selected);
|
|
40
|
+
const quizList = ops.basicQuizList(query, startCfg, selected);
|
|
50
41
|
dispatch(saveBasicPreSelect({ subject, category, lessonKey: lesson.key }));
|
|
51
42
|
const isExistQuiz = useStartQuiz(subject, quizList);
|
|
52
43
|
if (!isExistQuiz)
|
|
@@ -71,8 +62,9 @@ const QuizSetup = ({ navigation }) => {
|
|
|
71
62
|
</Guide_1.default>
|
|
72
63
|
<common_1.IconTitle icon="sliders-h" title={t("setup.title.setting")}/>
|
|
73
64
|
<QuizOptionDrill_1.default />
|
|
74
|
-
{
|
|
75
|
-
{
|
|
65
|
+
{engine === "tango" && (<common_1.RoundRectangleIcon icon="cog" title={t("setup.detailSetting")} onPress={handleDetail}/>)}
|
|
66
|
+
{/* 音声のある単語・文法だけ。Detail Settingは単語だけ(制限時間を使うのは単語) */}
|
|
67
|
+
{engine !== "drill" && (<common_1.VibrationText>*{t("setup.turnOffSilent")}</common_1.VibrationText>)}
|
|
76
68
|
</react_native_gesture_handler_1.ScrollView>
|
|
77
69
|
|
|
78
70
|
<react_native_1.View style={styles.btnBox}>
|
package/dist/page/ReportPage.js
CHANGED
|
@@ -101,7 +101,7 @@ const ReportPage = ({ navigation, route }) => {
|
|
|
101
101
|
{type !== REPORT_TYPES[1] && type !== null && (<react_native_1.View style={{ paddingBottom: 300 }}>
|
|
102
102
|
<react_native_1.View style={{ marginTop: 10 }}>
|
|
103
103
|
{type === REPORT_TYPES[2] && (<>
|
|
104
|
-
<common_1.RoundRectangleIcon title="
|
|
104
|
+
<common_1.RoundRectangleIcon title={t("report.faqLink")} icon="question" onPress={() => react_native_1.Linking.openURL("https://drill-notes.com/faq")} style={{ backgroundColor: lib_1.colors.blue }}/>
|
|
105
105
|
</>)}
|
|
106
106
|
<common_1.MyText>{t("report.mail.title")}</common_1.MyText>
|
|
107
107
|
<react_native_1.TextInput style={styles.input} placeholder={t("report.mail.placeholder")} value={mail} onChangeText={(text) => setMail(text)} keyboardType="email-address" // メールアドレス用のキーボードを表示
|
package/dist/page/ResultPage.js
CHANGED
|
@@ -37,11 +37,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const react_native_1 = require("react-native");
|
|
40
|
-
const common_1 = require("@nakamura-123/common");
|
|
41
|
-
const CharaCard_1 = __importDefault(require("../component/Result/CharaCard"));
|
|
42
|
-
const LessonTitle_1 = __importDefault(require("../component/Result/LessonTitle"));
|
|
43
40
|
const quizHook_1 = require("../hooks/quizHook");
|
|
44
|
-
const
|
|
41
|
+
const ResultHero_1 = __importDefault(require("../component/Result/ResultHero"));
|
|
42
|
+
const ResultActions_1 = __importDefault(require("../component/Result/ResultActions"));
|
|
45
43
|
const QuizFlatList_1 = __importDefault(require("../component/Result/QuizFlatList"));
|
|
46
44
|
const react_redux_1 = require("react-redux");
|
|
47
45
|
const CoinCheck_1 = require("../component/Coin/CoinCheck");
|
|
@@ -50,7 +48,6 @@ const AdCard_1 = __importDefault(require("../component/Result/AdCard"));
|
|
|
50
48
|
const CoinFnc_1 = require("../component/Coin/CoinFnc");
|
|
51
49
|
const ResultPage = ({ navigation }) => {
|
|
52
50
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
53
|
-
const { t } = (0, common_1.useDrillTranslation)();
|
|
54
51
|
const allFreeId = (0, react_redux_1.useSelector)((state) => { var _a; return ((_a = state.app.appSetting.setting) === null || _a === void 0 ? void 0 : _a.payment.items.allFreeId) || ""; });
|
|
55
52
|
const { allFreeState, lastCheckedDate } = (0, react_redux_1.useSelector)((state) => state.setting.payment);
|
|
56
53
|
const isJLPT = (0, react_redux_1.useSelector)((state) => state.app.appSetting.setting.appSystem) === "JLPT";
|
|
@@ -88,32 +85,17 @@ const ResultPage = ({ navigation }) => {
|
|
|
88
85
|
const scoreInfo = (0, quizHook_1.useScoreInfo)();
|
|
89
86
|
return (<react_native_1.View style={styles.page}>
|
|
90
87
|
{!isJLPT && <AdCard_1.default />}
|
|
91
|
-
|
|
92
|
-
<
|
|
93
|
-
<
|
|
94
|
-
<react_native_1.View style={styles.btnBox}>
|
|
95
|
-
<common_1.MiniIconBtn onPress={() => navigation.navigate("Grade")} icon="chart-line" title={t("quiz.resultBtn.grade")} color="green" outerStyle={styles.miniBtnOuter}/>
|
|
96
|
-
<common_1.MiniIconBtn onPress={() => navigation.goBack()} icon="arrow-left" title={t("quiz.resultBtn.back")} color="blue" outerStyle={styles.miniBtnOuter}/>
|
|
97
|
-
</react_native_1.View>
|
|
88
|
+
{/* 上から、キャラと点数のカード → 大きいボタン・薄い段 → 見直す一覧(設計は result_lesson_overview.md) */}
|
|
89
|
+
<ResultHero_1.default scoreInfo={scoreInfo}/>
|
|
90
|
+
<ResultActions_1.default navigation={navigation}/>
|
|
98
91
|
<QuizFlatList_1.default navigation={navigation}/>
|
|
99
92
|
</react_native_1.View>);
|
|
100
93
|
};
|
|
101
94
|
const styles = react_native_1.StyleSheet.create({
|
|
102
95
|
page: {
|
|
103
96
|
flex: 1,
|
|
104
|
-
justifyContent: "center",
|
|
105
97
|
alignItems: "center",
|
|
106
|
-
paddingHorizontal:
|
|
107
|
-
},
|
|
108
|
-
btnBox: {
|
|
109
|
-
width: "100%",
|
|
110
|
-
flexDirection: "row",
|
|
111
|
-
justifyContent: "center",
|
|
112
|
-
paddingVertical: 5,
|
|
113
|
-
},
|
|
114
|
-
miniBtnOuter: {
|
|
115
|
-
width: "35%",
|
|
116
|
-
marginHorizontal: 20,
|
|
98
|
+
paddingHorizontal: 12,
|
|
117
99
|
},
|
|
118
100
|
});
|
|
119
101
|
exports.default = ResultPage;
|
package/dist/page/SettingPage.js
CHANGED
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
4
24
|
};
|
|
5
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 =
|
|
26
|
+
const react_1 = __importStar(require("react"));
|
|
7
27
|
const react_native_1 = require("react-native");
|
|
8
28
|
const react_redux_1 = require("react-redux");
|
|
9
29
|
const react_2 = require("@realm/react");
|
|
@@ -11,6 +31,7 @@ const common_1 = require("@nakamura-123/common");
|
|
|
11
31
|
const lib_1 = require("@nakamura-123/lib");
|
|
12
32
|
const db_1 = require("@nakamura-123/db");
|
|
13
33
|
const oldStorageFnc_1 = require("../functions/oldStorageFnc");
|
|
34
|
+
const LanguageModal_1 = __importStar(require("../component/SettingBtns/LanguageModal"));
|
|
14
35
|
const SettingPage = ({ navigation }) => {
|
|
15
36
|
const realm = (0, react_2.useRealm)();
|
|
16
37
|
const { t } = (0, common_1.useDrillTranslation)();
|
|
@@ -20,6 +41,8 @@ const SettingPage = ({ navigation }) => {
|
|
|
20
41
|
// 古いデータの移行ボタンを表示するかどうかの判定
|
|
21
42
|
const displayOldSystemBtn = Array.isArray(oldInfo === null || oldInfo === void 0 ? void 0 : oldInfo.testInfo) && oldInfo.testInfo.length > 0;
|
|
22
43
|
const isJLPT = (0, react_redux_1.useSelector)((state) => state.app.appSetting.setting.appSystem) === "JLPT";
|
|
44
|
+
const language = (0, react_redux_1.useSelector)((state) => state.setting.language);
|
|
45
|
+
const [isLanguageVisible, setIsLanguageVisible] = (0, react_1.useState)(false);
|
|
23
46
|
let settingInfo = [
|
|
24
47
|
{
|
|
25
48
|
title: t("setting.tag.title"),
|
|
@@ -63,6 +86,15 @@ const SettingPage = ({ navigation }) => {
|
|
|
63
86
|
settingInfo = settingInfo.filter((info) => info.title !== t("setting.oldSystem.title"));
|
|
64
87
|
if (!displayOldSystemBtn)
|
|
65
88
|
settingInfo = settingInfo.filter((info) => info.title !== t("setting.oldSystem.title"));
|
|
89
|
+
// 言語を選べるのはJLPTのアプリだけ(ホームの言語ボタンと同じ)
|
|
90
|
+
if (isJLPT)
|
|
91
|
+
settingInfo.unshift({
|
|
92
|
+
title: t("setting.language.title"),
|
|
93
|
+
note: LanguageModal_1.LANGUAGE_NAMES[language],
|
|
94
|
+
icon: "language",
|
|
95
|
+
color: "blue",
|
|
96
|
+
handlePress: () => setIsLanguageVisible(true),
|
|
97
|
+
});
|
|
66
98
|
if (existInputQuiz)
|
|
67
99
|
settingInfo.push({
|
|
68
100
|
title: t("setting.saveInput.title"),
|
|
@@ -74,6 +106,7 @@ const SettingPage = ({ navigation }) => {
|
|
|
74
106
|
return (<react_native_1.View style={styles.container}>
|
|
75
107
|
{/* データ消去 */}
|
|
76
108
|
{settingInfo.map((info) => (<common_1.RectangleCard key={info.title} title={info.title} note={info.note} left={<common_1.IconInCircle name={info.icon} size={25}/>} onPress={info.handlePress} color={info.color} outerStyle={{ marginBottom: 20 }}/>))}
|
|
109
|
+
<LanguageModal_1.default visible={isLanguageVisible} onClose={() => setIsLanguageVisible(false)}/>
|
|
77
110
|
{/* 音量調節 */}
|
|
78
111
|
{/* <QuizOptionSelector type="soundVolume" /> */}
|
|
79
112
|
</react_native_1.View>);
|
package/dist/page/TestPage.js
CHANGED
|
@@ -14,19 +14,17 @@ const Square3s_1 = __importDefault(require("../component/TestPage/Square3s"));
|
|
|
14
14
|
const AverageBar_1 = __importDefault(require("../component/TestPage/AverageBar"));
|
|
15
15
|
const Paw5s_1 = __importDefault(require("../component/Basic/Paw5s"));
|
|
16
16
|
const testFnc_1 = require("../functions/testFnc");
|
|
17
|
-
const createQuizFncD_1 = require("../functions/createQuizFncD");
|
|
18
17
|
const QuizSaveData_1 = __importDefault(require("../quiz/save/QuizSaveData"));
|
|
19
18
|
const BarChartContainer_1 = __importDefault(require("../component/TestPage/BarChartContainer"));
|
|
20
19
|
const quizActionHook_1 = require("../hooks/quizActionHook");
|
|
21
20
|
const Discription_1 = __importDefault(require("../component/Discription"));
|
|
22
21
|
const basicHook_1 = require("../hooks/basicHook");
|
|
23
|
-
const createQuizFncJ_1 = require("../functions/createQuizFncJ");
|
|
24
22
|
const TestPage = react_1.default.memo(({ navigation, subject }) => {
|
|
25
23
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
26
24
|
const useStartQuiz = (0, quizActionHook_1.useStartQuizAction)();
|
|
27
25
|
const { t } = (0, common_1.useDrillTranslation)();
|
|
28
26
|
const TestDB = (0, react_2.useQuery)(db_1.TestSchema);
|
|
29
|
-
const
|
|
27
|
+
const { ops, query } = (0, basicHook_1.useEngineQuery)();
|
|
30
28
|
// const QuestionDB = useQuery(DQuestionSchema);
|
|
31
29
|
const isExistedSaveData = (0, react_redux_1.useSelector)((state) => state.score.isSave[subject.name]);
|
|
32
30
|
// Reduxから必要なデータを一括取得
|
|
@@ -55,16 +53,11 @@ const TestPage = react_1.default.memo(({ navigation, subject }) => {
|
|
|
55
53
|
},
|
|
56
54
|
});
|
|
57
55
|
// クイズ作成
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
quizList = isUnitType
|
|
65
|
-
? (0, createQuizFncD_1.getTestQuestionsByUnit)(QuestionInfo.query, quizCnt, subject.unit)
|
|
66
|
-
: (0, createQuizFncD_1.getTestQuestions)(QuestionInfo.query, quizCnt);
|
|
67
|
-
}
|
|
56
|
+
const quizList = ops.testQuestions(query, {
|
|
57
|
+
cnt: quizCnt,
|
|
58
|
+
tag: subject.tagName,
|
|
59
|
+
unit: isUnitType ? subject.unit : undefined,
|
|
60
|
+
});
|
|
68
61
|
const isExistQuiz = useStartQuiz(subject.name, quizList);
|
|
69
62
|
if (!isExistQuiz)
|
|
70
63
|
return;
|
|
@@ -83,7 +76,7 @@ const TestPage = react_1.default.memo(({ navigation, subject }) => {
|
|
|
83
76
|
<AverageBar_1.default percent={average} label={t("test.barLabel")}/>
|
|
84
77
|
<BarChartContainer_1.default subjectName={subject.name} TestDB={TestDB}/>
|
|
85
78
|
<react_native_1.View style={styles.test}>
|
|
86
|
-
<common_1.RectangleCard title={title} color="red" left={<common_1.IconInCircle name={iconName} circleColor="ltRed" size={25}/>} bottom={<Paw5s_1.default levels={cntByLevels} quizCnt={quizCnt
|
|
79
|
+
<common_1.RectangleCard title={title} color="red" left={<common_1.IconInCircle name={iconName} circleColor="ltRed" size={25}/>} bottom={<Paw5s_1.default levels={cntByLevels} quizCnt={t("count.questions", { cnt: quizCnt })}/>} onPress={() => handleStart()}/>
|
|
87
80
|
</react_native_1.View>
|
|
88
81
|
<common_1.RoundRectangleIcon title={t("test.showHistory")} onPress={() => navigation.navigate("History", { info: historyParams })} icon="history"/>
|
|
89
82
|
|
package/dist/quiz/Title.js
CHANGED
|
@@ -11,6 +11,7 @@ const common_1 = require("@nakamura-123/common");
|
|
|
11
11
|
const quizHook_1 = require("../hooks/quizHook");
|
|
12
12
|
const QuizTitle = () => {
|
|
13
13
|
var _a;
|
|
14
|
+
const { t } = (0, common_1.useDrillTranslation)();
|
|
14
15
|
const { turn, score, activeTurn, mode: activeMode, } = (0, react_redux_1.useSelector)((state) => state.quiz.currentInfo.state);
|
|
15
16
|
const mode = (0, quizHook_1.useGetMode)();
|
|
16
17
|
const question = (0, quizHook_1.useQuestionDataD)();
|
|
@@ -28,9 +29,11 @@ const QuizTitle = () => {
|
|
|
28
29
|
const rateCnt = base + (shouldIncrement ? 1 : 0);
|
|
29
30
|
const rate = rateCnt === 0 ? "0" : Math.floor((score / rateCnt) * 100).toString();
|
|
30
31
|
// 文章
|
|
31
|
-
const cntText =
|
|
32
|
+
const cntText = t("quiz.header.cnt", { turn: turn + 1, all: allQuizCnt });
|
|
32
33
|
const thisTurnCnt = mode === "quiz" ? activeTurn : activeTurn + 1;
|
|
33
|
-
const correctText = mode === "result"
|
|
34
|
+
const correctText = mode === "result"
|
|
35
|
+
? ""
|
|
36
|
+
: ` ${t("quiz.header.correct", { score, cnt: thisTurnCnt, rate })}`;
|
|
34
37
|
return (<react_native_1.View style={styles.container}>
|
|
35
38
|
<react_native_1.View style={{ flexDirection: "row", alignItems: "center" }}>
|
|
36
39
|
{isShowTag && <common_1.Icon5 name="tag" size={15} color={tagColor}/>}
|
package/dist/quiz/check/Check.js
CHANGED
|
@@ -41,18 +41,22 @@ const Check = ({ navigation }) => {
|
|
|
41
41
|
const isLastCheckTurn = (0, quizHook_1.useIsLastCheckTurn)();
|
|
42
42
|
const checkBadgeEligibility = (0, BadgeHook_1.useCheckBadgeEligibility)();
|
|
43
43
|
const type = (0, react_redux_1.useSelector)((state) => state.quiz.selected.type);
|
|
44
|
+
const isRetry = (0, react_redux_1.useSelector)((state) => state.quiz.currentInfo.isRetry);
|
|
44
45
|
(0, react_1.useEffect)(() => {
|
|
45
46
|
if (!isLastCheckTurn)
|
|
46
47
|
return;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
// やり直しは試験の記録を作らない。その日の問題数には数えるので、問題数のバッジだけ判定する
|
|
49
|
+
if (!isRetry) {
|
|
50
|
+
if (type === "test")
|
|
51
|
+
dispatch(db_1.TestModel.createTestLog(realm));
|
|
52
|
+
if (type === "miniTest")
|
|
53
|
+
dispatch(db_1.MinitestModel.createMiniTestLog(realm));
|
|
54
|
+
if (type === "boot")
|
|
55
|
+
dispatch(db_1.BootModel.createBootLog(realm));
|
|
56
|
+
}
|
|
53
57
|
// バッジの判定を行い、必要情報をオブジェクトにまとめる
|
|
54
58
|
// realmへ書き込み
|
|
55
|
-
checkBadgeEligibility();
|
|
59
|
+
checkBadgeEligibility(!!isRetry);
|
|
56
60
|
}, []);
|
|
57
61
|
return (<react_native_1.View style={styles.container}>
|
|
58
62
|
<react_native_1.View style={styles.left}>
|
|
@@ -12,6 +12,7 @@ const common_1 = require("@nakamura-123/common");
|
|
|
12
12
|
const stores_1 = require("@nakamura-123/stores");
|
|
13
13
|
const quizActionHook_1 = require("../../hooks/quizActionHook");
|
|
14
14
|
const NextQuiz = ({ navigation }) => {
|
|
15
|
+
const { t } = (0, common_1.useDrillTranslation)();
|
|
15
16
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
16
17
|
const nextQuizAction = (0, quizActionHook_1.useNextQuizAction)();
|
|
17
18
|
const { turn, activeTurn, mode } = (0, react_redux_1.useSelector)((state) => state.quiz.currentInfo.state);
|
|
@@ -20,8 +21,8 @@ const NextQuiz = ({ navigation }) => {
|
|
|
20
21
|
// 画面遷移のための関数を定義
|
|
21
22
|
// 2つのボタンを定義
|
|
22
23
|
const btnInfo = {
|
|
23
|
-
next: { icon: "gesture-swipe-left", text: "
|
|
24
|
-
return: { icon: "reply", text: "
|
|
24
|
+
next: { icon: "gesture-swipe-left", text: t("quiz.nextBtn.next") },
|
|
25
|
+
return: { icon: "reply", text: t("quiz.nextBtn.return") },
|
|
25
26
|
};
|
|
26
27
|
// ボタンの表示を切り替え
|
|
27
28
|
const btn = isActiveTurn || isResult ? btnInfo.next : btnInfo.return;
|
|
@@ -28,6 +28,13 @@ const SelectTag = () => {
|
|
|
28
28
|
tagInfos = getTagInfos(lib_1.tagLevels, question.tag);
|
|
29
29
|
tagId = (0, quizHook_1.useTagIdJ)(question.quizId, selected.tagName);
|
|
30
30
|
}
|
|
31
|
+
else if (selectedSystem === "grammar") {
|
|
32
|
+
const question = (0, quizHook_1.useQuestionDataG)();
|
|
33
|
+
if (!question)
|
|
34
|
+
return null;
|
|
35
|
+
tagInfos = getTagInfos(lib_1.tagLevels, question.tag);
|
|
36
|
+
tagId = (0, quizHook_1.useTagIdG)(question.quizId, question.tagName);
|
|
37
|
+
}
|
|
31
38
|
else {
|
|
32
39
|
const question = (0, quizHook_1.useQuestionDataD)();
|
|
33
40
|
if (!question)
|
|
@@ -11,7 +11,7 @@ const react_redux_2 = require("react-redux");
|
|
|
11
11
|
const common_1 = require("@nakamura-123/common");
|
|
12
12
|
const lib_1 = require("@nakamura-123/lib");
|
|
13
13
|
const react_native_animatable_1 = require("react-native-animatable");
|
|
14
|
-
const MyTextqqyy = ({ children, style, isNotSearch, fsize, selectable, weight, }) => {
|
|
14
|
+
const MyTextqqyy = ({ children, style, isNotSearch, fsize, selectable, weight, numberOfLines, }) => {
|
|
15
15
|
const dispatch = (0, react_redux_2.useDispatch)();
|
|
16
16
|
let fontSize = (0, react_redux_1.useSelector)((state) => state.quizCfg.inQuizOption.fsize);
|
|
17
17
|
let fontWeigth = (0, react_redux_1.useSelector)((state) => state.quizCfg.inQuizOption.fWeight);
|
|
@@ -20,7 +20,7 @@ const MyTextqqyy = ({ children, style, isNotSearch, fsize, selectable, weight, }
|
|
|
20
20
|
if (weight)
|
|
21
21
|
fontWeigth = weight;
|
|
22
22
|
const parsedText = parseText(children, isNotSearch !== null && isNotSearch !== void 0 ? isNotSearch : false);
|
|
23
|
-
return (<common_1.MyText style={Object.assign(Object.assign({}, styles.p), style)} selectable={selectable}>
|
|
23
|
+
return (<common_1.MyText style={Object.assign(Object.assign({}, styles.p), style)} selectable={selectable} numberOfLines={numberOfLines}>
|
|
24
24
|
{parsedText.map((item) => renderText(item, (word) => lib_1.utilFnc.handleSearch(word), fontSize, fontWeigth, dispatch))}
|
|
25
25
|
</common_1.MyText>);
|
|
26
26
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { TextStyle } from "react-native";
|
|
2
3
|
import { StackNavigationProp } from "@react-navigation/stack";
|
|
3
4
|
import { Nav } from "@nakamura-123/types";
|
|
4
5
|
interface Props {
|
|
5
6
|
word: string;
|
|
7
|
+
textStyle?: TextStyle;
|
|
6
8
|
imgKey?: string;
|
|
7
9
|
navigation?: StackNavigationProp<Nav.RootStackParamList>;
|
|
8
10
|
isNotSearch?: boolean;
|
|
@@ -11,7 +11,7 @@ const common_1 = require("@nakamura-123/common");
|
|
|
11
11
|
const ZoomableImage_1 = __importDefault(require("./ZoomableImage"));
|
|
12
12
|
const RubyText_1 = __importDefault(require("./RubyText"));
|
|
13
13
|
const utils_1 = require("@nakamura-123/lib/dist/functions/utils");
|
|
14
|
-
const RenderImgOrText = ({ word, imgKey = null, navigation, isNotSearch, selectable, }) => {
|
|
14
|
+
const RenderImgOrText = ({ word, imgKey = null, navigation, isNotSearch, selectable, textStyle, }) => {
|
|
15
15
|
const appSystem = (0, react_redux_1.useSelector)((state) => state.app.appSetting.setting.appSystem);
|
|
16
16
|
const isJLPT = appSystem === "JLPT";
|
|
17
17
|
const qImgs = (0, react_redux_1.useSelector)((state) => state.app.imgs.qImgs);
|
|
@@ -30,7 +30,7 @@ const RenderImgOrText = ({ word, imgKey = null, navigation, isNotSearch, selecta
|
|
|
30
30
|
}
|
|
31
31
|
else if (regex.test(word))
|
|
32
32
|
return <RubyText_1.default>{word}</RubyText_1.default>;
|
|
33
|
-
return (<MyTextqqyy_1.default isNotSearch={isNotSearch} selectable={selectable}>
|
|
33
|
+
return (<MyTextqqyy_1.default isNotSearch={isNotSearch} selectable={selectable} style={textStyle}>
|
|
34
34
|
{word}
|
|
35
35
|
</MyTextqqyy_1.default>);
|
|
36
36
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ViewStyle } from "react-native";
|
|
3
|
-
import { FontSize } from "@nakamura-123/lib";
|
|
3
|
+
import { ColorKeys, FontSize } from "@nakamura-123/lib";
|
|
4
4
|
interface RubyTextProps {
|
|
5
5
|
children: string;
|
|
6
6
|
cStyle?: ViewStyle;
|
|
7
7
|
fsize?: FontSize;
|
|
8
8
|
isNoWrap?: boolean;
|
|
9
|
+
udlMode?: "underline" | "blank";
|
|
10
|
+
udlColor?: ColorKeys;
|
|
9
11
|
}
|
|
10
12
|
declare const RubyText: React.FC<RubyTextProps>;
|
|
11
13
|
export default RubyText;
|
|
@@ -9,7 +9,7 @@ const MyTextqqyy_1 = __importDefault(require("./MyTextqqyy"));
|
|
|
9
9
|
const react_redux_1 = require("react-redux");
|
|
10
10
|
const lib_1 = require("@nakamura-123/lib");
|
|
11
11
|
const common_1 = require("@nakamura-123/common");
|
|
12
|
-
const RubyText = ({ fsize, cStyle, isNoWrap, children, }) => {
|
|
12
|
+
const RubyText = ({ fsize, cStyle, isNoWrap, udlMode = "underline", udlColor, children, }) => {
|
|
13
13
|
const parsedText = lib_1.utilFnc.parseRubyText(children);
|
|
14
14
|
let fontSize = (0, react_redux_1.useSelector)((state) => state.quizCfg.inQuizOption.fsize);
|
|
15
15
|
// const nextSize = getNextFontSize(fontSize);
|
|
@@ -18,7 +18,15 @@ const RubyText = ({ fsize, cStyle, isNoWrap, children, }) => {
|
|
|
18
18
|
const flexWrap = isNoWrap ? "nowrap" : "wrap";
|
|
19
19
|
const { bHeight, oHeight } = getLineHeight(fontSize);
|
|
20
20
|
return (<react_native_1.View style={Object.assign(Object.assign({}, styles.lineWrap), { flexWrap })}>
|
|
21
|
-
{parsedText.map((part, index) =>
|
|
21
|
+
{parsedText.map((part, index) => {
|
|
22
|
+
var _a;
|
|
23
|
+
// 空欄は udl[ ] のひとまとまりに1つだけ出す(ふりがなで部分が分かれていても)
|
|
24
|
+
if (udlMode === "blank" && part.udl) {
|
|
25
|
+
if ((_a = parsedText[index - 1]) === null || _a === void 0 ? void 0 : _a.udl)
|
|
26
|
+
return null;
|
|
27
|
+
return (<react_native_1.View key={index} style={Object.assign(Object.assign({}, styles.blank), { height: oHeight - 6 })}/>);
|
|
28
|
+
}
|
|
29
|
+
return part.ruby ? (<react_native_1.View key={index}>
|
|
22
30
|
<react_native_1.Text key={index} style={Object.assign(Object.assign({}, styles.rubyWrapper), cStyle)}>
|
|
23
31
|
<MyTextqqyy_1.default style={Object.assign({}, styles.ruby)} fsize="xs">
|
|
24
32
|
{part.ruby}
|
|
@@ -28,13 +36,14 @@ const RubyText = ({ fsize, cStyle, isNoWrap, children, }) => {
|
|
|
28
36
|
{part.base}
|
|
29
37
|
</MyTextqqyy_1.default>
|
|
30
38
|
</react_native_1.Text>
|
|
31
|
-
{part.udl && <common_1.UnderLine />}
|
|
39
|
+
{part.udl && <common_1.UnderLine color={udlColor}/>}
|
|
32
40
|
</react_native_1.View>) : (<react_native_1.View key={index}>
|
|
33
41
|
<MyTextqqyy_1.default style={Object.assign(Object.assign({}, styles.onlyBase), { lineHeight: oHeight })} fsize={fontSize}>
|
|
34
42
|
{part.base}
|
|
35
43
|
</MyTextqqyy_1.default>
|
|
36
|
-
{part.udl && <common_1.UnderLine />}
|
|
37
|
-
</react_native_1.View>)
|
|
44
|
+
{part.udl && <common_1.UnderLine color={udlColor}/>}
|
|
45
|
+
</react_native_1.View>);
|
|
46
|
+
})}
|
|
38
47
|
</react_native_1.View>);
|
|
39
48
|
};
|
|
40
49
|
// LineHeightを算出し、返す
|
|
@@ -67,6 +76,12 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
67
76
|
lineHeight: 20,
|
|
68
77
|
textAlign: "center",
|
|
69
78
|
},
|
|
79
|
+
blank: {
|
|
80
|
+
minWidth: 80,
|
|
81
|
+
marginHorizontal: 3,
|
|
82
|
+
borderBottomWidth: 2,
|
|
83
|
+
borderBottomColor: lib_1.colors.text,
|
|
84
|
+
},
|
|
70
85
|
onlyBase: {
|
|
71
86
|
lineHeight: 35,
|
|
72
87
|
margin: 0,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StackNavigationProp } from "@react-navigation/stack";
|
|
3
|
+
import { Nav } from "@nakamura-123/types";
|
|
4
|
+
type Prop = {
|
|
5
|
+
navigation: StackNavigationProp<Nav.RootStackParamList>;
|
|
6
|
+
};
|
|
7
|
+
declare const GAnswer: React.FC<Prop>;
|
|
8
|
+
export default GAnswer;
|