@nakamura-123/pages 0.0.1
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/Badge5s.d.ts +9 -0
- package/dist/component/Badge5s.js +46 -0
- package/dist/component/BasicSetting.d.ts +9 -0
- package/dist/component/BasicSetting.js +31 -0
- package/dist/component/Boot/IconTitleAndToggle.d.ts +8 -0
- package/dist/component/Boot/IconTitleAndToggle.js +20 -0
- package/dist/component/Boot/SelectRange.d.ts +6 -0
- package/dist/component/Boot/SelectRange.js +44 -0
- package/dist/component/Boot/SelectUnit.d.ts +6 -0
- package/dist/component/Boot/SelectUnit.js +41 -0
- package/dist/component/Boot/ToggleRange.d.ts +8 -0
- package/dist/component/Boot/ToggleRange.js +54 -0
- package/dist/component/Coin/AppReviews.d.ts +10 -0
- package/dist/component/Coin/AppReviews.js +45 -0
- package/dist/component/Coin/CatchCopy.d.ts +3 -0
- package/dist/component/Coin/CatchCopy.js +31 -0
- package/dist/component/Coin/Recommend.d.ts +3 -0
- package/dist/component/Coin/Recommend.js +87 -0
- package/dist/component/Grade/AllBadges.d.ts +7 -0
- package/dist/component/Grade/AllBadges.js +41 -0
- package/dist/component/Grade/AllTags.d.ts +5 -0
- package/dist/component/Grade/AllTags.js +32 -0
- package/dist/component/Grade/BasicBadge.d.ts +7 -0
- package/dist/component/Grade/BasicBadge.js +72 -0
- package/dist/component/Grade/ChangeWeeklyTargetBtn.d.ts +5 -0
- package/dist/component/Grade/ChangeWeeklyTargetBtn.js +39 -0
- package/dist/component/Grade/DatePickerModal.d.ts +8 -0
- package/dist/component/Grade/DatePickerModal.js +45 -0
- package/dist/component/Grade/GradeCard/ChangeWeeklyModal.d.ts +13 -0
- package/dist/component/Grade/GradeCard/ChangeWeeklyModal.js +39 -0
- package/dist/component/Grade/GradeCard/ChangeWeeklyTargetBtn.d.ts +7 -0
- package/dist/component/Grade/GradeCard/ChangeWeeklyTargetBtn.js +60 -0
- package/dist/component/Grade/GradeCard/DatePickerModal.d.ts +8 -0
- package/dist/component/Grade/GradeCard/DatePickerModal.js +49 -0
- package/dist/component/Grade/GradeCard/GradeCard.d.ts +7 -0
- package/dist/component/Grade/GradeCard/GradeCard.js +53 -0
- package/dist/component/Grade/GradeCard/Square3sGrade.d.ts +11 -0
- package/dist/component/Grade/GradeCard/Square3sGrade.js +60 -0
- package/dist/component/Grade/GradeCard/TargetDate.d.ts +7 -0
- package/dist/component/Grade/GradeCard/TargetDate.js +60 -0
- package/dist/component/Grade/GradeCard/WeeklyAchivedRate.d.ts +9 -0
- package/dist/component/Grade/GradeCard/WeeklyAchivedRate.js +28 -0
- package/dist/component/Grade/GradeCard/WeeklyProgress.d.ts +11 -0
- package/dist/component/Grade/GradeCard/WeeklyProgress.js +88 -0
- package/dist/component/Grade/GradeCard.d.ts +4 -0
- package/dist/component/Grade/GradeCard.js +53 -0
- package/dist/component/Grade/QuizCntGraph.d.ts +8 -0
- package/dist/component/Grade/QuizCntGraph.js +104 -0
- package/dist/component/Grade/Scuare3sGrade.d.ts +9 -0
- package/dist/component/Grade/Scuare3sGrade.js +35 -0
- package/dist/component/Grade/ShareBtn.d.ts +6 -0
- package/dist/component/Grade/ShareBtn.js +86 -0
- package/dist/component/Grade/Square3sGrade.d.ts +9 -0
- package/dist/component/Grade/Square3sGrade.js +63 -0
- package/dist/component/Grade/Square4s.d.ts +7 -0
- package/dist/component/Grade/Square4s.js +63 -0
- package/dist/component/Grade/TargetDate.d.ts +4 -0
- package/dist/component/Grade/TargetDate.js +56 -0
- package/dist/component/Grade/WeeklyAchivedRate.d.ts +7 -0
- package/dist/component/Grade/WeeklyAchivedRate.js +28 -0
- package/dist/component/Grade/WeeklyProgress.d.ts +9 -0
- package/dist/component/Grade/WeeklyProgress.js +80 -0
- package/dist/component/HeadNavigator.d.ts +0 -0
- package/dist/component/HeadNavigator.js +49 -0
- package/dist/component/HomePage.d.ts +8 -0
- package/dist/component/HomePage.js +44 -0
- package/dist/component/MiniTestCard.d.ts +9 -0
- package/dist/component/MiniTestCard.js +75 -0
- package/dist/component/Paw4s.d.ts +7 -0
- package/dist/component/Paw4s.js +51 -0
- package/dist/component/Paw5s.d.ts +7 -0
- package/dist/component/Paw5s.js +51 -0
- package/dist/component/QuizSet/QuizOptionDrill.d.ts +5 -0
- package/dist/component/QuizSet/QuizOptionDrill.js +46 -0
- package/dist/component/QuizSet/QuizSetDrill.d.ts +5 -0
- package/dist/component/QuizSet/QuizSetDrill.js +43 -0
- package/dist/component/Result/CharaCard.d.ts +7 -0
- package/dist/component/Result/CharaCard.js +43 -0
- package/dist/component/Result/LessonTitle.d.ts +3 -0
- package/dist/component/Result/LessonTitle.js +42 -0
- package/dist/component/Result/QuizFlatList.d.ts +7 -0
- package/dist/component/Result/QuizFlatList.js +76 -0
- package/dist/component/Result/ScoreBox.d.ts +7 -0
- package/dist/component/Result/ScoreBox.js +61 -0
- package/dist/component/Result/ScoreCircle.d.ts +7 -0
- package/dist/component/Result/ScoreCircle.js +59 -0
- package/dist/component/SelectRange/SelectYearRange.d.ts +7 -0
- package/dist/component/SelectRange/SelectYearRange.js +105 -0
- package/dist/component/SettingBtns/Config.d.ts +8 -0
- package/dist/component/SettingBtns/Config.js +17 -0
- package/dist/component/SettingBtns/Grade.d.ts +8 -0
- package/dist/component/SettingBtns/Grade.js +17 -0
- package/dist/component/SettingBtns/QuizOptionSelector.d.ts +7 -0
- package/dist/component/SettingBtns/QuizOptionSelector.js +43 -0
- package/dist/component/SettingBtns/Range.d.ts +5 -0
- package/dist/component/SettingBtns/Range.js +44 -0
- package/dist/component/SettingBtns/Report.d.ts +5 -0
- package/dist/component/SettingBtns/Report.js +16 -0
- package/dist/component/SettingBtns/Setting.d.ts +0 -0
- package/dist/component/SettingBtns/Setting.js +1 -0
- package/dist/component/Square3s.d.ts +7 -0
- package/dist/component/Square3s.js +38 -0
- package/dist/component/SubCagegoryList.d.ts +8 -0
- package/dist/component/SubCagegoryList.js +120 -0
- package/dist/component/SubCategoryLeft.d.ts +5 -0
- package/dist/component/SubCategoryLeft.js +14 -0
- package/dist/component/SubCategoryList.d.ts +9 -0
- package/dist/component/SubCategoryList.js +77 -0
- package/dist/component/TabAnimeView.d.ts +7 -0
- package/dist/component/TabAnimeView.js +61 -0
- package/dist/component/TabContents.d.ts +1 -0
- package/dist/component/TabContents.js +18 -0
- package/dist/component/TabContentsWrap.d.ts +7 -0
- package/dist/component/TabContentsWrap.js +38 -0
- package/dist/component/Tag5s.d.ts +6 -0
- package/dist/component/Tag5s.js +49 -0
- package/dist/component/TagBadge5s.d.ts +7 -0
- package/dist/component/TagBadge5s.js +63 -0
- package/dist/component/TagBadge5sPress.d.ts +6 -0
- package/dist/component/TagBadge5sPress.js +29 -0
- package/dist/component/TestCard.d.ts +7 -0
- package/dist/component/TestCard.js +57 -0
- package/dist/component/TestPage/AverageBar.d.ts +11 -0
- package/dist/component/TestPage/AverageBar.js +74 -0
- package/dist/component/TestPage/BarChart.d.ts +7 -0
- package/dist/component/TestPage/BarChart.js +107 -0
- package/dist/component/TestPage/BarChartContainer.d.ts +9 -0
- package/dist/component/TestPage/BarChartContainer.js +99 -0
- package/dist/component/TestPage/BarGraph.d.ts +11 -0
- package/dist/component/TestPage/BarGraph.js +60 -0
- package/dist/component/TestPage/ChartControl.d.ts +10 -0
- package/dist/component/TestPage/ChartControl.js +43 -0
- package/dist/component/TestPage/Square3s.d.ts +9 -0
- package/dist/component/TestPage/Square3s.js +35 -0
- package/dist/component/UnitPage.d.ts +10 -0
- package/dist/component/UnitPage.js +15 -0
- package/dist/functions/InQuizFnc.d.ts +0 -0
- package/dist/functions/InQuizFnc.js +1 -0
- package/dist/functions/badgeBasicFnc.d.ts +14 -0
- package/dist/functions/badgeBasicFnc.js +68 -0
- package/dist/functions/badgeDailyFnc.d.ts +15 -0
- package/dist/functions/badgeDailyFnc.js +65 -0
- package/dist/functions/badgeFilter.d.ts +17 -0
- package/dist/functions/badgeFilter.js +33 -0
- package/dist/functions/badgeFnc.d.ts +15 -0
- package/dist/functions/badgeFnc.js +68 -0
- package/dist/functions/createQuizFnc.d.ts +13 -0
- package/dist/functions/createQuizFnc.js +69 -0
- package/dist/functions/gradeFnc.d.ts +16 -0
- package/dist/functions/gradeFnc.js +83 -0
- package/dist/functions/questionFilter.d.ts +16 -0
- package/dist/functions/questionFilter.js +79 -0
- package/dist/functions/questionFormat.d.ts +7 -0
- package/dist/functions/questionFormat.js +89 -0
- package/dist/functions/tagFnc.d.ts +22 -0
- package/dist/functions/tagFnc.js +105 -0
- package/dist/functions/testFnc.d.ts +8 -0
- package/dist/functions/testFnc.js +21 -0
- package/dist/helper/scoreFnc.d.ts +10 -0
- package/dist/helper/scoreFnc.js +40 -0
- package/dist/helper/tagFnc.d.ts +23 -0
- package/dist/helper/tagFnc.js +69 -0
- package/dist/helper/testFnc.d.ts +7 -0
- package/dist/helper/testFnc.js +17 -0
- package/dist/hooks/BadgeHook.d.ts +1 -0
- package/dist/hooks/BadgeHook.js +65 -0
- package/dist/hooks/ExitQuizHook.d.ts +2 -0
- package/dist/hooks/ExitQuizHook.js +54 -0
- package/dist/hooks/basicHook.d.ts +3 -0
- package/dist/hooks/basicHook.js +14 -0
- package/dist/hooks/quizActionHook.d.ts +5 -0
- package/dist/hooks/quizActionHook.js +86 -0
- package/dist/hooks/quizHook.d.ts +15 -0
- package/dist/hooks/quizHook.js +60 -0
- package/dist/hooks/selector.d.ts +6 -0
- package/dist/hooks/selector.js +24 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +68 -0
- package/dist/page/BadgePage.d.ts +8 -0
- package/dist/page/BadgePage.js +58 -0
- package/dist/page/BasicPage.d.ts +9 -0
- package/dist/page/BasicPage.js +125 -0
- package/dist/page/BootPage.d.ts +9 -0
- package/dist/page/BootPage.js +116 -0
- package/dist/page/CoinPage.d.ts +9 -0
- package/dist/page/CoinPage.js +51 -0
- package/dist/page/GetBadgePage.d.ts +7 -0
- package/dist/page/GetBadgePage.js +173 -0
- package/dist/page/GradePage.d.ts +7 -0
- package/dist/page/GradePage.js +37 -0
- package/dist/page/HistoryPage.d.ts +11 -0
- package/dist/page/HistoryPage.js +62 -0
- package/dist/page/HomePage.d.ts +8 -0
- package/dist/page/HomePage.js +80 -0
- package/dist/page/ImgZoom.d.ts +10 -0
- package/dist/page/ImgZoom.js +29 -0
- package/dist/page/QuixPage.d.ts +7 -0
- package/dist/page/QuixPage.js +33 -0
- package/dist/page/QuizPage.d.ts +7 -0
- package/dist/page/QuizPage.js +98 -0
- package/dist/page/QuizSettingPage.d.ts +7 -0
- package/dist/page/QuizSettingPage.js +72 -0
- package/dist/page/QuizSetupPage.d.ts +7 -0
- package/dist/page/QuizSetupPage.js +85 -0
- package/dist/page/ReportPage.d.ts +8 -0
- package/dist/page/ReportPage.js +185 -0
- package/dist/page/ResultPage.d.ts +7 -0
- package/dist/page/ResultPage.js +47 -0
- package/dist/page/SettingPage.d.ts +7 -0
- package/dist/page/SettingPage.js +62 -0
- package/dist/page/TestPage.d.ts +9 -0
- package/dist/page/TestPage.js +101 -0
- package/dist/page/UnitPage.d.ts +9 -0
- package/dist/page/UnitPage.js +127 -0
- package/dist/page/ZoomImg.d.ts +0 -0
- package/dist/page/ZoomImg.js +1 -0
- package/dist/quiz/GoBackAlert.d.ts +2 -0
- package/dist/quiz/GoBackAlert.js +30 -0
- package/dist/quiz/MyImage.d.ts +9 -0
- package/dist/quiz/MyImage.js +60 -0
- package/dist/quiz/MyTextqqyy.d.ts +10 -0
- package/dist/quiz/MyTextqqyy.js +80 -0
- package/dist/quiz/Question.d.ts +3 -0
- package/dist/quiz/Question.js +43 -0
- package/dist/quiz/Quiz.d.ts +9 -0
- package/dist/quiz/Quiz.js +44 -0
- package/dist/quiz/QuizTitle.d.ts +3 -0
- package/dist/quiz/QuizTitle.js +51 -0
- package/dist/quiz/Title.d.ts +3 -0
- package/dist/quiz/Title.js +51 -0
- package/dist/quiz/answer/Answer.d.ts +3 -0
- package/dist/quiz/answer/Answer.js +41 -0
- package/dist/quiz/answer/BlankAnswer.d.ts +7 -0
- package/dist/quiz/answer/BlankAnswer.js +33 -0
- package/dist/quiz/answer/BlankBtn.d.ts +3 -0
- package/dist/quiz/answer/BlankBtn.js +50 -0
- package/dist/quiz/answer/ChoiceView.d.ts +17 -0
- package/dist/quiz/answer/ChoiceView.js +53 -0
- package/dist/quiz/answer/CommonChoice.d.ts +0 -0
- package/dist/quiz/answer/CommonChoice.js +1 -0
- package/dist/quiz/answer/MultiChoice.d.ts +7 -0
- package/dist/quiz/answer/MultiChoice.js +66 -0
- package/dist/quiz/answer/MultiChoiceContainer.d.ts +7 -0
- package/dist/quiz/answer/MultiChoiceContainer.js +71 -0
- package/dist/quiz/answer/MultiChoiceLogic.d.ts +0 -0
- package/dist/quiz/answer/MultiChoiceLogic.js +1 -0
- package/dist/quiz/answer/MultiNextBtn.d.ts +7 -0
- package/dist/quiz/answer/MultiNextBtn.js +36 -0
- package/dist/quiz/answer/NormalChoice.d.ts +7 -0
- package/dist/quiz/answer/NormalChoice.js +64 -0
- package/dist/quiz/answer/NormalChoiceContainer.d.ts +7 -0
- package/dist/quiz/answer/NormalChoiceContainer.js +76 -0
- package/dist/quiz/answer/NormalChoiceView.d.ts +17 -0
- package/dist/quiz/answer/NormalChoiceView.js +53 -0
- package/dist/quiz/answer/NormalSelect.d.ts +5 -0
- package/dist/quiz/answer/NormalSelect.js +28 -0
- package/dist/quiz/answer/memo.d.ts +9 -0
- package/dist/quiz/answer/memo.js +114 -0
- package/dist/quiz/answer/style/getChoiceStyle.d.ts +2 -0
- package/dist/quiz/answer/style/getChoiceStyle.js +17 -0
- package/dist/quiz/answer/styles/getChoiceStyle.d.ts +5 -0
- package/dist/quiz/answer/styles/getChoiceStyle.js +32 -0
- package/dist/quiz/answer/util/choiceFnc.d.ts +2 -0
- package/dist/quiz/answer/util/choiceFnc.js +9 -0
- package/dist/quiz/check/Check.d.ts +8 -0
- package/dist/quiz/check/Check.js +82 -0
- package/dist/quiz/check/NextQuiz.d.ts +8 -0
- package/dist/quiz/check/NextQuiz.js +42 -0
- package/dist/quiz/check/NextQuizBtn.d.ts +8 -0
- package/dist/quiz/check/NextQuizBtn.js +67 -0
- package/dist/quiz/check/SelectTag.d.ts +5 -0
- package/dist/quiz/check/SelectTag.js +86 -0
- package/dist/quiz/common/MyImage.d.ts +6 -0
- package/dist/quiz/common/MyImage.js +56 -0
- package/dist/quiz/common/MyTextqqyy.d.ts +11 -0
- package/dist/quiz/common/MyTextqqyy.js +133 -0
- package/dist/quiz/common/PageContainerWrap.d.ts +10 -0
- package/dist/quiz/common/PageContainerWrap.js +38 -0
- package/dist/quiz/common/RenderImgOrText.d.ts +11 -0
- package/dist/quiz/common/RenderImgOrText.js +21 -0
- package/dist/quiz/common/ZoomableImage.d.ts +9 -0
- package/dist/quiz/common/ZoomableImage.js +18 -0
- package/dist/quiz/explain/CorrectBar.d.ts +7 -0
- package/dist/quiz/explain/CorrectBar.js +46 -0
- package/dist/quiz/explain/CorrectedBar.d.ts +7 -0
- package/dist/quiz/explain/CorrectedBar.js +45 -0
- package/dist/quiz/explain/Example.d.ts +8 -0
- package/dist/quiz/explain/Example.js +107 -0
- package/dist/quiz/explain/Explain.d.ts +8 -0
- package/dist/quiz/explain/Explain.js +59 -0
- package/dist/quiz/explain/ExplainLogic.d.ts +17 -0
- package/dist/quiz/explain/ExplainLogic.js +52 -0
- package/dist/quiz/function/choiceFnc.d.ts +2 -0
- package/dist/quiz/function/choiceFnc.js +9 -0
- package/dist/quiz/function/turnModeFnc.d.ts +0 -0
- package/dist/quiz/function/turnModeFnc.js +31 -0
- package/dist/quiz/question/FillDiagram.d.ts +10 -0
- package/dist/quiz/question/FillDiagram.js +27 -0
- package/dist/quiz/question/Question.d.ts +8 -0
- package/dist/quiz/question/Question.js +61 -0
- package/dist/quiz/question/QuestionFormat.d.ts +8 -0
- package/dist/quiz/question/QuestionFormat.js +69 -0
- package/dist/quiz/question/QuestionFormats.d.ts +9 -0
- package/dist/quiz/question/QuestionFormats.js +75 -0
- package/dist/quiz/question/QuestionMultiFormat.d.ts +7 -0
- package/dist/quiz/question/QuestionMultiFormat.js +43 -0
- package/dist/quiz/question/QuestionTxtFomat.d.ts +7 -0
- package/dist/quiz/question/QuestionTxtFomat.js +42 -0
- package/dist/quiz/question/SearchYoutue.d.ts +6 -0
- package/dist/quiz/question/SearchYoutue.js +20 -0
- package/dist/quiz/question/questionStyleFormat.d.ts +8 -0
- package/dist/quiz/question/questionStyleFormat.js +61 -0
- package/dist/quiz/save/QuizSaveData.d.ts +9 -0
- package/dist/quiz/save/QuizSaveData.js +68 -0
- package/dist/quiz/setting/Bottom3Btn.d.ts +8 -0
- package/dist/quiz/setting/Bottom3Btn.js +79 -0
- package/dist/quiz/setting/ReturnBtn.d.ts +7 -0
- package/dist/quiz/setting/ReturnBtn.js +77 -0
- package/dist/quiz/setting/ReturnSaveBtn.d.ts +7 -0
- package/dist/quiz/setting/ReturnSaveBtn.js +94 -0
- package/dist/quiz/styles/getChoiceStyle.d.ts +5 -0
- package/dist/quiz/styles/getChoiceStyle.js +32 -0
- package/dist/quiz/util/choiceFnc.d.ts +2 -0
- package/dist/quiz/util/choiceFnc.js +9 -0
- package/dist/quiz/util/commonFnc.d.ts +0 -0
- package/dist/quiz/util/commonFnc.js +1 -0
- package/dist/quiz/util/customHook.d.ts +0 -0
- package/dist/quiz/util/customHook.js +1 -0
- package/dist/quiz/util/customSelector.d.ts +5 -0
- package/dist/quiz/util/customSelector.js +16 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/homePage.d.ts +12 -0
- package/dist/types/homePage.js +2 -0
- package/package.json +23 -0
|
@@ -0,0 +1,47 @@
|
|
|
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 common_1 = require("@nakamura-123/common");
|
|
9
|
+
var CharaCard_1 = __importDefault(require("../component/Result/CharaCard"));
|
|
10
|
+
var LessonTitle_1 = __importDefault(require("../component/Result/LessonTitle"));
|
|
11
|
+
var quizHook_1 = require("../hooks/quizHook");
|
|
12
|
+
var ScoreCircle_1 = __importDefault(require("../component/Result/ScoreCircle"));
|
|
13
|
+
var QuizFlatList_1 = __importDefault(require("../component/Result/QuizFlatList"));
|
|
14
|
+
var ResultPage = function (_a) {
|
|
15
|
+
// スワイプの動作処理
|
|
16
|
+
var navigation = _a.navigation;
|
|
17
|
+
var scoreInfo = (0, quizHook_1.useScoreInfo)();
|
|
18
|
+
return (<react_native_1.View style={styles.page}>
|
|
19
|
+
<CharaCard_1.default scoreInfo={scoreInfo}/>
|
|
20
|
+
<LessonTitle_1.default />
|
|
21
|
+
<ScoreCircle_1.default scoreInfo={scoreInfo}/>
|
|
22
|
+
<react_native_1.View style={styles.btnBox}>
|
|
23
|
+
<common_1.MiniIconBtn onPress={function () { return navigation.navigate("Grade"); }} icon="chart-line" title="成 績" color="green" outerStyle={styles.miniBtnOuter}/>
|
|
24
|
+
<common_1.MiniIconBtn onPress={function () { return navigation.goBack(); }} icon="arrow-left" title="戻 る" color="blue" outerStyle={styles.miniBtnOuter}/>
|
|
25
|
+
</react_native_1.View>
|
|
26
|
+
<QuizFlatList_1.default navigation={navigation}/>
|
|
27
|
+
</react_native_1.View>);
|
|
28
|
+
};
|
|
29
|
+
var styles = react_native_1.StyleSheet.create({
|
|
30
|
+
page: {
|
|
31
|
+
flex: 1,
|
|
32
|
+
justifyContent: "center",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
paddingHorizontal: 20,
|
|
35
|
+
},
|
|
36
|
+
btnBox: {
|
|
37
|
+
width: "100%",
|
|
38
|
+
flexDirection: "row",
|
|
39
|
+
justifyContent: "center",
|
|
40
|
+
paddingVertical: 5,
|
|
41
|
+
},
|
|
42
|
+
miniBtnOuter: {
|
|
43
|
+
width: "35%",
|
|
44
|
+
marginHorizontal: 20,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
exports.default = ResultPage;
|
|
@@ -0,0 +1,62 @@
|
|
|
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_2 = require("@realm/react");
|
|
9
|
+
var common_1 = require("@nakamura-123/common");
|
|
10
|
+
var lib_1 = require("@nakamura-123/lib");
|
|
11
|
+
var db_1 = require("@nakamura-123/db");
|
|
12
|
+
var QuizOptionSelector_1 = __importDefault(require("../component/SettingBtns/QuizOptionSelector"));
|
|
13
|
+
var SettingPage = function (_a) {
|
|
14
|
+
var navigation = _a.navigation;
|
|
15
|
+
var realm = (0, react_2.useRealm)();
|
|
16
|
+
var settingInfo = [
|
|
17
|
+
{
|
|
18
|
+
title: "ふせんの初期化",
|
|
19
|
+
note: "すべてのふせんをグレー(未実施)に戻します",
|
|
20
|
+
icon: "tag",
|
|
21
|
+
color: "green",
|
|
22
|
+
handlePress: function () {
|
|
23
|
+
return lib_1.utilFnc.showConfirmationAlert("本当に、すべてのふせんをグレー(未実施)に戻しますか?", function () { return db_1.TagModel.toL1AllTags(realm); });
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: "全成績の削除",
|
|
28
|
+
note: "すべての実績と成績を削除します",
|
|
29
|
+
icon: "trash",
|
|
30
|
+
color: "red",
|
|
31
|
+
handlePress: function () {
|
|
32
|
+
return lib_1.utilFnc.showConfirmationAlert("本当に、すべての実績と成績を削除しますか?(ふせんと記述問題の記録は残ります)", function () {
|
|
33
|
+
db_1.MinitestModel.deleteMiniTest(realm);
|
|
34
|
+
db_1.TestModel.deleteTest(realm);
|
|
35
|
+
db_1.BootModel.deleteBoot(realm);
|
|
36
|
+
db_1.BadgeModel.handleDeleteBadge(realm);
|
|
37
|
+
db_1.DailyLogModel.deleteAllDailyLogs(realm);
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
return (<react_native_1.View style={styles.container}>
|
|
43
|
+
{/* データ消去 */}
|
|
44
|
+
{settingInfo.map(function (info) { return (<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 }}/>); })}
|
|
45
|
+
{/* 音量調節 */}
|
|
46
|
+
<QuizOptionSelector_1.default type="soundVolume"/>
|
|
47
|
+
</react_native_1.View>);
|
|
48
|
+
};
|
|
49
|
+
var styles = react_native_1.StyleSheet.create({
|
|
50
|
+
container: {
|
|
51
|
+
flex: 1,
|
|
52
|
+
justifyContent: "center",
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
padding: 20,
|
|
55
|
+
},
|
|
56
|
+
text: {
|
|
57
|
+
fontSize: 20,
|
|
58
|
+
textAlign: "center",
|
|
59
|
+
margin: 10,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
exports.default = SettingPage;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StackNavigationProp } from "@react-navigation/stack";
|
|
3
|
+
import { Nav, Db } from "@nakamura-123/types";
|
|
4
|
+
interface TestPageProps {
|
|
5
|
+
navigation: StackNavigationProp<Nav.RootStackParamList>;
|
|
6
|
+
subject: Db.SubjectTestType;
|
|
7
|
+
}
|
|
8
|
+
declare const TestPage: React.FC<TestPageProps>;
|
|
9
|
+
export default TestPage;
|
|
@@ -0,0 +1,101 @@
|
|
|
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 react_i18next_1 = require("react-i18next");
|
|
10
|
+
var react_2 = require("@realm/react");
|
|
11
|
+
var common_1 = require("@nakamura-123/common");
|
|
12
|
+
var db_1 = require("@nakamura-123/db");
|
|
13
|
+
var Badge5s_1 = __importDefault(require("../component/Badge5s"));
|
|
14
|
+
var Square3s_1 = __importDefault(require("../component/TestPage/Square3s"));
|
|
15
|
+
var AverageBar_1 = __importDefault(require("../component/TestPage/AverageBar"));
|
|
16
|
+
var Paw5s_1 = __importDefault(require("../component/Paw5s"));
|
|
17
|
+
var testFnc_1 = require("../functions/testFnc");
|
|
18
|
+
var createQuizFnc_1 = require("../functions/createQuizFnc");
|
|
19
|
+
var QuizSaveData_1 = __importDefault(require("../quiz/save/QuizSaveData"));
|
|
20
|
+
var BarChartContainer_1 = __importDefault(require("../component/TestPage/BarChartContainer"));
|
|
21
|
+
var quizActionHook_1 = require("../hooks/quizActionHook");
|
|
22
|
+
var TestPage = react_1.default.memo(function (_a) {
|
|
23
|
+
var navigation = _a.navigation, subject = _a.subject;
|
|
24
|
+
var dispatch = (0, react_redux_1.useDispatch)();
|
|
25
|
+
var useStartQuiz = (0, quizActionHook_1.useStartQuizAction)();
|
|
26
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
|
27
|
+
var TestDB = (0, react_2.useQuery)(db_1.TestSchema);
|
|
28
|
+
var QuestionDB = (0, react_2.useQuery)(db_1.dQuestionSchema);
|
|
29
|
+
var isExistedSaveData = (0, react_redux_1.useSelector)(function (state) { return state.score.isSave[subject.name]; });
|
|
30
|
+
// // Reduxから必要なデータを一括取得
|
|
31
|
+
var quizCnt = subject.cnt;
|
|
32
|
+
var title = subject.title;
|
|
33
|
+
// アベレージバーのデータ生成
|
|
34
|
+
var average = (0, react_redux_1.useSelector)(function (state) { return state.score.test.average; });
|
|
35
|
+
var barLabel = "下記グラフ範囲の\n平均正答率";
|
|
36
|
+
// スタートボタンの設定
|
|
37
|
+
var cntByLevels = (0, testFnc_1.getTestLevelCnts)(TestDB, subject.name);
|
|
38
|
+
var handleStart = function () {
|
|
39
|
+
dispatch({
|
|
40
|
+
type: "quiz/setLesson",
|
|
41
|
+
payload: {
|
|
42
|
+
subject: subject.name,
|
|
43
|
+
type: "test",
|
|
44
|
+
category: quizCnt, //これはいらないけど入れておく
|
|
45
|
+
lesson: { title: title, key: quizCnt },
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
// クイズ作成
|
|
49
|
+
var quizList = (0, createQuizFnc_1.getTestQuestions)(QuestionDB, quizCnt);
|
|
50
|
+
var isExistQuiz = useStartQuiz(subject.name, quizList);
|
|
51
|
+
if (!isExistQuiz)
|
|
52
|
+
return;
|
|
53
|
+
navigation.navigate("Quiz");
|
|
54
|
+
};
|
|
55
|
+
// ヒストリーParams
|
|
56
|
+
var historyParams = {
|
|
57
|
+
subject: subject.name,
|
|
58
|
+
db: "test",
|
|
59
|
+
};
|
|
60
|
+
return (<react_native_1.SafeAreaView style={{ flex: 1 }}>
|
|
61
|
+
<react_native_1.ScrollView style={styles.container}>
|
|
62
|
+
<Badge5s_1.default badgeType="test" subject={subject.name} category={subject.cnt}/>
|
|
63
|
+
<Square3s_1.default subjectName={subject.name} TestDB={TestDB}/>
|
|
64
|
+
<AverageBar_1.default percent={average} label={barLabel}/>
|
|
65
|
+
<BarChartContainer_1.default subjectName={subject.name} TestDB={TestDB}/>
|
|
66
|
+
<react_native_1.View style={styles.test}>
|
|
67
|
+
<common_1.RectangleCard title={title} color="red" left={<common_1.IconInCircle name="clipboard" circleColor="ltRed" size={25}/>} bottom={<Paw5s_1.default levels={cntByLevels} quizCnt={quizCnt}/>} onPress={function () { return handleStart(); }}/>
|
|
68
|
+
</react_native_1.View>
|
|
69
|
+
<common_1.RoundRectangleIcon title={"過去の履歴を確認する"} onPress={function () {
|
|
70
|
+
return navigation.navigate("History", { info: historyParams });
|
|
71
|
+
}} icon="history"/>
|
|
72
|
+
|
|
73
|
+
<react_native_1.View style={{ height: 50 }}/>
|
|
74
|
+
{isExistedSaveData && <react_native_1.View style={{ height: 100 }}/>}
|
|
75
|
+
</react_native_1.ScrollView>
|
|
76
|
+
<react_native_1.View style={styles.fixedBottom}>
|
|
77
|
+
<QuizSaveData_1.default saveKey={subject.name} navigation={navigation}/>
|
|
78
|
+
</react_native_1.View>
|
|
79
|
+
</react_native_1.SafeAreaView>);
|
|
80
|
+
});
|
|
81
|
+
var styles = react_native_1.StyleSheet.create({
|
|
82
|
+
container: {
|
|
83
|
+
padding: 20,
|
|
84
|
+
marginTop: 20,
|
|
85
|
+
},
|
|
86
|
+
categoryName: {
|
|
87
|
+
marginTop: 10,
|
|
88
|
+
marginBottom: 10,
|
|
89
|
+
},
|
|
90
|
+
test: {},
|
|
91
|
+
fixedBottom: {
|
|
92
|
+
position: "absolute",
|
|
93
|
+
bottom: 0,
|
|
94
|
+
left: 0,
|
|
95
|
+
right: 0,
|
|
96
|
+
backgroundColor: "transparent",
|
|
97
|
+
paddingHorizontal: 15,
|
|
98
|
+
paddingBottom: 5,
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
exports.default = TestPage;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StackNavigationProp } from "@react-navigation/stack";
|
|
3
|
+
import { Nav, Db } from "@nakamura-123/types";
|
|
4
|
+
interface UnitPageProps {
|
|
5
|
+
navigation: StackNavigationProp<Nav.RootStackParamList>;
|
|
6
|
+
subjectName: Db.SubjectBasic;
|
|
7
|
+
}
|
|
8
|
+
declare const UnitPage: React.FC<UnitPageProps>;
|
|
9
|
+
export default UnitPage;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
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;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
var react_1 = __importStar(require("react"));
|
|
30
|
+
var react_native_1 = require("react-native");
|
|
31
|
+
var react_native_gesture_handler_1 = require("react-native-gesture-handler");
|
|
32
|
+
var react_redux_1 = require("react-redux");
|
|
33
|
+
var react_i18next_1 = require("react-i18next");
|
|
34
|
+
var common_1 = require("@nakamura-123/common");
|
|
35
|
+
var stores_1 = require("@nakamura-123/stores");
|
|
36
|
+
var setSelectedSubject = stores_1.setAction.setSelectedSubject, setMaxIndex = stores_1.setAction.setMaxIndex;
|
|
37
|
+
var Badge5s_1 = __importDefault(require("../component/Badge5s"));
|
|
38
|
+
var TagBadge5s_1 = __importDefault(require("../component/TagBadge5s"));
|
|
39
|
+
var SubCategoryList_1 = __importDefault(require("../component/SubCategoryList"));
|
|
40
|
+
var MiniTestCard_1 = __importDefault(require("../component/MiniTestCard"));
|
|
41
|
+
var TabContentsWrap_1 = __importDefault(require("../component/TabContentsWrap"));
|
|
42
|
+
var BasicSetting_1 = __importDefault(require("../component/BasicSetting"));
|
|
43
|
+
var QuizSaveData_1 = __importDefault(require("../quiz/save/QuizSaveData"));
|
|
44
|
+
var UnitPage = react_1.default.memo(function (_a) {
|
|
45
|
+
var _b;
|
|
46
|
+
var navigation = _a.navigation, subjectName = _a.subjectName;
|
|
47
|
+
var dispatch = (0, react_redux_1.useDispatch)();
|
|
48
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
|
49
|
+
// // Reduxから必要なデータを一括取得
|
|
50
|
+
var subjectType = (0, react_redux_1.useSelector)(function (state) { return state.app.appSetting.setting.basic[subjectName]; });
|
|
51
|
+
var categoryList = (0, react_redux_1.useSelector)(function (state) { return state.app[subjectName]; });
|
|
52
|
+
var activeIndex = (0, react_redux_1.useSelector)(function (state) { return state.setting.viewSet[subjectName].activeIndex; });
|
|
53
|
+
var existSaveData = (0, react_redux_1.useSelector)(function (state) { return state.score.isSave[subjectName]; });
|
|
54
|
+
var initScrollY = (0, react_redux_1.useSelector)(function (state) { return state.setting.viewSet[subjectName].scrollY; });
|
|
55
|
+
var scrollViewRef = (0, react_1.useRef)(null);
|
|
56
|
+
// 初期設定の処理を useEffect で実行
|
|
57
|
+
var _c = (0, react_1.useState)(false), isReady = _c[0], setIsReady = _c[1];
|
|
58
|
+
(0, react_1.useEffect)(function () {
|
|
59
|
+
if (scrollViewRef.current)
|
|
60
|
+
setIsReady(true); // 準備完了
|
|
61
|
+
}, [scrollViewRef.current]); // scrollViewRef.current の変更を監視
|
|
62
|
+
(0, react_1.useEffect)(function () {
|
|
63
|
+
var _a;
|
|
64
|
+
if (isReady) {
|
|
65
|
+
dispatch(setSelectedSubject(subjectName));
|
|
66
|
+
dispatch(setMaxIndex(categoryList.length));
|
|
67
|
+
(_a = scrollViewRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo({ y: initScrollY, animated: false });
|
|
68
|
+
}
|
|
69
|
+
}, [isReady]);
|
|
70
|
+
// ラベルを取得
|
|
71
|
+
var labels = categoryList.map(function (category) { var _a; return (_a = category.label) !== null && _a !== void 0 ? _a : category.title; });
|
|
72
|
+
// 選択されたカテゴリー情報を取得
|
|
73
|
+
var selectedList = categoryList[activeIndex];
|
|
74
|
+
// カテゴリー名を計算
|
|
75
|
+
var categoryName = "".concat((_b = selectedList.label) !== null && _b !== void 0 ? _b : "", " ").concat(selectedList.title).trim();
|
|
76
|
+
var selectKey = selectedList.key;
|
|
77
|
+
var categoryLabel = selectedList.label || selectedList.title;
|
|
78
|
+
// 全問スタートのハンドラー関数
|
|
79
|
+
var handleAllQuiz = function () {
|
|
80
|
+
var ALL_NUM = 0;
|
|
81
|
+
dispatch(stores_1.quizAction.setLesson({
|
|
82
|
+
subject: subjectName,
|
|
83
|
+
type: subjectType,
|
|
84
|
+
category: selectKey,
|
|
85
|
+
lesson: {
|
|
86
|
+
title: selectedList.label || selectedList.title,
|
|
87
|
+
key: ALL_NUM,
|
|
88
|
+
},
|
|
89
|
+
}));
|
|
90
|
+
navigation.navigate("QuizSetup");
|
|
91
|
+
};
|
|
92
|
+
var handleEndScroll = function (event) {
|
|
93
|
+
var scrollY = event.nativeEvent.contentOffset.y;
|
|
94
|
+
dispatch({ type: "setting/setScrollY", payload: scrollY });
|
|
95
|
+
};
|
|
96
|
+
return (<react_native_1.View style={{ flex: 1 }}>
|
|
97
|
+
<react_native_gesture_handler_1.ScrollView contentContainerStyle={styles.scrollContainer} ref={scrollViewRef} onMomentumScrollEnd={function (event) { return handleEndScroll(event); }}>
|
|
98
|
+
<common_1.TopTabs labels={labels} activeIndex={activeIndex}/>
|
|
99
|
+
<TabContentsWrap_1.default scrollViewRef={scrollViewRef}>
|
|
100
|
+
<common_1.RoundRectangle title={categoryName} style={styles.categoryName}/>
|
|
101
|
+
<SubCategoryList_1.default navigation={navigation} subjectName={subjectName}/>
|
|
102
|
+
|
|
103
|
+
<MiniTestCard_1.default navigation={navigation} subjectName={subjectName}/>
|
|
104
|
+
<common_1.HelpMark title={t("help.badge.title")} msg={t("help.badge.msg")} marginTop={10} top={-18}/>
|
|
105
|
+
<Badge5s_1.default badgeType="basic" category={selectKey}/>
|
|
106
|
+
<TagBadge5s_1.default subjectName={subjectName}/>
|
|
107
|
+
<common_1.HelpMark title={t("help.quizOption.allQuiz.title")} msg={t("help.quizOption.allQuiz.msg")} top={7}/>
|
|
108
|
+
<common_1.RoundRectangleIcon title={categoryLabel + "全問を演習する"} icon="pencil-alt" onPress={handleAllQuiz}/>
|
|
109
|
+
</TabContentsWrap_1.default>
|
|
110
|
+
<BasicSetting_1.default navigation={navigation} subjectType={subjectType}/>
|
|
111
|
+
{existSaveData && <react_native_1.View style={{ height: 60 }}/>}
|
|
112
|
+
</react_native_gesture_handler_1.ScrollView>
|
|
113
|
+
<QuizSaveData_1.default navigation={navigation} saveKey={subjectName}/>
|
|
114
|
+
</react_native_1.View>);
|
|
115
|
+
});
|
|
116
|
+
var styles = react_native_1.StyleSheet.create({
|
|
117
|
+
scrollContainer: {
|
|
118
|
+
justifyContent: "center",
|
|
119
|
+
alignItems: "center",
|
|
120
|
+
padding: 20,
|
|
121
|
+
},
|
|
122
|
+
categoryName: {
|
|
123
|
+
marginTop: 10,
|
|
124
|
+
marginBottom: 10,
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
exports.default = UnitPage;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleBeforeRemove = void 0;
|
|
4
|
+
var react_native_1 = require("react-native");
|
|
5
|
+
var handleBeforeRemove = function (navigation) {
|
|
6
|
+
return navigation.addListener("beforeRemove", function (e) {
|
|
7
|
+
// e.data.action.typeが "GO_BACK" の場合のみ警告を表示
|
|
8
|
+
console.log(e.data.action.type, "e.data.action.type");
|
|
9
|
+
if (e.data.action.type === "POP") {
|
|
10
|
+
e.preventDefault(); // デフォルトの戻る動作をキャンセル
|
|
11
|
+
react_native_1.Alert.alert("確認", "学習を保存して中断しますか?", [
|
|
12
|
+
{ text: "キャンセル", style: "cancel" },
|
|
13
|
+
{
|
|
14
|
+
text: "保存せずに中断",
|
|
15
|
+
onPress: function () { return navigation.dispatch(e.data.action); },
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
text: "保存して中断",
|
|
19
|
+
onPress: function () {
|
|
20
|
+
// 保存処理
|
|
21
|
+
console.log("保存");
|
|
22
|
+
// 遷移を実行
|
|
23
|
+
navigation.dispatch(e.data.action);
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
exports.handleBeforeRemove = handleBeforeRemove;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StackNavigationProp } from "@react-navigation/stack";
|
|
3
|
+
import { Nav } from "@nakamura-123/types";
|
|
4
|
+
interface ImageDisplayProps {
|
|
5
|
+
navigation: StackNavigationProp<Nav.RootStackParamList>;
|
|
6
|
+
path?: number;
|
|
7
|
+
}
|
|
8
|
+
declare const ImageDisplay: React.FC<ImageDisplayProps>;
|
|
9
|
+
export default ImageDisplay;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
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;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
var react_1 = __importStar(require("react"));
|
|
27
|
+
var react_native_1 = require("react-native");
|
|
28
|
+
var MAX_HEIGHT = 300; // 最大高さ
|
|
29
|
+
var ImageDisplay = function (_a) {
|
|
30
|
+
var path = _a.path, navigation = _a.navigation;
|
|
31
|
+
var _b = (0, react_1.useState)(0), containerWidth = _b[0], setContainerWidth = _b[1];
|
|
32
|
+
// コンテナの幅を取得
|
|
33
|
+
var handleLayout = function (event) {
|
|
34
|
+
var width = event.nativeEvent.layout.width;
|
|
35
|
+
setContainerWidth(width); // 幅を状態に保存
|
|
36
|
+
};
|
|
37
|
+
if (!path)
|
|
38
|
+
return null;
|
|
39
|
+
return (<react_native_1.TouchableOpacity onPress={function () { return navigation.navigate("ImgZoom", { path: path }); }}>
|
|
40
|
+
<react_native_1.View style={styles.container} onLayout={handleLayout}>
|
|
41
|
+
{containerWidth > 0 && (<react_native_1.Image source={path} style={[
|
|
42
|
+
styles.image,
|
|
43
|
+
{ maxWidth: containerWidth }, // コンテナの幅を maxWidth として設定
|
|
44
|
+
]} resizeMode="contain"/>)}
|
|
45
|
+
</react_native_1.View>
|
|
46
|
+
</react_native_1.TouchableOpacity>);
|
|
47
|
+
};
|
|
48
|
+
var styles = react_native_1.StyleSheet.create({
|
|
49
|
+
container: {
|
|
50
|
+
justifyContent: "center",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
maxHeight: MAX_HEIGHT,
|
|
53
|
+
},
|
|
54
|
+
image: {
|
|
55
|
+
margin: 5,
|
|
56
|
+
// borderRadius: 8,
|
|
57
|
+
// backgroundColor: "#E0E0E0",
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
exports.default = ImageDisplay;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TextStyle } from "react-native";
|
|
3
|
+
interface MyTextqqyyProps {
|
|
4
|
+
children: string;
|
|
5
|
+
style?: TextStyle;
|
|
6
|
+
isNotSearch?: boolean;
|
|
7
|
+
selectable?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const MyTextqqyy: React.FC<MyTextqqyyProps>;
|
|
10
|
+
export default MyTextqqyy;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var react_native_1 = require("react-native");
|
|
19
|
+
var react_redux_1 = require("react-redux");
|
|
20
|
+
var MathView = require("react-native-math-view").default;
|
|
21
|
+
var common_1 = require("@nakamura-123/common");
|
|
22
|
+
var lib_1 = require("@nakamura-123/lib");
|
|
23
|
+
var MyTextqqyy = function (_a) {
|
|
24
|
+
var children = _a.children, style = _a.style, isNotSearch = _a.isNotSearch, selectable = _a.selectable;
|
|
25
|
+
var fsize = (0, react_redux_1.useSelector)(function (state) { return state.quizCfg.option.fsize; });
|
|
26
|
+
var parsedText = parseText(children, isNotSearch !== null && isNotSearch !== void 0 ? isNotSearch : false);
|
|
27
|
+
return (<common_1.MyText style={__assign(__assign({}, styles.p), style)} selectable={selectable}>
|
|
28
|
+
{parsedText.map(function (item) {
|
|
29
|
+
return renderText(item, function (word) { return lib_1.utilFnc.handleSearch(word); }, fsize);
|
|
30
|
+
})}
|
|
31
|
+
</common_1.MyText>);
|
|
32
|
+
};
|
|
33
|
+
exports.default = MyTextqqyy;
|
|
34
|
+
// 01_まず、文章をqqとyyで分割する関数を作成します。
|
|
35
|
+
var parseText = function (text, isNotSearch) {
|
|
36
|
+
var parts = text.split(/(qq.*?qq|yy.*?yy)/g);
|
|
37
|
+
return parts.map(function (chunk, index) {
|
|
38
|
+
if (chunk.startsWith("qq") && chunk.endsWith("qq")) {
|
|
39
|
+
return { type: "math", content: chunk.slice(2, -2), key: index };
|
|
40
|
+
}
|
|
41
|
+
else if (chunk.startsWith("yy") && chunk.endsWith("yy")) {
|
|
42
|
+
if (isNotSearch) {
|
|
43
|
+
// `isNotSearch` が true の場合は `text` として扱う
|
|
44
|
+
return { type: "text", content: chunk.slice(2, -2), key: index };
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
// 通常は `search` として扱う
|
|
48
|
+
return { type: "search", content: chunk.slice(2, -2), key: index };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
return { type: "text", content: chunk, key: index };
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
// 02_次に、それぞれの部分を適切なコンポーネントに変換する関数を作成します。
|
|
57
|
+
var renderText = function (item, onSearch, fsize) {
|
|
58
|
+
if (item.type === "math") {
|
|
59
|
+
return <MathView math={item.content} key={item.key}/>;
|
|
60
|
+
}
|
|
61
|
+
if (item.type === "search") {
|
|
62
|
+
return (<common_1.MyText key={item.key} style={styles.searchText} onPress={function () { return onSearch(item.content || ""); }} fsize={fsize}>
|
|
63
|
+
{item.content}
|
|
64
|
+
</common_1.MyText>);
|
|
65
|
+
}
|
|
66
|
+
return (<common_1.MyText key={item.key} fsize={fsize}>
|
|
67
|
+
{item.content}
|
|
68
|
+
</common_1.MyText>);
|
|
69
|
+
};
|
|
70
|
+
var styles = react_native_1.StyleSheet.create({
|
|
71
|
+
p: {
|
|
72
|
+
marginVertical: 8,
|
|
73
|
+
marginHorizontal: 5,
|
|
74
|
+
},
|
|
75
|
+
searchText: {
|
|
76
|
+
color: lib_1.colors.blue,
|
|
77
|
+
textDecorationLine: "underline",
|
|
78
|
+
textDecorationColor: lib_1.colors.blue,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
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 lib_1 = require("@nakamura-123/lib");
|
|
10
|
+
var common_1 = require("@nakamura-123/common");
|
|
11
|
+
var Question = function () {
|
|
12
|
+
var _a;
|
|
13
|
+
var turn = (0, react_redux_1.useSelector)(function (state) { return state.quiz.currentInfo.state.turn; });
|
|
14
|
+
var allQuizCnt = (0, react_redux_1.useSelector)(function (state) { return state.quiz.quizList.length; });
|
|
15
|
+
var question = (0, react_redux_1.useSelector)(function (state) { return state.quiz.quizList[turn]; });
|
|
16
|
+
var title = question.title;
|
|
17
|
+
var cntText = "".concat(turn + 1, " / ").concat(allQuizCnt, "\u554F\u76EE");
|
|
18
|
+
var tagColor = ((_a = lib_1.tagLevels.find(function (tag) { return tag.level === question.level; })) === null || _a === void 0 ? void 0 : _a.color) || "ltBlack";
|
|
19
|
+
return (<react_native_1.View style={styles.container}>
|
|
20
|
+
<common_1.MyText fsize="sm" style={styles.cntText}>
|
|
21
|
+
{cntText}
|
|
22
|
+
</common_1.MyText>
|
|
23
|
+
</react_native_1.View>);
|
|
24
|
+
};
|
|
25
|
+
var styles = react_native_1.StyleSheet.create({
|
|
26
|
+
container: {
|
|
27
|
+
flexDirection: "row",
|
|
28
|
+
justifyContent: "center",
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
backgroundColor: "#F5F5F5",
|
|
31
|
+
paddingHorizontal: 10,
|
|
32
|
+
paddingVertical: 5,
|
|
33
|
+
borderRadius: 15,
|
|
34
|
+
},
|
|
35
|
+
title: {
|
|
36
|
+
marginLeft: 10,
|
|
37
|
+
marginRight: 15,
|
|
38
|
+
},
|
|
39
|
+
cntText: {
|
|
40
|
+
color: "gray", // cntTextの色
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
exports.default = Question;
|