@nakamura-123/pages 1.1.17 → 1.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 (168) hide show
  1. package/dist/component/Basic/Badge5s.js +18 -30
  2. package/dist/component/Basic/BasicContents.js +38 -39
  3. package/dist/component/Basic/BasicProgressBar.js +16 -17
  4. package/dist/component/Basic/BasicSetting.js +14 -15
  5. package/dist/component/Basic/MiniTestCard.js +32 -33
  6. package/dist/component/Basic/Paw5s.js +9 -13
  7. package/dist/component/Basic/SelectedExamCnt.js +14 -15
  8. package/dist/component/Basic/SubCategoryLeft.js +5 -6
  9. package/dist/component/Basic/SubCategoryList.js +49 -62
  10. package/dist/component/Boot/SelectRange.js +18 -21
  11. package/dist/component/Boot/ToggleRange.js +11 -14
  12. package/dist/component/Coin/AppReviews.js +9 -10
  13. package/dist/component/Coin/CatchCopy.js +6 -6
  14. package/dist/component/Coin/CoinCheck.js +18 -54
  15. package/dist/component/Coin/CoinFnc.js +210 -282
  16. package/dist/component/Coin/CoinPageComponent.d.ts +1 -0
  17. package/dist/component/Coin/CoinPageComponent.js +22 -22
  18. package/dist/component/Coin/ReceiptFnc.js +3 -3
  19. package/dist/component/Coin/Recommend.js +10 -10
  20. package/dist/component/Coin/WaitingPayBanner.js +8 -9
  21. package/dist/component/Discription.js +6 -7
  22. package/dist/component/Grade/AllTags.js +12 -12
  23. package/dist/component/Grade/BasicBadge.js +20 -32
  24. package/dist/component/Grade/GradeCard/ChangeWeeklyModal.js +8 -10
  25. package/dist/component/Grade/GradeCard/ChangeWeeklyTargetBtn.js +21 -22
  26. package/dist/component/Grade/GradeCard/DatePickerModal.js +17 -19
  27. package/dist/component/Grade/GradeCard/GradeCard.js +19 -20
  28. package/dist/component/Grade/GradeCard/Square3sGrade.js +16 -17
  29. package/dist/component/Grade/GradeCard/TargetDate.js +19 -20
  30. package/dist/component/Grade/GradeCard/WeeklyAchivedRate.js +7 -8
  31. package/dist/component/Grade/GradeCard/WeeklyProgress.js +19 -29
  32. package/dist/component/Grade/JAllTags.js +16 -16
  33. package/dist/component/Grade/QuizCntGraph.js +31 -45
  34. package/dist/component/Grade/ShareBtn.js +30 -68
  35. package/dist/component/Grade/Square4s.js +14 -15
  36. package/dist/component/Grade/UnitCircles.js +18 -23
  37. package/dist/component/Grade/YearCircles.js +17 -22
  38. package/dist/component/Guide.js +6 -7
  39. package/dist/component/Home/OpeningMsg.js +14 -14
  40. package/dist/component/OnlineInput/OnlineInputFnc.js +6 -6
  41. package/dist/component/OnlineInput/OnlineSaveBtn.js +7 -8
  42. package/dist/component/OnlineInput/OnlineSavedList.js +13 -14
  43. package/dist/component/OnlineInput/PasswardModal.js +64 -110
  44. package/dist/component/OnlineInput/PasswordIdModal.js +40 -80
  45. package/dist/component/QuizSet/QuizOptionDrill.js +29 -42
  46. package/dist/component/Result/AdCard.js +21 -16
  47. package/dist/component/Result/CharaCard.js +15 -16
  48. package/dist/component/Result/LessonTitle.js +10 -10
  49. package/dist/component/Result/QuizFlatList.js +26 -30
  50. package/dist/component/Result/ScoreCircle.js +8 -9
  51. package/dist/component/SelectRange/SelectYearRange.js +22 -34
  52. package/dist/component/SettingBtns/QuizOptionSelector.js +16 -17
  53. package/dist/component/SettingBtns/Range.js +9 -9
  54. package/dist/component/SettingBtns/TransBtn.js +17 -17
  55. package/dist/component/TabAnimeView.js +9 -10
  56. package/dist/component/Tag5s.js +10 -14
  57. package/dist/component/TagBadge5s.js +16 -17
  58. package/dist/component/TagBadge5sPress.js +14 -15
  59. package/dist/component/TestPage/AverageBar.js +12 -24
  60. package/dist/component/TestPage/BarChartContainer.js +30 -31
  61. package/dist/component/TestPage/ChartControl.js +5 -6
  62. package/dist/component/TestPage/Square3s.js +12 -13
  63. package/dist/functions/badgeBasicFnc.js +22 -42
  64. package/dist/functions/badgeDailyFnc.js +24 -35
  65. package/dist/functions/badgeFilter.js +16 -18
  66. package/dist/functions/badgeFnc.js +24 -33
  67. package/dist/functions/createQuizFncD.js +33 -33
  68. package/dist/functions/createQuizFncJ.js +27 -33
  69. package/dist/functions/gradeFnc.js +48 -87
  70. package/dist/functions/oldStorageFnc.js +77 -200
  71. package/dist/functions/questionFilterD.js +19 -28
  72. package/dist/functions/questionFilterJ.js +9 -9
  73. package/dist/functions/questionFormatD.js +34 -47
  74. package/dist/functions/questionFormatJ.js +30 -41
  75. package/dist/functions/tagFncD.js +37 -39
  76. package/dist/functions/tagFncJ.js +16 -19
  77. package/dist/functions/testFnc.js +6 -7
  78. package/dist/hooks/BadgeHook.js +24 -35
  79. package/dist/hooks/ExitQuizHook.js +21 -21
  80. package/dist/hooks/basicHook.js +12 -12
  81. package/dist/hooks/quizActionHook.js +44 -57
  82. package/dist/hooks/quizHook.d.ts +2 -1
  83. package/dist/hooks/quizHook.js +58 -48
  84. package/dist/index.js +25 -25
  85. package/dist/page/BadgePage.js +26 -29
  86. package/dist/page/BasicPage.js +23 -25
  87. package/dist/page/BootPage.js +48 -53
  88. package/dist/page/CoinPage.d.ts +1 -0
  89. package/dist/page/CoinPage.js +90 -144
  90. package/dist/page/FAQPage.js +23 -23
  91. package/dist/page/GetBadgePage.js +35 -71
  92. package/dist/page/GradePage.js +26 -27
  93. package/dist/page/GuidePage.js +28 -33
  94. package/dist/page/HistoryPage.js +25 -33
  95. package/dist/page/HomePage.d.ts +1 -0
  96. package/dist/page/HomePage.js +62 -108
  97. package/dist/page/ImgZoom.js +8 -9
  98. package/dist/page/InformationPage.js +15 -15
  99. package/dist/page/JDetailSettingPage.js +23 -25
  100. package/dist/page/OnlineInputPage.js +19 -20
  101. package/dist/page/QuizPage.js +25 -26
  102. package/dist/page/QuizSettingPage.js +19 -19
  103. package/dist/page/QuizSetupPage.js +40 -43
  104. package/dist/page/ReportPage.js +55 -94
  105. package/dist/page/ResultPage.js +55 -103
  106. package/dist/page/SettingPage.js +35 -40
  107. package/dist/page/TestPage.js +41 -44
  108. package/dist/quiz/QuizContentsDrill.js +17 -18
  109. package/dist/quiz/QuizContentsJLPT.js +8 -9
  110. package/dist/quiz/Title.js +22 -22
  111. package/dist/quiz/answer/Answer.js +20 -20
  112. package/dist/quiz/answer/BlangGuide.js +10 -10
  113. package/dist/quiz/answer/BlankAnswer.js +11 -12
  114. package/dist/quiz/answer/BlankBtn.js +10 -10
  115. package/dist/quiz/answer/CheckButton.js +6 -9
  116. package/dist/quiz/answer/ChoiceView.js +15 -30
  117. package/dist/quiz/answer/Input/CollapseExplain.js +10 -11
  118. package/dist/quiz/answer/Input/InputAnswerBtn.js +9 -9
  119. package/dist/quiz/answer/Input/InputBox.js +17 -18
  120. package/dist/quiz/answer/Input/InputCounter.js +6 -7
  121. package/dist/quiz/answer/Input/InputFnc.js +10 -19
  122. package/dist/quiz/answer/Input/InputSaveSelector.js +12 -13
  123. package/dist/quiz/answer/Input/InputTab.js +12 -13
  124. package/dist/quiz/answer/Input/InputWarnning.js +13 -14
  125. package/dist/quiz/answer/InputGuide.js +10 -10
  126. package/dist/quiz/answer/InputNav.js +38 -39
  127. package/dist/quiz/answer/MultiChoice.js +20 -22
  128. package/dist/quiz/answer/MultiGuide.js +10 -10
  129. package/dist/quiz/answer/MultiNextBtn.js +13 -14
  130. package/dist/quiz/answer/NormalChoice.js +29 -42
  131. package/dist/quiz/answer/NormalMultiGuide.js +11 -12
  132. package/dist/quiz/answer/styles/getChoiceStyle.js +4 -4
  133. package/dist/quiz/check/Check.js +17 -18
  134. package/dist/quiz/check/NextQuizBtn.js +18 -19
  135. package/dist/quiz/check/SelectTag.js +36 -51
  136. package/dist/quiz/common/MyTextqqyy.js +29 -47
  137. package/dist/quiz/common/PageContainerWrap.js +14 -15
  138. package/dist/quiz/common/RenderImgOrText.js +17 -18
  139. package/dist/quiz/common/RubyText.js +21 -35
  140. package/dist/quiz/common/ZoomableImage.js +6 -9
  141. package/dist/quiz/explain/CorrectedBar.js +13 -14
  142. package/dist/quiz/explain/Explain.js +9 -10
  143. package/dist/quiz/explain/ExplainLogic.js +17 -23
  144. package/dist/quiz/explain/MovieBtn.js +10 -11
  145. package/dist/quiz/explain/MultiExplain.js +12 -24
  146. package/dist/quiz/explain/NormalExplain.js +29 -30
  147. package/dist/quiz/function/choiceFnc.js +2 -2
  148. package/dist/quiz/jAnswer/JAnswer.js +24 -26
  149. package/dist/quiz/jAnswer/JAnswerContents.js +12 -27
  150. package/dist/quiz/jQuestion/JQuestion.js +12 -13
  151. package/dist/quiz/jQuestion/JQuestionBottomText.js +14 -15
  152. package/dist/quiz/jQuestion/JQuestionText.js +13 -14
  153. package/dist/quiz/jQuestion/QuizCnt.js +9 -9
  154. package/dist/quiz/jQuestion/TimeLimit.js +23 -25
  155. package/dist/quiz/question/FillDiagram.js +12 -13
  156. package/dist/quiz/question/Question.js +25 -26
  157. package/dist/quiz/question/QuestionFormats.js +29 -45
  158. package/dist/quiz/question/QuestionReference.js +7 -7
  159. package/dist/quiz/question/SearchYoutue.js +10 -11
  160. package/dist/quiz/save/QuizSaveData.js +18 -19
  161. package/dist/quiz/setting/Above3BtnJ.js +25 -30
  162. package/dist/quiz/setting/Bottom3Btn.js +25 -30
  163. package/dist/quiz/setting/GuideBtn.js +19 -22
  164. package/dist/quiz/setting/RepeatBtn.js +27 -34
  165. package/dist/quiz/setting/ReturnBtn.js +8 -20
  166. package/dist/quiz/setting/ReturnSaveBtn.js +21 -33
  167. package/dist/tsconfig.tsbuildinfo +1 -1
  168. package/package.json +2 -2
