@nakamura-123/pages 0.1.21 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/component/Basic/BasicContents.js +3 -1
  2. package/dist/component/Basic/MiniTestCard.js +11 -3
  3. package/dist/component/Basic/SelectedExamCnt.js +3 -0
  4. package/dist/component/Basic/SubCategoryList.d.ts +1 -1
  5. package/dist/component/Basic/SubCategoryList.js +28 -19
  6. package/dist/component/Grade/AllTags.d.ts +2 -2
  7. package/dist/component/Grade/AllTags.js +2 -2
  8. package/dist/component/Grade/JAllTags.d.ts +5 -0
  9. package/dist/component/Grade/JAllTags.js +45 -0
  10. package/dist/component/QuizSet/QuizOptionDrill.d.ts +2 -2
  11. package/dist/component/QuizSet/QuizOptionDrill.js +9 -5
  12. package/dist/component/Result/QuizFlatList.js +20 -7
  13. package/dist/component/SettingBtns/TransBtn.d.ts +4 -0
  14. package/dist/component/SettingBtns/TransBtn.js +119 -0
  15. package/dist/component/SubCagegoryList.js +182 -95
  16. package/dist/component/Tag5s.js +2 -2
  17. package/dist/component/TagBadge5s.js +14 -33
  18. package/dist/component/TagBadge5sPress.js +2 -2
  19. package/dist/functions/commonFilter.d.ts +0 -0
  20. package/dist/functions/commonFilter.js +12 -0
  21. package/dist/functions/createQuizFnc.d.ts +6 -13
  22. package/dist/functions/createQuizFnc.js +18 -18
  23. package/dist/functions/createQuizFncD.d.ts +18 -0
  24. package/dist/functions/createQuizFncD.js +80 -0
  25. package/dist/functions/createQuizFncJ.d.ts +9 -0
  26. package/dist/functions/createQuizFncJ.js +63 -0
  27. package/dist/functions/gradeFnc.js +1 -1
  28. package/dist/functions/questionFilter.d.ts +1 -3
  29. package/dist/functions/questionFilterD.d.ts +14 -0
  30. package/dist/functions/questionFilterD.js +79 -0
  31. package/dist/functions/questionFilterJ.d.ts +10 -0
  32. package/dist/functions/questionFilterJ.js +36 -0
  33. package/dist/functions/questionFilterJLPT.d.ts +5 -0
  34. package/dist/functions/questionFilterJLPT.js +17 -0
  35. package/dist/functions/questionFormat copy.d.ts +7 -0
  36. package/dist/functions/questionFormat copy.js +103 -0
  37. package/dist/functions/questionFormat.d.ts +2 -2
  38. package/dist/functions/questionFormatD.d.ts +7 -0
  39. package/dist/functions/questionFormatD.js +104 -0
  40. package/dist/functions/questionFormatJ.d.ts +8 -0
  41. package/dist/functions/questionFormatJ.js +95 -0
  42. package/dist/functions/tagFnc.js +14 -14
  43. package/dist/functions/tagFncD.d.ts +18 -0
  44. package/dist/functions/tagFncD.js +114 -0
  45. package/dist/functions/tagFncJ.d.ts +7 -0
  46. package/dist/functions/tagFncJ.js +44 -0
  47. package/dist/functions/tagFncJLPT.d.ts +5 -0
  48. package/dist/functions/tagFncJLPT.js +18 -0
  49. package/dist/hooks/basicHook.d.ts +3 -0
  50. package/dist/hooks/basicHook.js +20 -1
  51. package/dist/hooks/quizActionHook.d.ts +3 -3
  52. package/dist/hooks/quizActionHook.js +22 -5
  53. package/dist/hooks/quizHook.d.ts +9 -2
  54. package/dist/hooks/quizHook.js +51 -5
  55. package/dist/index.d.ts +4 -1
  56. package/dist/index.js +7 -1
  57. package/dist/page/BootPage.js +6 -6
  58. package/dist/page/DatailSettingPage.d.ts +3 -0
  59. package/dist/page/DatailSettingPage.js +25 -0
  60. package/dist/page/GetBadgePage.js +1 -1
  61. package/dist/page/GradePage.js +5 -2
  62. package/dist/page/GuidePage.d.ts +10 -0
  63. package/dist/page/GuidePage.js +112 -0
  64. package/dist/page/JDatailSettingPage.d.ts +3 -0
  65. package/dist/page/JDatailSettingPage.js +25 -0
  66. package/dist/page/JDetailSettingPage.d.ts +3 -0
  67. package/dist/page/JDetailSettingPage.js +51 -0
  68. package/dist/page/QuizPage.js +15 -69
  69. package/dist/page/QuizSetupPage.js +20 -8
  70. package/dist/page/ReportPage.js +1 -1
  71. package/dist/page/TestPage.js +15 -5
  72. package/dist/quiz/QuizContentDrill.d.ts +15 -0
  73. package/dist/quiz/QuizContentDrill.js +34 -0
  74. package/dist/quiz/QuizContentsDrill.d.ts +16 -0
  75. package/dist/quiz/QuizContentsDrill.js +70 -0
  76. package/dist/quiz/QuizContentsJLPT.d.ts +16 -0
  77. package/dist/quiz/QuizContentsJLPT.js +31 -0
  78. package/dist/quiz/Title.js +3 -1
  79. package/dist/quiz/answer/Answer.js +7 -6
  80. package/dist/quiz/answer/BlankBtn.js +7 -2
  81. package/dist/quiz/answer/Input/InputAnswerBtn.js +1 -1
  82. package/dist/quiz/answer/MultiChoice.js +2 -0
  83. package/dist/quiz/answer/NormalChoice.js +1 -1
  84. package/dist/quiz/check/NextQuizBtn.js +1 -0
  85. package/dist/quiz/check/SelectTag.js +21 -5
  86. package/dist/quiz/common/MyTextqqyy.js +1 -2
  87. package/dist/quiz/common/PageContainerWrap.d.ts +1 -1
  88. package/dist/quiz/common/RenderImgOrText.d.ts +4 -4
  89. package/dist/quiz/common/RenderImgOrText.js +7 -3
  90. package/dist/quiz/common/RubyText.d.ts +6 -1
  91. package/dist/quiz/common/RubyText.js +58 -39
  92. package/dist/quiz/common/ZoomableImage.d.ts +1 -0
  93. package/dist/quiz/common/ZoomableImage.js +2 -2
  94. package/dist/quiz/explain/Explain.js +4 -2
  95. package/dist/quiz/jAnswer/JAnswer.d.ts +8 -0
  96. package/dist/quiz/jAnswer/JAnswer.js +57 -0
  97. package/dist/quiz/jAnswer/JAnswerContents.d.ts +16 -0
  98. package/dist/quiz/jAnswer/JAnswerContents.js +82 -0
  99. package/dist/quiz/jQuestion/JQuestion.d.ts +8 -0
  100. package/dist/quiz/jQuestion/JQuestion.js +41 -0
  101. package/dist/quiz/jQuestion/JQuestionBottomText.d.ts +7 -0
  102. package/dist/quiz/jQuestion/JQuestionBottomText.js +46 -0
  103. package/dist/quiz/jQuestion/JQuestionText.d.ts +7 -0
  104. package/dist/quiz/jQuestion/JQuestionText.js +43 -0
  105. package/dist/quiz/jQuestion/QuizCnt.d.ts +3 -0
  106. package/dist/quiz/jQuestion/QuizCnt.js +44 -0
  107. package/dist/quiz/jQuestion/TimeLimit.d.ts +6 -0
  108. package/dist/quiz/jQuestion/TimeLimit.js +97 -0
  109. package/dist/quiz/question/Question.js +3 -1
  110. package/dist/quiz/setting/Above3BtnJ copy.d.ts +8 -0
  111. package/dist/quiz/setting/Above3BtnJ copy.js +78 -0
  112. package/dist/quiz/setting/Above3BtnJ.d.ts +8 -0
  113. package/dist/quiz/setting/Above3BtnJ.js +56 -0
  114. package/dist/quiz/setting/Bottom2BtnJ.d.ts +8 -0
  115. package/dist/quiz/setting/Bottom2BtnJ.js +86 -0
  116. package/dist/quiz/setting/Bottom3Btn.js +1 -23
  117. package/dist/quiz/setting/Bottom3BtnJ.d.ts +8 -0
  118. package/dist/quiz/setting/Bottom3BtnJ.js +78 -0
  119. package/dist/quiz/setting/GuideBtn.d.ts +8 -0
  120. package/dist/quiz/setting/GuideBtn.js +38 -0
  121. package/dist/quiz/setting/RepeatBtn.d.ts +6 -0
  122. package/dist/quiz/setting/RepeatBtn.js +77 -0
  123. package/dist/quiz/system/QuizContentDrill.d.ts +0 -0
  124. package/dist/quiz/system/QuizContentDrill.js +1 -0
  125. package/dist/tsconfig.tsbuildinfo +1 -1
  126. package/dist/types/filterType.d.ts +15 -0
  127. package/dist/types/filterType.js +2 -0
  128. package/package.json +2 -2