@@ -23,36 +23,41 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- var react_1 = __importStar(require("react"));
27
- var react_redux_1 = require("react-redux");
28
- var common_1 = require("@nakamura-123/common");
29
- var lib_1 = require("@nakamura-123/lib");
30
- var emptyCardInfo = {
26
+ const react_1 = __importStar(require("react"));
27
+ const react_redux_1 = require("react-redux");
28
+ const common_1 = require("@nakamura-123/common");
29
+ const lib_1 = require("@nakamura-123/lib");
30
+ const emptyCardInfo = {
31
31
  title: "",
32
32
  icon: "info",
33
33
  color: "blue",
34
34
  description: "",
35
35
  };
36
- var AdCard = function () {
37
- var infoSetting = (0, react_redux_1.useSelector)(function (state) { return state.app.appSetting.setting.info; }) || {};
38
- var adCardInfos = (0, react_redux_1.useSelector)(function (state) { return state.setting.info.adCard; });
39
- var _a = (0, react_1.useState)(false), isVisible = _a[0], setIsVisible = _a[1];
40
- var _b = (0, react_1.useState)(emptyCardInfo), cardInfo = _b[0], setCardInfo = _b[1];
41
- (0, react_1.useEffect)(function () {
36
+ const AdCard = () => {
37
+ const infoSetting = (0, react_redux_1.useSelector)((state) => state.app.appSetting.setting.info) || {};
38
+ const adCardInfos = (0, react_redux_1.useSelector)((state) => { var _a; return (_a = state.setting.info) === null || _a === void 0 ? void 0 : _a.adCard; });
39
+ const [isVisible, setIsVisible] = (0, react_1.useState)(false);
40
+ const [cardInfo, setCardInfo] = (0, react_1.useState)(emptyCardInfo);
41
+ (0, react_1.useEffect)(() => {
42
42
  if (!infoSetting.isDisplayAdCard)
43
43
  return;
44
+ // adCardRate が 0 以下の場合は表示しない(getRandomInt は 0 以下で例外をスローする)
45
+ const rate = infoSetting.adCardRate;
46
+ if (!rate || rate <= 0)
47
+ return;
44
48
  // 抽選
45
- var randomNum = lib_1.utilFnc.getRandomInt(infoSetting.adCardRate);
49
+ const randomNum = lib_1.utilFnc.getRandomInt(rate);
46
50
  if (randomNum !== 0)
47
51
  return;
48
- if (adCardInfos.length > 0) {
49
- var randomIndex = Math.floor(Math.random() * adCardInfos.length);
50
- setCardInfo(adCardInfos[randomIndex]);
52
+ const cards = adCardInfos !== null && adCardInfos !== void 0 ? adCardInfos : [];
53
+ if (cards.length > 0) {
54
+ const randomIndex = Math.floor(Math.random() * cards.length);
55
+ setCardInfo(cards[randomIndex]);
51
56
  setIsVisible(true);
52
57
  }
53
58
  }, []);
54
59
  if (!isVisible)
55
60
  return null;
56
- return (<common_1.InformationCard info={cardInfo} isVisible={isVisible} onClose={function () { return setIsVisible(false); }}/>);
61
+ return (<common_1.InformationCard info={cardInfo} isVisible={isVisible} onClose={() => setIsVisible(false)}/>);
57
62
  };
58
63
  exports.default = AdCard;
@@ -3,24 +3,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
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 common_1 = require("@nakamura-123/common");
10
- var lib_1 = require("@nakamura-123/lib");
11
- var CaraCard = function (_a) {
12
- var scoreInfo = _a.scoreInfo;
13
- var imgs = (0, react_redux_1.useSelector)(function (state) { return state.app.imgs; });
14
- var showCharactor = (0, react_redux_1.useSelector)(function (state) { var _a; return (_a = state.app.appSetting.setting) === null || _a === void 0 ? void 0 : _a.showCharactor; }) || false;
6
+ const react_1 = __importDefault(require("react"));
7
+ const react_native_1 = require("react-native");
8
+ const react_redux_1 = require("react-redux");
9
+ const common_1 = require("@nakamura-123/common");
10
+ const lib_1 = require("@nakamura-123/lib");
11
+ const CaraCard = ({ scoreInfo }) => {
12
+ const imgs = (0, react_redux_1.useSelector)((state) => state.app.imgs);
13
+ const showCharactor = (0, react_redux_1.useSelector)((state) => { var _a; return (_a = state.app.appSetting.setting) === null || _a === void 0 ? void 0 : _a.showCharactor; }) || false;
15
14
  // 正答割合を取得
16
- var percent = scoreInfo.percent;
17
- var scoreItem = lib_1.scoreLevels.find(function (item) {
15
+ const { percent } = scoreInfo;
16
+ const scoreItem = lib_1.scoreLevels.find((item) => {
18
17
  return percent <= item.maxPercent;
19
18
  });
20
- var enTitle = (scoreItem === null || scoreItem === void 0 ? void 0 : scoreItem.enTitle) || "Great Job";
21
- var jpTitle = (scoreItem === null || scoreItem === void 0 ? void 0 : scoreItem.jpTitle) || "なかなかやるね";
22
- var level = (scoreItem === null || scoreItem === void 0 ? void 0 : scoreItem.level) || "l2";
23
- var imgPath = imgs.chara[level];
19
+ const enTitle = (scoreItem === null || scoreItem === void 0 ? void 0 : scoreItem.enTitle) || "Great Job";
20
+ const jpTitle = (scoreItem === null || scoreItem === void 0 ? void 0 : scoreItem.jpTitle) || "なかなかやるね";
21
+ const level = (scoreItem === null || scoreItem === void 0 ? void 0 : scoreItem.level) || "l2";
22
+ const imgPath = imgs.chara[level];
24
23
  return (<react_native_1.View style={styles.container}>
25
24
  {/* <View style={styles.circle} /> */}
26
25
  <common_1.MyText style={styles.title}>{enTitle}</common_1.MyText>
@@ -28,7 +27,7 @@ var CaraCard = function (_a) {
28
27
  {showCharactor && <react_native_1.Image style={styles.imgBox} source={imgPath}/>}
29
28
  </react_native_1.View>);
30
29
  };
31
- var styles = react_native_1.StyleSheet.create({
30
+ const styles = react_native_1.StyleSheet.create({
32
31
  container: {
33
32
  alignItems: "center",
34
33
  padding: 10,
@@ -3,15 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
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 common_1 = require("@nakamura-123/common");
10
- var lib_1 = require("@nakamura-123/lib");
11
- var LessonTitle = function (_a) {
12
- var lessonName = (0, react_redux_1.useSelector)(function (state) { return state.quiz.selected.lesson.title; });
13
- var isShuffle = (0, react_redux_1.useSelector)(function (state) { return state.quizCfg.startCfg.option.isShuffle; });
14
- var text = isShuffle ? "(ランダム)" : "(順番通り)";
6
+ const react_1 = __importDefault(require("react"));
7
+ const react_native_1 = require("react-native");
8
+ const react_redux_1 = require("react-redux");
9
+ const common_1 = require("@nakamura-123/common");
10
+ const lib_1 = require("@nakamura-123/lib");
11
+ const LessonTitle = ({}) => {
12
+ const lessonName = (0, react_redux_1.useSelector)((state) => state.quiz.selected.lesson.title);
13
+ const isShuffle = (0, react_redux_1.useSelector)((state) => state.quizCfg.startCfg.option.isShuffle);
14
+ const text = isShuffle ? "(ランダム)" : "(順番通り)";
15
15
  return (<react_native_1.View style={styles.container}>
16
16
  <react_native_1.View style={styles.rectangle}>
17
17
  <common_1.MyText fsize="sm" style={styles.name}>
@@ -23,7 +23,7 @@ var LessonTitle = function (_a) {
23
23
  </react_native_1.View>
24
24
  </react_native_1.View>);
25
25
  };
26
- var styles = react_native_1.StyleSheet.create({
26
+ const styles = react_native_1.StyleSheet.create({
27
27
  container: {
28
28
  // flex: 1,
29
29
  },
@@ -3,36 +3,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
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 MyTextqqyy_1 = __importDefault(require("../../quiz/common/MyTextqqyy"));
12
- var RubyText_1 = __importDefault(require("../../quiz/common/RubyText"));
13
- var QuizFlatList = function (_a) {
14
- var navigation = _a.navigation;
15
- var dispatch = (0, react_redux_1.useDispatch)();
6
+ const react_1 = __importDefault(require("react"));
7
+ const react_native_1 = require("react-native");
8
+ const react_redux_1 = require("react-redux");
9
+ const lib_1 = require("@nakamura-123/lib");
10
+ const common_1 = require("@nakamura-123/common");
11
+ const MyTextqqyy_1 = __importDefault(require("../../quiz/common/MyTextqqyy"));
12
+ const RubyText_1 = __importDefault(require("../../quiz/common/RubyText"));
13
+ const QuizFlatList = ({ navigation }) => {
14
+ const dispatch = (0, react_redux_1.useDispatch)();
16
15
  // 01_Redux からデータを取得(useSelector を使用)
17
- var quizList = (0, react_redux_1.useSelector)(function (state) { return state.quiz.quizList; });
18
- var listData = quizList.map(function (quiz, i) {
19
- var id = quiz.system === "JLPT"
20
- ? quiz.quizId
21
- : String(quiz.yearId) + String(quiz.num);
22
- var questionText = quiz.system === "JLPT" ? quiz.question : quiz.question[0];
23
- var question = "(".concat(i + 1, ") ").concat(questionText);
24
- var color = lib_1.tagLevels.filter(function (item) { return item.level === quiz.tag; })[0].color;
25
- var isCorrected = quiz.isCorrected;
26
- var system = quiz.system;
27
- return { id: id, question: question, color: color, index: i, isCorrected: isCorrected, system: system };
16
+ const quizList = (0, react_redux_1.useSelector)((state) => state.quiz.quizList);
17
+ const listData = quizList.map((quiz, i) => {
18
+ const id = String(i);
19
+ const questionText = quiz.system === "JLPT" ? quiz.question : quiz.question[0];
20
+ const question = `(${i + 1}) ${questionText}`;
21
+ const color = lib_1.tagLevels.filter((item) => item.level === quiz.tag)[0].color;
22
+ const isCorrected = quiz.isCorrected;
23
+ const system = quiz.system;
24
+ return { id, question, color, index: i, isCorrected, system };
28
25
  });
29
26
  // 02_リストアイテムのレンダリング
30
- var renderItem = function (_a) {
31
- var item = _a.item;
32
- var text = item.question.replace(/zz/g, " 空欄");
33
- var icon = item.isCorrected ? "circle" : "times";
34
- var iconColor = item.isCorrected ? "red" : "blue";
35
- return (<react_native_1.TouchableOpacity style={styles.itemContainer} activeOpacity={0.7} onPress={function () { return handlePress(item.index); }}>
27
+ const renderItem = ({ item }) => {
28
+ const text = item.question.replace(/zz/g, " 空欄");
29
+ const icon = item.isCorrected ? "circle" : "times";
30
+ const iconColor = item.isCorrected ? "red" : "blue";
31
+ return (<react_native_1.TouchableOpacity style={styles.itemContainer} activeOpacity={0.7} onPress={() => handlePress(item.index)}>
36
32
  <react_native_1.View>
37
33
  <common_1.IconInCircle name="tag" circleColor={item.color} size={11} iconColor="white"/>
38
34
  <react_native_1.View style={{ position: "absolute", top: -5, right: -5 }}>
@@ -49,17 +45,17 @@ var QuizFlatList = function (_a) {
49
45
  </react_native_1.TouchableOpacity>);
50
46
  };
51
47
  // 03_タップ時の処理
52
- var handlePress = function (index) {
48
+ const handlePress = (index) => {
53
49
  // タップ時の処理を記述してください
54
50
  dispatch({ type: "quiz/jumpToTurn", payload: index });
55
51
  dispatch({ type: "quiz/toResult" });
56
52
  navigation.navigate("Quiz");
57
53
  };
58
54
  return (<react_native_1.View style={styles.container}>
59
- <react_native_1.FlatList data={listData} keyExtractor={function (item) { return item.id; }} renderItem={renderItem} contentContainerStyle={styles.listContent} showsVerticalScrollIndicator={false} ItemSeparatorComponent={function () { return <react_native_1.View style={styles.border}/>; }}/>
55
+ <react_native_1.FlatList data={listData} keyExtractor={(item) => item.id} renderItem={renderItem} contentContainerStyle={styles.listContent} showsVerticalScrollIndicator={false} ItemSeparatorComponent={() => <react_native_1.View style={styles.border}/>}/>
60
56
  </react_native_1.View>);
61
57
  };
62
- var styles = react_native_1.StyleSheet.create({
58
+ const styles = react_native_1.StyleSheet.create({
63
59
  container: {
64
60
  flex: 1,
65
61
  backgroundColor: lib_1.colors.beige,
@@ -3,15 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
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 lib_1 = require("@nakamura-123/lib");
10
- var ScoreCircle = function (_a) {
11
- var scoreInfo = _a.scoreInfo;
6
+ const react_1 = __importDefault(require("react"));
7
+ const react_native_1 = require("react-native");
8
+ const common_1 = require("@nakamura-123/common");
9
+ const lib_1 = require("@nakamura-123/lib");
10
+ const ScoreCircle = ({ scoreInfo }) => {
12
11
  // 正答割合を取得
13
- var score = scoreInfo.score, quizCnt = scoreInfo.quizCnt, percent = scoreInfo.percent;
14
- var color = lib_1.utilFnc.getScoreColor(percent);
12
+ const { score, quizCnt, percent } = scoreInfo;
13
+ const color = lib_1.utilFnc.getScoreColor(percent);
15
14
  return (<react_native_1.View style={[styles.container, { borderColor: lib_1.colors[color] }]}>
16
15
  <react_native_1.View style={styles.iconBox}>
17
16
  <common_1.IconInCircle name="paw" circleColor={color} size={15}/>
@@ -28,7 +27,7 @@ var ScoreCircle = function (_a) {
28
27
  </common_1.MyText>
29
28
  </react_native_1.View>);
30
29
  };
31
- var styles = react_native_1.StyleSheet.create({
30
+ const styles = react_native_1.StyleSheet.create({
32
31
  container: {
33
32
  // 丸い円にする
34
33
  marginTop: 25,
@@ -22,55 +22,43 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
26
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
27
- if (ar || !(i in from)) {
28
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
29
- ar[i] = from[i];
30
- }
31
- }
32
- return to.concat(ar || Array.prototype.slice.call(from));
33
- };
34
25
  Object.defineProperty(exports, "__esModule", { value: true });
35
- var react_1 = __importStar(require("react"));
36
- var react_native_1 = require("react-native");
37
- var react_redux_1 = require("react-redux");
38
- var common_1 = require("@nakamura-123/common");
39
- var stores_1 = require("@nakamura-123/stores");
40
- var updateOutOfYear = stores_1.cfgAction.updateOutOfYear;
41
- var SelectYearRange = function (_a) {
42
- var onClose = _a.onClose, isVisible = _a.isVisible;
43
- var dispatch = (0, react_redux_1.useDispatch)();
44
- var reduxOutOfRanges = (0, react_redux_1.useSelector)(function (state) { return state.quizCfg.startCfg.outOfYearRange; }); // Reduxの状態を取得
45
- var yearLists = (0, react_redux_1.useSelector)(function (state) { return state.app.yearList; });
46
- var _b = (0, react_1.useState)([]), localOutOfRanges = _b[0], setLocalOutOfRanges = _b[1]; // 一時的な状態
26
+ const react_1 = __importStar(require("react"));
27
+ const react_native_1 = require("react-native");
28
+ const react_redux_1 = require("react-redux");
29
+ const common_1 = require("@nakamura-123/common");
30
+ const stores_1 = require("@nakamura-123/stores");
31
+ const { updateOutOfYear } = stores_1.cfgAction;
32
+ const SelectYearRange = ({ onClose, isVisible, }) => {
33
+ const dispatch = (0, react_redux_1.useDispatch)();
34
+ const reduxOutOfRanges = (0, react_redux_1.useSelector)((state) => state.quizCfg.startCfg.outOfYearRange); // Reduxの状態を取得
35
+ const yearLists = (0, react_redux_1.useSelector)((state) => state.app.yearList);
36
+ const [localOutOfRanges, setLocalOutOfRanges] = (0, react_1.useState)([]); // 一時的な状態
47
37
  // モーダルが開いたときにReduxの値を初期化
48
- (0, react_1.useEffect)(function () {
49
- setLocalOutOfRanges(__spreadArray([], reduxOutOfRanges, true)); // Reduxの状態をコピー
38
+ (0, react_1.useEffect)(() => {
39
+ setLocalOutOfRanges([...reduxOutOfRanges]); // Reduxの状態をコピー
50
40
  }, [isVisible]);
51
41
  // 選択肢のON/OFFをトグルする関数
52
- var selectedItemCnt = yearLists.length - localOutOfRanges.length;
53
- var toggleSelection = function (key) {
54
- var MIN_CNT = 8;
42
+ const selectedItemCnt = yearLists.length - localOutOfRanges.length;
43
+ const toggleSelection = (key) => {
44
+ const MIN_CNT = 8;
55
45
  if (selectedItemCnt <= MIN_CNT && !localOutOfRanges.includes(key))
56
46
  return;
57
- setLocalOutOfRanges(function (prev) {
58
- return prev.includes(key) ? prev.filter(function (item) { return item !== key; }) : __spreadArray(__spreadArray([], prev, true), [key], false);
59
- });
47
+ setLocalOutOfRanges((prev) => prev.includes(key) ? prev.filter((item) => item !== key) : [...prev, key]);
60
48
  };
61
49
  // 適用ボタンの処理
62
- var handleApply = function () {
50
+ const handleApply = () => {
63
51
  dispatch(updateOutOfYear(localOutOfRanges)); // Reduxを更新
64
52
  onClose(); // モーダルを閉じる
65
53
  };
66
54
  // キャンセルボタンの処理
67
- var handleCancel = function () {
55
+ const handleCancel = () => {
68
56
  onClose(); // モーダルを閉じる
69
57
  };
70
58
  return (<common_1.BaseModal isVisible={isVisible} onClose={onClose}>
71
59
  <react_native_1.View style={styles.container}>
72
- {yearLists.map(function (year, i) { return (<common_1.RoundSelectableItem key={i} title={year.title} onPress={function () { return toggleSelection(year.key); }} isSelected={!localOutOfRanges.includes(year.key)} // 選択状態を反映
73
- />); })}
60
+ {yearLists.map((year, i) => (<common_1.RoundSelectableItem key={i} title={year.title} onPress={() => toggleSelection(year.key)} isSelected={!localOutOfRanges.includes(year.key)} // 選択状態を反映
61
+ />))}
74
62
  <react_native_1.View style={styles.txtBox}>
75
63
  <common_1.MyText fsize="sm">
76
64
  ※最低8個は選択してください({selectedItemCnt}個選択中)。
@@ -83,7 +71,7 @@ var SelectYearRange = function (_a) {
83
71
  </react_native_1.View>
84
72
  </common_1.BaseModal>);
85
73
  };
86
- var styles = react_native_1.StyleSheet.create({
74
+ const styles = react_native_1.StyleSheet.create({
87
75
  container: {
88
76
  flexDirection: "row",
89
77
  flexWrap: "wrap",
@@ -3,16 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
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 common_1 = require("@nakamura-123/common");
10
- var stores_1 = require("@nakamura-123/stores");
11
- var QuizOptionItem = function (_a) {
12
- var type = _a.type, options = _a.options;
13
- var dispatch = (0, react_redux_1.useDispatch)();
14
- var t = (0, common_1.useDrillTranslation)().t;
15
- var storeOption = (0, react_redux_1.useSelector)(function (state) { return state.quizCfg.inQuizOption; });
6
+ const react_1 = __importDefault(require("react"));
7
+ const react_native_1 = require("react-native");
8
+ const react_redux_1 = require("react-redux");
9
+ const common_1 = require("@nakamura-123/common");
10
+ const stores_1 = require("@nakamura-123/stores");
11
+ const QuizOptionItem = ({ type, options }) => {
12
+ const dispatch = (0, react_redux_1.useDispatch)();
13
+ const { t } = (0, common_1.useDrillTranslation)();
14
+ const storeOption = (0, react_redux_1.useSelector)((state) => state.quizCfg.inQuizOption);
16
15
  // オプション定義を取得
17
16
  // const optionDef = inQuizOption.dInQuizOption.find((o) => o.type === type);
18
17
  // if (!optionDef) {
@@ -20,19 +19,19 @@ var QuizOptionItem = function (_a) {
20
19
  // return null; // 無効なタイプの場合、描画しない
21
20
  // }
22
21
  // const { options } = optionDef;
23
- var selectedValue = storeOption[type];
24
- var selectedIndex = options.findIndex(function (o) { return o === selectedValue; });
25
- var handleSelect = function (value) {
26
- dispatch(stores_1.cfgAction.selectInQuizOption({ key: type, value: value }));
22
+ const selectedValue = storeOption[type];
23
+ const selectedIndex = options.findIndex((o) => o === selectedValue);
24
+ const handleSelect = (value) => {
25
+ dispatch(stores_1.cfgAction.selectInQuizOption({ key: type, value }));
27
26
  };
28
27
  return (<react_native_1.View style={styles.container}>
29
28
  <common_1.MyText color="text" fsize="md" style={styles.title}>
30
- {t("quiz.option.".concat(type, ".title"))}
29
+ {t(`quiz.option.${type}.title`)}
31
30
  </common_1.MyText>
32
- <common_1.OptionSelector options={options.map(function (o) { return t("quiz.option.".concat(type, ".").concat(o)); })} selected={selectedIndex} onSelect={function (index) { return handleSelect(options[index]); }}/>
31
+ <common_1.OptionSelector options={options.map((o) => t(`quiz.option.${type}.${o}`))} selected={selectedIndex} onSelect={(index) => handleSelect(options[index])}/>
33
32
  </react_native_1.View>);
34
33
  };
35
- var styles = react_native_1.StyleSheet.create({
34
+ const styles = react_native_1.StyleSheet.create({
36
35
  container: {
37
36
  width: "100%",
38
37
  marginBottom: 20,
@@ -26,18 +26,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- var react_1 = __importStar(require("react"));
30
- var react_native_1 = require("react-native");
31
- var common_1 = require("@nakamura-123/common");
32
- var SelectYearRange_1 = __importDefault(require("../SelectRange/SelectYearRange"));
33
- var Range = function (_a) {
34
- var t = (0, common_1.useDrillTranslation)().t;
35
- var _b = (0, react_1.useState)(false), isRangeModal = _b[0], setIsRangeModal = _b[1];
36
- var onPress = function () {
29
+ const react_1 = __importStar(require("react"));
30
+ const react_native_1 = require("react-native");
31
+ const common_1 = require("@nakamura-123/common");
32
+ const SelectYearRange_1 = __importDefault(require("../SelectRange/SelectYearRange"));
33
+ const Range = ({}) => {
34
+ const { t } = (0, common_1.useDrillTranslation)();
35
+ const [isRangeModal, setIsRangeModal] = (0, react_1.useState)(false);
36
+ const onPress = () => {
37
37
  setIsRangeModal(true);
38
38
  };
39
39
  return (<react_native_1.View>
40
- <SelectYearRange_1.default isVisible={isRangeModal} onClose={function () { return setIsRangeModal(false); }}/>
40
+ <SelectYearRange_1.default isVisible={isRangeModal} onClose={() => setIsRangeModal(false)}/>
41
41
  <common_1.SettingBtn icon="check-circle" title={t("basic.setting.range")} onPress={onPress}/>
42
42
  </react_native_1.View>);
43
43
  };
@@ -23,20 +23,20 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- var react_1 = __importStar(require("react"));
27
- var react_native_1 = require("react-native");
28
- var common_1 = require("@nakamura-123/common");
29
- var lib_1 = require("@nakamura-123/lib");
30
- var react_redux_1 = require("react-redux");
31
- var stores_1 = require("@nakamura-123/stores");
32
- var TransBtn = function (_a) {
33
- var _b = (0, react_1.useState)(false), modalVisible = _b[0], setModalVisible = _b[1];
34
- var dispatch = (0, react_redux_1.useDispatch)();
35
- var i18n = (0, common_1.useDrillTranslation)().i18n;
36
- var handlePress = function () {
26
+ const react_1 = __importStar(require("react"));
27
+ const react_native_1 = require("react-native");
28
+ const common_1 = require("@nakamura-123/common");
29
+ const lib_1 = require("@nakamura-123/lib");
30
+ const react_redux_1 = require("react-redux");
31
+ const stores_1 = require("@nakamura-123/stores");
32
+ const TransBtn = ({}) => {
33
+ const [modalVisible, setModalVisible] = (0, react_1.useState)(false);
34
+ const dispatch = (0, react_redux_1.useDispatch)();
35
+ const { i18n } = (0, common_1.useDrillTranslation)();
36
+ const handlePress = () => {
37
37
  setModalVisible(true);
38
38
  };
39
- var handleLanguageSelect = function (language) {
39
+ const handleLanguageSelect = (language) => {
40
40
  i18n === null || i18n === void 0 ? void 0 : i18n.changeLanguage(language); // 言語を切り替える
41
41
  dispatch({ type: "setting/setLanguage", payload: language });
42
42
  dispatch(stores_1.settingStorage.saveSetting());
@@ -44,19 +44,19 @@ var TransBtn = function (_a) {
44
44
  };
45
45
  return (<react_native_1.View style={styles.container}>
46
46
  <common_1.IconInCircle name="language" cStyle={styles.button} onPress={handlePress} circleColor="dkBeige" iconColor="white"/>
47
- <react_native_1.Modal transparent={true} visible={modalVisible} animationType="slide" onRequestClose={function () { return setModalVisible(false); }}>
47
+ <react_native_1.Modal transparent={true} visible={modalVisible} animationType="slide" onRequestClose={() => setModalVisible(false)}>
48
48
  <react_native_1.View style={styles.modalContainer}>
49
49
  <react_native_1.View style={styles.modalContent}>
50
50
  <react_native_1.Text style={styles.modalTitle}>Select Language</react_native_1.Text>
51
- <react_native_1.TouchableOpacity style={styles.modalButton} onPress={function () { return handleLanguageSelect("en"); }} // 英語を選択
51
+ <react_native_1.TouchableOpacity style={styles.modalButton} onPress={() => handleLanguageSelect("en")} // 英語を選択
52
52
  >
53
53
  <react_native_1.Text style={styles.modalButtonText}>English</react_native_1.Text>
54
54
  </react_native_1.TouchableOpacity>
55
- <react_native_1.TouchableOpacity style={styles.modalButton} onPress={function () { return handleLanguageSelect("ja"); }} // 日本語を選択
55
+ <react_native_1.TouchableOpacity style={styles.modalButton} onPress={() => handleLanguageSelect("ja")} // 日本語を選択
56
56
  >
57
57
  <react_native_1.Text style={styles.modalButtonText}>Japanese</react_native_1.Text>
58
58
  </react_native_1.TouchableOpacity>
59
- <react_native_1.TouchableOpacity style={styles.modalCloseButton} onPress={function () { return setModalVisible(false); }}>
59
+ <react_native_1.TouchableOpacity style={styles.modalCloseButton} onPress={() => setModalVisible(false)}>
60
60
  <react_native_1.Text style={styles.modalCloseButtonText}>Close</react_native_1.Text>
61
61
  </react_native_1.TouchableOpacity>
62
62
  </react_native_1.View>
@@ -64,7 +64,7 @@ var TransBtn = function (_a) {
64
64
  </react_native_1.Modal>
65
65
  </react_native_1.View>);
66
66
  };
67
- var styles = react_native_1.StyleSheet.create({
67
+ const styles = react_native_1.StyleSheet.create({
68
68
  container: { marginRight: 10 },
69
69
  button: {
70
70
  // borderWidth: 3,
@@ -23,16 +23,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- var react_1 = __importStar(require("react"));
27
- var react_native_1 = require("react-native");
28
- var Animatable = __importStar(require("react-native-animatable"));
29
- var lib_1 = require("@nakamura-123/lib");
30
- var TabAnimeView = function (_a) {
31
- var children = _a.children, activeIndex = _a.activeIndex;
26
+ const react_1 = __importStar(require("react"));
27
+ const react_native_1 = require("react-native");
28
+ const Animatable = __importStar(require("react-native-animatable"));
29
+ const lib_1 = require("@nakamura-123/lib");
30
+ const TabAnimeView = ({ children, activeIndex, }) => {
32
31
  // アニメーション
33
- var preActiveIndex = (0, react_1.useRef)(activeIndex);
34
- var _b = (0, react_1.useState)("slideInRight"), animationDirection = _b[0], setAnimationDirection = _b[1];
35
- (0, react_1.useEffect)(function () {
32
+ const preActiveIndex = (0, react_1.useRef)(activeIndex);
33
+ const [animationDirection, setAnimationDirection] = (0, react_1.useState)("slideInRight");
34
+ (0, react_1.useEffect)(() => {
36
35
  if (activeIndex > preActiveIndex.current)
37
36
  setAnimationDirection("fadeSlideInRight");
38
37
  else if (activeIndex < preActiveIndex.current)
@@ -48,7 +47,7 @@ Animatable.initializeRegistryWithDefinitions({
48
47
  fadeSlideInRight: lib_1.fadeSlideIn.right,
49
48
  fadeSlideInLeft: lib_1.fadeSlideIn.left,
50
49
  });
51
- var styles = react_native_1.StyleSheet.create({
50
+ const styles = react_native_1.StyleSheet.create({
52
51
  container: {
53
52
  flexGrow: 1,
54
53
  justifyContent: "center",
@@ -3,29 +3,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
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 tagFncD_1 = require("../functions/tagFncD");
10
- var Tag5s = function (_a) {
11
- var tags = _a.tags;
6
+ const react_1 = __importDefault(require("react"));
7
+ const react_native_1 = require("react-native");
8
+ const common_1 = require("@nakamura-123/common");
9
+ const tagFncD_1 = require("../functions/tagFncD");
10
+ const Tag5s = ({ tags }) => {
12
11
  // Empty function body
13
- var cntTxt = tags.length + "問";
14
- var tagInfos = (0, tagFncD_1.countTagsByLevel)(tags);
12
+ const cntTxt = tags.length + "問";
13
+ const tagInfos = (0, tagFncD_1.countTagsByLevel)(tags);
15
14
  return (<react_native_1.View style={styles.container}>
16
15
  <react_native_1.View>
17
16
  <common_1.MyText style={styles.cntTxt}>{cntTxt}</common_1.MyText>
18
17
  </react_native_1.View>
19
- {tagInfos.map(function (_a, i) {
20
- var cnt = _a.cnt, color = _a.color;
21
- return (<react_native_1.View key={i} style={styles.tag}>
18
+ {tagInfos.map(({ cnt, color }, i) => (<react_native_1.View key={i} style={styles.tag}>
22
19
  <common_1.Icon5 name="tag" size={10} color={color}/>
23
20
  <common_1.MyText style={styles.tagTxt}>{cnt}</common_1.MyText>
24
- </react_native_1.View>);
25
- })}
21
+ </react_native_1.View>))}
26
22
  </react_native_1.View>);
27
23
  };
28
- var styles = react_native_1.StyleSheet.create({
24
+ const styles = react_native_1.StyleSheet.create({
29
25
  container: {
30
26
  flexDirection: "row",
31
27
  justifyContent: "space-between",