@@ -37,11 +37,15 @@ var common_1 = require("@nakamura-123/common");
37
37
  var QuizCntGraph_1 = __importDefault(require("../component/Grade/QuizCntGraph"));
38
38
  var gradeFnc_1 = require("../functions/gradeFnc");
39
39
  var react_i18next_1 = require("react-i18next");
40
+ var react_redux_1 = require("react-redux");
41
+ var JAllTags_1 = __importDefault(require("../component/Grade/JAllTags"));
40
42
  var GradePage = function (_a) {
41
43
  var navigation = _a.navigation;
42
44
  var t = (0, react_i18next_1.useTranslation)().t;
43
45
  var realm = (0, react_2.useRealm)();
44
46
  var DailyLogDB = (0, react_2.useQuery)(db_1.DailyLogSchema);
47
+ var appSystem = (0, react_redux_1.useSelector)(function (state) { return state.app.appSetting.setting.appSystem; }) ||
48
+ "drill";
45
49
  var totalCnt = (0, gradeFnc_1.getTotalQuizCnt)(DailyLogDB);
46
50
  // レビューをリクエスト可能か確認
47
51
  (0, react_1.useEffect)(function () {
@@ -52,9 +56,8 @@ var GradePage = function (_a) {
52
56
  <GradeCard_1.default DailyLogDB={DailyLogDB}/>
53
57
  <QuizCntGraph_1.default DailyLogDB={DailyLogDB}/>
54
58
  <Square4s_1.default DailyLogDB={DailyLogDB}/>
55
- <AllTags_1.default />
59
+ {appSystem === "JLPT" ? <JAllTags_1.default /> : <AllTags_1.default />}
56
60
  <common_1.RoundRectangleIcon title={t("grade.allBadges")} onPress={function () { return navigation.navigate("Badge"); }} icon="shield-alt"/>
57
- {/* <StoreReview /> */}
58
61
  </react_native_1.ScrollView>);
59
62
  };
60
63
  var styles = react_native_1.StyleSheet.create({
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ interface Props {
3
+ route: {
4
+ params: {
5
+ quizId: string;
6
+ };
7
+ };
8
+ }
9
+ declare const GuidePage: React.FC<Props>;
10
+ export default GuidePage;
@@ -0,0 +1,112 @@
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 common_1 = require("@nakamura-123/common");
30
+ var db_1 = require("@nakamura-123/db");
31
+ var react_1 = require("@realm/react");
32
+ var react_2 = __importStar(require("react"));
33
+ var react_native_1 = require("react-native");
34
+ var RubyText_1 = __importDefault(require("../quiz/common/RubyText"));
35
+ var lib_1 = require("@nakamura-123/lib");
36
+ var react_redux_1 = require("react-redux");
37
+ var quizHook_1 = require("../hooks/quizHook");
38
+ var GuidePage = function (_a) {
39
+ var route = _a.route;
40
+ var quizId = route.params.quizId;
41
+ var qImgs = (0, react_redux_1.useSelector)(function (state) { return state.app.imgs.qImgs; });
42
+ var QuestionDB = (0, react_1.useQuery)(db_1.JQuestionSchema);
43
+ var question = QuestionDB.filtered("quizId == $0", quizId)[0];
44
+ if (!question)
45
+ return null;
46
+ if (!quizId)
47
+ return null;
48
+ var wordVoice = (0, quizHook_1.useGetVoicePath)(quizId, "word");
49
+ var sentenceVoice = (0, quizHook_1.useGetVoicePath)(quizId, "sentence");
50
+ (0, react_2.useEffect)(function () {
51
+ // 音声のプリロード・初回再生
52
+ if (!wordVoice || !sentenceVoice || !quizId)
53
+ return;
54
+ lib_1.voiceFnc.preloadVoiceById(wordVoice, false);
55
+ lib_1.voiceFnc.preloadVoiceById(sentenceVoice, false);
56
+ return function () {
57
+ // voiceFnc.unloadVoiceById(wordVoice);
58
+ // voiceFnc.unloadVoiceById(sentenceVoice);
59
+ };
60
+ }, [quizId, wordVoice]);
61
+ // 画像のパスを取得
62
+ var path = lib_1.utilFnc.getImgPathFromWord(qImgs, null, question.quizId);
63
+ var handleSearch = function (word) {
64
+ if (!word)
65
+ return;
66
+ var words = lib_1.utilFnc.parseRubyText(word);
67
+ var removeRuby = lib_1.utilFnc.removeRuby(words);
68
+ lib_1.utilFnc.handleSearchTrans(removeRuby);
69
+ };
70
+ return (<react_native_1.View style={styles.container}>
71
+ <react_native_1.View style={styles.wordBox}>
72
+ <RubyText_1.default fsize="xxl">{question.jpWord}</RubyText_1.default>
73
+ <common_1.MyText style={styles.enText}>{question.enWord}</common_1.MyText>
74
+ <react_native_1.View style={styles.iconBox}>
75
+ <common_1.IconInCircle name="volume-up" size={20} onPress={function () { return wordVoice && lib_1.voiceFnc.playVoice(wordVoice, 1); }}/>
76
+ <common_1.IconInCircle name="search" size={20} cStyle={{ marginLeft: 10 }} onPress={function () { return handleSearch(question.jpWord); }}/>
77
+ </react_native_1.View>
78
+ </react_native_1.View>
79
+ <react_native_1.View style={styles.wordBox}>
80
+ <RubyText_1.default fsize="lg">{question.jpSentence}</RubyText_1.default>
81
+ <common_1.MyText style={styles.enText}>{question.enSentence}</common_1.MyText>
82
+ <react_native_1.View style={styles.iconBox}>
83
+ <common_1.IconInCircle name="volume-up" size={20} onPress={function () {
84
+ return sentenceVoice && lib_1.voiceFnc.playVoice(sentenceVoice, 1);
85
+ }}/>
86
+ <common_1.IconInCircle name="search" size={20} cStyle={{ marginLeft: 10 }} onPress={function () { return handleSearch(question.jpSentence); }}/>
87
+ </react_native_1.View>
88
+ </react_native_1.View>
89
+ <common_1.MyImage path={path}/>
90
+ </react_native_1.View>);
91
+ };
92
+ var styles = react_native_1.StyleSheet.create({
93
+ container: {
94
+ flex: 1,
95
+ marginTop: 70,
96
+ marginHorizontal: 20,
97
+ },
98
+ wordBox: {
99
+ justifyContent: "space-between",
100
+ marginBottom: 20,
101
+ },
102
+ iconBox: {
103
+ flexDirection: "row",
104
+ // justifyContent: "flex-end",
105
+ alignItems: "center",
106
+ },
107
+ enText: {
108
+ marginBottom: 5,
109
+ // marginLeft: 5,
110
+ },
111
+ });
112
+ exports.default = GuidePage;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const JDetailSettingPage: React.FC;
3
+ export default JDetailSettingPage;
@@ -0,0 +1,25 @@
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 JDetailSettingPage = function () {
9
+ return (<react_native_1.View style={styles.container}>
10
+ <react_native_1.Text style={styles.text}>Detail Setting Page</react_native_1.Text>
11
+ </react_native_1.View>);
12
+ };
13
+ var styles = react_native_1.StyleSheet.create({
14
+ container: {
15
+ flex: 1,
16
+ justifyContent: "center",
17
+ alignItems: "center",
18
+ backgroundColor: "#f5f5f5",
19
+ },
20
+ text: {
21
+ fontSize: 18,
22
+ color: "#333",
23
+ },
24
+ });
25
+ exports.default = JDetailSettingPage;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const JDetailSettingPage: React.FC;
3
+ export default JDetailSettingPage;
@@ -0,0 +1,51 @@
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 lib_1 = require("@nakamura-123/lib");
8
+ var stores_1 = require("@nakamura-123/stores");
9
+ var react_1 = __importDefault(require("react"));
10
+ var react_i18next_1 = require("react-i18next");
11
+ var react_native_1 = require("react-native");
12
+ var react_redux_1 = require("react-redux");
13
+ var react_redux_2 = require("react-redux");
14
+ var JDetailSettingPage = function () {
15
+ var t = (0, react_i18next_1.useTranslation)().t;
16
+ var quizOption = lib_1.startOption.jQuizStartOptionDetail;
17
+ var dispatch = (0, react_redux_2.useDispatch)();
18
+ var selected = (0, react_redux_1.useSelector)(function (state) { return state.quiz.selected; });
19
+ var system = selected.system || "drill";
20
+ var storeOption = (0, react_redux_1.useSelector)(function (state) { return state.quizCfg.startCfg.option; });
21
+ var handleSelect = function (type, value) {
22
+ dispatch(stores_1.cfgAction.selectOption({ key: type, value: value }));
23
+ };
24
+ return (<react_native_1.View style={styles.container}>
25
+ {quizOption.map(function (O, i) {
26
+ var type = O.type, options = O.options;
27
+ var selectedValue = storeOption[type];
28
+ var selectedIndex = options.findIndex(function (o) { return o.value === selectedValue; });
29
+ return (<react_native_1.View key={type} style={styles.selectContainer}>
30
+ <common_1.MyText color="text" fsize="sm" style={styles.title}>
31
+ {t("setup.detail.".concat(type))}
32
+ </common_1.MyText>
33
+ <common_1.OptionSelector key={i} options={options.map(function (o) { return o.label; })} selected={selectedIndex} onSelect={function (childI) { return handleSelect(type, options[childI].value); }}/>
34
+ </react_native_1.View>);
35
+ })}
36
+ </react_native_1.View>);
37
+ };
38
+ var styles = react_native_1.StyleSheet.create({
39
+ container: {
40
+ // flex: 1,
41
+ marginTop: 30,
42
+ paddingHorizontal: 10,
43
+ },
44
+ selectContainer: {
45
+ marginTop: 20,
46
+ },
47
+ title: {
48
+ marginLeft: 5,
49
+ },
50
+ });
51
+ exports.default = JDetailSettingPage;
@@ -1,52 +1,19 @@
1
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
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
- var react_1 = __importStar(require("react"));
6
+ var react_1 = __importDefault(require("react"));
30
7
  var react_native_1 = require("react-native");
31
- var react_native_gesture_handler_1 = require("react-native-gesture-handler");
32
8
  var react_redux_1 = require("react-redux");
33
- var Title_1 = __importDefault(require("../quiz/Title"));
34
- var Question_1 = __importDefault(require("../quiz/question/Question"));
35
- var Answer_1 = __importDefault(require("../quiz/answer/Answer"));
36
- var CorrectedBar_1 = __importDefault(require("../quiz/explain/CorrectedBar"));
37
- var Explain_1 = __importDefault(require("../quiz/explain/Explain"));
38
9
  var Check_1 = __importDefault(require("../quiz/check/Check"));
39
- var PageContainerWrap_1 = __importDefault(require("../quiz/common/PageContainerWrap"));
40
- var Bottom3Btn_1 = __importDefault(require("../quiz/setting/Bottom3Btn"));
41
10
  var quizHook_1 = require("../hooks/quizHook");
42
11
  var ExitQuizHook_1 = require("../hooks/ExitQuizHook");
43
- var CollapseExplain_1 = __importDefault(require("../quiz/answer/Input/CollapseExplain"));
44
12
  var Guide_1 = __importDefault(require("../component/Guide"));
45
- var common_1 = require("@nakamura-123/common");
13
+ var QuizContentsDrill_1 = __importDefault(require("../quiz/QuizContentsDrill"));
46
14
  var QuizPage = function (_a) {
47
15
  var navigation = _a.navigation;
48
16
  // スワイプの動作処理
49
- var scrollRef = (0, react_1.useRef)(null);
50
17
  var mode = (0, quizHook_1.useGetMode)();
51
18
  var isCheck = mode === "check";
52
19
  var isNotQuiz = mode !== "quiz";
@@ -64,28 +31,20 @@ var QuizPage = function (_a) {
64
31
  var guideName = turn === 1 ? "quizPageSwipe1" : "quizPageSwipe2";
65
32
  // クイズ終了確認フック
66
33
  (0, ExitQuizHook_1.useConfirmExit)(navigation);
67
- // ターン変更時にスクロール位置をリセット
68
- (0, react_1.useEffect)(function () {
69
- var _a;
70
- (_a = scrollRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo({ y: 0, animated: true });
71
- }, [turn]);
72
34
  return (<react_native_1.View style={styles.wrapper}>
73
- <react_native_gesture_handler_1.ScrollView contentContainerStyle={styles.container} ref={scrollRef} showsVerticalScrollIndicator={false}>
74
- <PageContainerWrap_1.default scrollViewRef={scrollRef} navigation={navigation}>
75
- <Title_1.default />
76
- <Guide_1.default name={guideName} isVisible={showSwipe1Guide || showSwipe2Guide}>
77
- <react_native_1.View></react_native_1.View>
78
- </Guide_1.default>
79
- <Question_1.default navigation={navigation}/>
80
- <Answer_1.default />
81
- {isCheck && !isResult && isNotInput && <CorrectedBar_1.default />}
82
- {isNotQuiz && <Explain_1.default navigation={navigation}/>}
83
- {isInputQuizMode && <CollapseExplain_1.default navigation={navigation}/>}
84
- <common_1.HelpMark name="quizSwipe" top={0} right={10}/>
85
- <Bottom3Btn_1.default navigation={navigation}/>
86
- <react_native_1.View style={{ height: 70 }}/>
87
- </PageContainerWrap_1.default>
88
- </react_native_gesture_handler_1.ScrollView>
35
+ {/* <QuizContentsJLPT
36
+ navigation={navigation}
37
+ guideName={guideName}
38
+ showSwipe1Guide={showSwipe1Guide}
39
+ showSwipe2Guide={showSwipe2Guide}
40
+ isCheck={isCheck}
41
+ isResult={isResult}
42
+ isNotInput={isNotInput}
43
+ isNotQuiz={isNotQuiz}
44
+ isInputQuizMode={isInputQuizMode}
45
+ turn={turn}
46
+ /> */}
47
+ <QuizContentsDrill_1.default navigation={navigation} guideName={guideName} showSwipe1Guide={showSwipe1Guide} showSwipe2Guide={showSwipe2Guide} isCheck={isCheck} isResult={isResult} isNotInput={isNotInput} isNotQuiz={isNotQuiz} isInputQuizMode={isInputQuizMode} turn={turn}/>
89
48
  {/* 下に固定しておくボタンを設置 */}
90
49
  {isNotQuiz && (<react_native_1.View style={styles.fixedBottom}>
91
50
  <Guide_1.default name="quizPageTag" isVisible={showTagGuide}>
@@ -97,19 +56,6 @@ var QuizPage = function (_a) {
97
56
  var styles = react_native_1.StyleSheet.create({
98
57
  wrapper: {
99
58
  flex: 1,
100
- // paddingHorizontal: 20,
101
- // marginTop: 20,
102
- // marginBottom: 60,
103
- },
104
- container: {
105
- paddingTop: 20,
106
- // paddingBottom: 60,
107
- },
108
- btnBox: {
109
- flexDirection: "row",
110
- justifyContent: "space-around",
111
- alignItems: "center",
112
- paddingVertical: 5,
113
59
  },
114
60
  fixedBottom: {
115
61
  position: "absolute",
@@ -5,21 +5,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var react_1 = __importDefault(require("react"));
7
7
  var react_native_1 = require("react-native");
8
- var react_2 = require("@realm/react");
9
8
  var react_native_gesture_handler_1 = require("react-native-gesture-handler");
10
9
  var react_redux_1 = require("react-redux");
11
10
  var common_1 = require("@nakamura-123/common");
12
- var db_1 = require("@nakamura-123/db");
13
11
  var stores_1 = require("@nakamura-123/stores");
14
12
  var saveBasicPreSelect = stores_1.setAction.saveBasicPreSelect;
15
13
  var toResult = stores_1.quizAction.toResult;
16
- var tagFnc_1 = require("../functions/tagFnc");
17
- var createQuizFnc_1 = require("../functions/createQuizFnc");
14
+ var tagFncD_1 = require("../functions/tagFncD");
15
+ var createQuizFncD_1 = require("../functions/createQuizFncD");
18
16
  var TagBadge5sPress_1 = __importDefault(require("../component/TagBadge5sPress"));
19
17
  var QuizOptionDrill_1 = __importDefault(require("../component/QuizSet/QuizOptionDrill"));
20
18
  var quizActionHook_1 = require("../hooks/quizActionHook");
21
19
  var Guide_1 = __importDefault(require("../component/Guide"));
22
20
  var react_i18next_1 = require("react-i18next");
21
+ var basicHook_1 = require("../hooks/basicHook");
22
+ var tagFncJ_1 = require("../functions/tagFncJ");
23
+ var createQuizFncJ_1 = require("../functions/createQuizFncJ");
23
24
  var QuizSetup = function (_a) {
24
25
  var navigation = _a.navigation;
25
26
  var dispatch = (0, react_redux_1.useDispatch)();
@@ -35,11 +36,19 @@ var QuizSetup = function (_a) {
35
36
  var outOfYearRange = startCfg.outOfYearRange;
36
37
  var quizTitle = lesson.title;
37
38
  // タグの選択
38
- var QuestionDB = (0, react_2.useQuery)(db_1.dQuestionSchema);
39
- var lessonTags = (0, tagFnc_1.getSubTagLevelCnts)(QuestionDB, selected, outOfYearRange);
39
+ // const QuestionDB = useQuery(DQuestionSchema);
40
+ var QuestionDBInfo = (0, basicHook_1.useGetQuestionQuery)();
41
+ var query = QuestionDBInfo.query, system = QuestionDBInfo.system;
42
+ // ==========ここの修正から ===============
43
+ // これよく見ると違うな
44
+ var lessonTags = system === "JLPT"
45
+ ? (0, tagFncJ_1.getSubTagLevelCntsJ)(query, selected)
46
+ : (0, tagFncD_1.getSubTagLevelCnts)(query, selected, outOfYearRange);
40
47
  // クイズ開始
41
48
  var handleStart = function () {
42
- var quizList = (0, createQuizFnc_1.getBasicQuizList)(QuestionDB, startCfg, selected);
49
+ var quizList = system === "JLPT"
50
+ ? (0, createQuizFncJ_1.getBasicQuizListJ)(query, startCfg, selected)
51
+ : (0, createQuizFncD_1.getBasicQuizList)(query, startCfg, selected);
43
52
  dispatch(saveBasicPreSelect({ subject: subject, category: category, lessonKey: lesson.key }));
44
53
  var isExistQuiz = useStartQuiz(subject, quizList);
45
54
  if (!isExistQuiz)
@@ -54,6 +63,9 @@ var QuizSetup = function (_a) {
54
63
  var selectedTagCnt = lessonTags.filter(function (tag) {
55
64
  return startCfg.tags.includes(tag);
56
65
  }).length;
66
+ var handleDetail = function () {
67
+ navigation.navigate("JDetailSetting");
68
+ };
57
69
  return (<react_native_1.View style={styles.wrapper}>
58
70
  <react_native_gesture_handler_1.ScrollView style={styles.container}>
59
71
  <common_1.RoundRectangle title={quizTitle}/>
@@ -63,7 +75,7 @@ var QuizSetup = function (_a) {
63
75
  </Guide_1.default>
64
76
  <common_1.IconTitle icon="sliders-h" title={t("setup.title.setting")}/>
65
77
  <QuizOptionDrill_1.default />
66
- {type === "unit" && <common_1.MyText fsize="xs">{t("setup.warn")}</common_1.MyText>}
78
+ {system === "JLPT" && (<common_1.RoundRectangleIcon icon="cog" title="Detail Setting" onPress={handleDetail}/>)}
67
79
  </react_native_gesture_handler_1.ScrollView>
68
80
 
69
81
  <react_native_1.View style={styles.btnBox}>
@@ -75,7 +75,7 @@ var ReportPage = function (_a) {
75
75
  var _d = (0, react_1.useState)(""), inquiry = _d[0], setInquiry = _d[1];
76
76
  var storeSetting = (0, react_redux_1.useSelector)(function (state) { return state.setting; });
77
77
  var errorLogs = (0, react_redux_1.useSelector)(function (state) { return state.error; });
78
- var selectedQuiz = (0, quizHook_1.useQuestionData)();
78
+ var selectedQuiz = (0, quizHook_1.useQuestionDataD)();
79
79
  var appName = (0, react_redux_1.useSelector)(function (state) { var _a; return (_a = state.app.appSetting.quizName) === null || _a === void 0 ? void 0 : _a.appName; });
80
80
  var appKey = (0, react_redux_1.useSelector)(function (state) { var _a; return (_a = state.app.appSetting.quizName) === null || _a === void 0 ? void 0 : _a.appKey; });
81
81
  var REPORT_TYPES = [
@@ -15,18 +15,21 @@ var Square3s_1 = __importDefault(require("../component/TestPage/Square3s"));
15
15
  var AverageBar_1 = __importDefault(require("../component/TestPage/AverageBar"));
16
16
  var Paw5s_1 = __importDefault(require("../component/Basic/Paw5s"));
17
17
  var testFnc_1 = require("../functions/testFnc");
18
- var createQuizFnc_1 = require("../functions/createQuizFnc");
18
+ var createQuizFncD_1 = require("../functions/createQuizFncD");
19
19
  var QuizSaveData_1 = __importDefault(require("../quiz/save/QuizSaveData"));
20
20
  var BarChartContainer_1 = __importDefault(require("../component/TestPage/BarChartContainer"));
21
21
  var quizActionHook_1 = require("../hooks/quizActionHook");
22
22
  var Discription_1 = __importDefault(require("../component/Discription"));
23
+ var basicHook_1 = require("../hooks/basicHook");
24
+ var createQuizFncJ_1 = require("../functions/createQuizFncJ");
23
25
  var TestPage = react_1.default.memo(function (_a) {
24
26
  var navigation = _a.navigation, subject = _a.subject;
25
27
  var dispatch = (0, react_redux_1.useDispatch)();
26
28
  var useStartQuiz = (0, quizActionHook_1.useStartQuizAction)();
27
29
  var t = (0, react_i18next_1.useTranslation)().t;
28
30
  var TestDB = (0, react_2.useQuery)(db_1.TestSchema);
29
- var QuestionDB = (0, react_2.useQuery)(db_1.dQuestionSchema);
31
+ var QuestionInfo = (0, basicHook_1.useGetQuestionQuery)();
32
+ // const QuestionDB = useQuery(DQuestionSchema);
30
33
  var isExistedSaveData = (0, react_redux_1.useSelector)(function (state) { return state.score.isSave[subject.name]; });
31
34
  // Reduxから必要なデータを一括取得
32
35
  var quizCnt = subject.cnt;
@@ -54,9 +57,16 @@ var TestPage = react_1.default.memo(function (_a) {
54
57
  },
55
58
  });
56
59
  // クイズ作成
57
- var quizList = isUnitType
58
- ? (0, createQuizFnc_1.getTestQuestionsByUnit)(QuestionDB, quizCnt, subject.unit)
59
- : (0, createQuizFnc_1.getTestQuestions)(QuestionDB, quizCnt);
60
+ var quizList = [];
61
+ if (QuestionInfo.system === "JLPT") {
62
+ var tagName = subject.tagName || "basicTag";
63
+ quizList = (0, createQuizFncJ_1.getTestQuestionsJ)(QuestionInfo.query, quizCnt, tagName);
64
+ }
65
+ else {
66
+ quizList = isUnitType
67
+ ? (0, createQuizFncD_1.getTestQuestionsByUnit)(QuestionInfo.query, quizCnt, subject.unit)
68
+ : (0, createQuizFncD_1.getTestQuestions)(QuestionInfo.query, quizCnt);
69
+ }
60
70
  var isExistQuiz = useStartQuiz(subject.name, quizList);
61
71
  if (!isExistQuiz)
62
72
  return;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { Store } from "@nakamura-123/types";
3
+ interface QuizContentDrillProps {
4
+ navigation: any;
5
+ guideName: keyof Store.GuideType;
6
+ showSwipe1Guide: boolean;
7
+ showSwipe2Guide: boolean;
8
+ isCheck: boolean;
9
+ isResult: boolean;
10
+ isNotInput: boolean;
11
+ isNotQuiz: boolean;
12
+ isInputQuizMode: boolean;
13
+ }
14
+ declare const QuizContentDrill: React.FC<QuizContentDrillProps>;
15
+ export default QuizContentDrill;
@@ -0,0 +1,34 @@
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 Title_1 = __importDefault(require("./Title"));
9
+ var Question_1 = __importDefault(require("./question/Question"));
10
+ var Answer_1 = __importDefault(require("./answer/Answer"));
11
+ var CorrectedBar_1 = __importDefault(require("./explain/CorrectedBar"));
12
+ var Explain_1 = __importDefault(require("./explain/Explain"));
13
+ var CollapseExplain_1 = __importDefault(require("./answer/Input/CollapseExplain"));
14
+ var Guide_1 = __importDefault(require("../component/Guide"));
15
+ var common_1 = require("@nakamura-123/common");
16
+ var Bottom3Btn_1 = __importDefault(require("./setting/Bottom3Btn"));
17
+ var QuizContentDrill = function (_a) {
18
+ var navigation = _a.navigation, guideName = _a.guideName, showSwipe1Guide = _a.showSwipe1Guide, showSwipe2Guide = _a.showSwipe2Guide, isCheck = _a.isCheck, isResult = _a.isResult, isNotInput = _a.isNotInput, isNotQuiz = _a.isNotQuiz, isInputQuizMode = _a.isInputQuizMode;
19
+ return (<>
20
+ <Title_1.default />
21
+ <Guide_1.default name={guideName} isVisible={showSwipe1Guide || showSwipe2Guide}>
22
+ <react_native_1.View></react_native_1.View>
23
+ </Guide_1.default>
24
+ <Question_1.default navigation={navigation}/>
25
+ <Answer_1.default />
26
+ {isCheck && !isResult && isNotInput && <CorrectedBar_1.default />}
27
+ {isNotQuiz && <Explain_1.default navigation={navigation}/>}
28
+ {isInputQuizMode && <CollapseExplain_1.default navigation={navigation}/>}
29
+ <common_1.HelpMark name="quizSwipe" top={0} right={10}/>
30
+ <Bottom3Btn_1.default navigation={navigation}/>
31
+ <react_native_1.View style={{ height: 70 }}/>
32
+ </>);
33
+ };
34
+ exports.default = QuizContentDrill;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { Store } from "@nakamura-123/types";
3
+ interface Props {
4
+ navigation: any;
5
+ guideName: keyof Store.GuideType;
6
+ showSwipe1Guide: boolean;
7
+ showSwipe2Guide: boolean;
8
+ isCheck: boolean;
9
+ isResult: boolean;
10
+ isNotInput: boolean;
11
+ isNotQuiz: boolean;
12
+ isInputQuizMode: boolean;
13
+ turn: number;
14
+ }
15
+ declare const QuizContentDrill: React.FC<Props>;
16
+ export default QuizContentDrill;
@@ -0,0 +1,70 @@
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 Title_1 = __importDefault(require("./Title"));
32
+ var Question_1 = __importDefault(require("./question/Question"));
33
+ var Answer_1 = __importDefault(require("./answer/Answer"));
34
+ var CorrectedBar_1 = __importDefault(require("./explain/CorrectedBar"));
35
+ var Explain_1 = __importDefault(require("./explain/Explain"));
36
+ var CollapseExplain_1 = __importDefault(require("./answer/Input/CollapseExplain"));
37
+ var Guide_1 = __importDefault(require("../component/Guide"));
38
+ var common_1 = require("@nakamura-123/common");
39
+ var Bottom3Btn_1 = __importDefault(require("./setting/Bottom3Btn"));
40
+ var react_native_gesture_handler_1 = require("react-native-gesture-handler");
41
+ var PageContainerWrap_1 = __importDefault(require("./common/PageContainerWrap"));
42
+ var QuizContentDrill = function (_a) {
43
+ var navigation = _a.navigation, guideName = _a.guideName, showSwipe1Guide = _a.showSwipe1Guide, showSwipe2Guide = _a.showSwipe2Guide, isCheck = _a.isCheck, isResult = _a.isResult, isNotInput = _a.isNotInput, isNotQuiz = _a.isNotQuiz, isInputQuizMode = _a.isInputQuizMode, turn = _a.turn;
44
+ var scrollRef = (0, react_1.useRef)(null);
45
+ // ターン変更時にスクロール位置をリセット
46
+ (0, react_1.useEffect)(function () {
47
+ var _a;
48
+ (_a = scrollRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo({ y: 0, animated: true });
49
+ }, [turn]);
50
+ return (<react_native_gesture_handler_1.ScrollView contentContainerStyle={styles.container} ref={scrollRef} showsVerticalScrollIndicator={false}>
51
+ <PageContainerWrap_1.default scrollViewRef={scrollRef} navigation={navigation}>
52
+ <Title_1.default />
53
+ <Guide_1.default name={guideName} isVisible={showSwipe1Guide || showSwipe2Guide}>
54
+ <react_native_1.View></react_native_1.View>
55
+ </Guide_1.default>
56
+ <Question_1.default navigation={navigation}/>
57
+ <Answer_1.default />
58
+ {isCheck && !isResult && isNotInput && <CorrectedBar_1.default />}
59
+ {isNotQuiz && <Explain_1.default navigation={navigation}/>}
60
+ {isInputQuizMode && <CollapseExplain_1.default navigation={navigation}/>}
61
+ <common_1.HelpMark name="quizSwipe" top={0} right={10}/>
62
+ <Bottom3Btn_1.default navigation={navigation}/>
63
+ <react_native_1.View style={{ height: 70 }}/>
64
+ </PageContainerWrap_1.default>
65
+ </react_native_gesture_handler_1.ScrollView>);
66
+ };
67
+ var styles = react_native_1.StyleSheet.create({
68
+ container: { paddingTop: 20 },
69
+ });
70
+ exports.default = QuizContentDrill;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { Store } from "@nakamura-123/types";
3
+ interface Props {
4
+ navigation: any;
5
+ guideName: keyof Store.GuideType;
6
+ showSwipe1Guide: boolean;
7
+ showSwipe2Guide: boolean;
8
+ isCheck: boolean;
9
+ isResult: boolean;
10
+ isNotInput: boolean;
11
+ isNotQuiz: boolean;
12
+ isInputQuizMode: boolean;
13
+ turn: number;
14
+ }
15
+ declare const QuizContentDrill: React.FC<Props>;
16
+ export default QuizContentDrill;