@nakamura-123/pages 0.1.28 → 0.1.29

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.
@@ -85,8 +85,11 @@ var TestComponent = function (_a) {
85
85
  dispatch({ type: "quiz/setQuizList", payload: quizList });
86
86
  navigation.navigate("Quiz");
87
87
  };
88
+ // カードに表示する問題数
89
+ var ONEYEAR_TEST_NUMBER = 901;
90
+ var displayQuizCnt = quizCnt === ONEYEAR_TEST_NUMBER ? "1回分" : quizCnt + "問";
88
91
  return (<react_native_1.View style={{ marginBottom: 40 }}>
89
- <common_1.RectangleCard title={testTitle} left={<common_1.IconInCircle name={icon} size={25}/>} bottom={<Paw5s_1.default levels={levels} quizCnt={quizCnt}/>} onPress={function () { return handleStart(); }} color="red"/>
92
+ <common_1.RectangleCard title={testTitle} left={<common_1.IconInCircle name={icon} size={25}/>} bottom={<Paw5s_1.default levels={levels} quizCnt={displayQuizCnt}/>} onPress={function () { return handleStart(); }} color="red"/>
90
93
  </react_native_1.View>);
91
94
  };
92
95
  exports.default = TestComponent;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  interface Paw4sProps {
3
3
  levels: string[];
4
- quizCnt: number;
4
+ quizCnt: string;
5
5
  }
6
6
  declare const Paw5s: React.FC<Paw4sProps>;
7
7
  export default Paw5s;
@@ -10,11 +10,10 @@ var testFnc_1 = require("../../functions/testFnc");
10
10
  var Paw5s = function (_a) {
11
11
  var levels = _a.levels, quizCnt = _a.quizCnt;
12
12
  // Empty function body
13
- var cntTxt = quizCnt + "問";
14
13
  var levelInfos = (0, testFnc_1.countByLevel)(levels);
15
14
  return (<react_native_1.View style={styles.container}>
16
15
  <react_native_1.View>
17
- <common_1.MyText style={styles.cntTxt}>{cntTxt}</common_1.MyText>
16
+ <common_1.MyText style={styles.cntTxt}>{quizCnt}</common_1.MyText>
18
17
  </react_native_1.View>
19
18
  {levelInfos.map(function (_a, i) {
20
19
  var cnt = _a.cnt, color = _a.color;
@@ -1,7 +1,7 @@
1
1
  import { Storage } from "@nakamura-123/types";
2
2
  export declare const coinCheckFnc: import("@reduxjs/toolkit").AsyncThunk<void, string, {
3
3
  state?: unknown;
4
- dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
4
+ dispatch?: import("redux").Dispatch;
5
5
  extra?: unknown;
6
6
  rejectValue?: unknown;
7
7
  serializedErrorType?: unknown;
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -42,26 +42,24 @@ var toolkit_1 = require("@reduxjs/toolkit");
42
42
  var CoinFnc_1 = require("./CoinFnc");
43
43
  var stores_1 = require("@nakamura-123/stores");
44
44
  // 00.メイン関数
45
- exports.coinCheckFnc = (0, toolkit_1.createAsyncThunk)("coin/check", function (allFreeId, _a) {
46
- var dispatch = _a.dispatch;
47
- return __awaiter(void 0, void 0, void 0, function () {
48
- var receipts, isExistedId;
49
- return __generator(this, function (_b) {
50
- switch (_b.label) {
51
- case 0: return [4 /*yield*/, (0, CoinFnc_1.restorePurchases)(dispatch, false)];
52
- case 1:
53
- receipts = _b.sent();
54
- isExistedId = hasPurchasedItems(receipts, allFreeId);
55
- if (!isExistedId) {
56
- // 返金などをされていて、flaseの場合、このIDのアイテムを削除し、store更新
57
- stores_1.coinStorage.removePurchasedItem(allFreeId);
58
- dispatch({ type: "setting/updateAllFreeState", payload: "none" });
59
- }
60
- return [2 /*return*/];
61
- }
62
- });
45
+ exports.coinCheckFnc = (0, toolkit_1.createAsyncThunk)("coin/check", function (allFreeId_1, _a) { return __awaiter(void 0, [allFreeId_1, _a], void 0, function (allFreeId, _b) {
46
+ var receipts, isExistedId;
47
+ var dispatch = _b.dispatch;
48
+ return __generator(this, function (_c) {
49
+ switch (_c.label) {
50
+ case 0: return [4 /*yield*/, (0, CoinFnc_1.restorePurchases)(dispatch, false)];
51
+ case 1:
52
+ receipts = _c.sent();
53
+ isExistedId = hasPurchasedItems(receipts, allFreeId);
54
+ if (!isExistedId) {
55
+ // 返金などをされていて、flaseの場合、このIDのアイテムを削除し、store更新
56
+ stores_1.coinStorage.removePurchasedItem(allFreeId);
57
+ dispatch({ type: "setting/updateAllFreeState", payload: "none" });
58
+ }
59
+ return [2 /*return*/];
60
+ }
63
61
  });
64
- });
62
+ }); });
65
63
  // 91. 復元を行い、チェックが必要か判定
66
64
  var isCheckRequired = function (allFreeState, lastCheckedDate, isCompoleteFree) {
67
65
  if (isCompoleteFree)
@@ -1,4 +1,4 @@
1
- import RNIap, { Product, ProductPurchase } from "react-native-iap";
1
+ import RNIap, { ProductPurchase } from "react-native-iap";
2
2
  import { Storage } from "@nakamura-123/types";
3
3
  export declare const initializeIAP: (paymentItems: string[] | undefined, setProducts: (products: RNIap.Product[]) => void, setLoading: (loading: boolean) => void) => Promise<void>;
4
4
  export declare const handlePurchase: (productId: string, dispatch: (action: any) => void) => Promise<ProductPurchase | null>;
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -10,11 +10,31 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
15
35
  };
16
36
  Object.defineProperty(exports, "__esModule", { value: true });
17
- var react_1 = __importDefault(require("react"));
37
+ var react_1 = __importStar(require("react"));
18
38
  var react_native_1 = require("react-native");
19
39
  var react_i18next_1 = require("react-i18next");
20
40
  var react_redux_1 = require("react-redux");
@@ -26,6 +46,7 @@ var QuizOption = function (_a) {
26
46
  // 設定の選択
27
47
  var dispatch = (0, react_redux_1.useDispatch)();
28
48
  var selected = (0, react_redux_1.useSelector)(function (state) { return state.quiz.selected; });
49
+ var noShuffle = selected.lesson.noShuffle;
29
50
  var system = selected.system || "drill";
30
51
  var storeOption = (0, react_redux_1.useSelector)(function (state) { return state.quizCfg.startCfg.option; });
31
52
  var handleSelect = function (type, value) {
@@ -33,6 +54,10 @@ var QuizOption = function (_a) {
33
54
  };
34
55
  var jQuizStartOption = removeOptionByValue(selected.system || "drill");
35
56
  var quizOption = system === "drill" ? lib_1.startOption.dQuizStartOption : jQuizStartOption;
57
+ (0, react_1.useEffect)(function () {
58
+ if (noShuffle)
59
+ dispatch(stores_1.cfgAction.selectOption({ key: "isShuffle", value: false }));
60
+ }, [noShuffle]);
36
61
  return (<react_native_1.View style={styles.container}>
37
62
  <common_1.HelpMark name="quizOption.tag"/>
38
63
  {quizOption.map(function (O, i) {
@@ -34,7 +34,7 @@ var emptyCardInfo = {
34
34
  description: "",
35
35
  };
36
36
  var AdCard = function () {
37
- var infoSetting = (0, react_redux_1.useSelector)(function (state) { return state.app.appSetting.setting.info; });
37
+ var infoSetting = (0, react_redux_1.useSelector)(function (state) { return state.app.appSetting.setting.info; }) || {};
38
38
  var adCardInfos = (0, react_redux_1.useSelector)(function (state) { return state.setting.info.adCard; });
39
39
  var _a = (0, react_1.useState)(false), isVisible = _a[0], setIsVisible = _a[1];
40
40
  var _b = (0, react_1.useState)(emptyCardInfo), cardInfo = _b[0], setCardInfo = _b[1];
@@ -1,18 +1,11 @@
1
- import { QuizInitial } from "@nakamura-123/stores";
1
+ import { CfgInitial, QuizInitial } from "@nakamura-123/stores";
2
2
  import { Store } from "@nakamura-123/types";
3
3
  import { QRD } from "../types/filterType";
4
+ type startCfg = CfgInitial["startCfg"];
4
5
  type Selected = QuizInitial["selected"];
5
- export declare const getBasicQuizList: (QuestionDB: QRD, startCfg: {
6
- tags: import("@nakamura-123/types/dist/types/libType").LevelNames[];
7
- option: import("@nakamura-123/lib/dist/config/startOption").StoreStartOptions;
8
- outOfYearRange: number[];
9
- }, selected: Selected) => Store.DQInStore[];
6
+ export declare const getBasicQuizList: (QuestionDB: QRD, startCfg: startCfg, selected: Selected) => Store.DQInStore[];
10
7
  export declare const getMiniTestQuestions: (QuestionDB: QRD, subjectType: "unit" | "year", key: number, cnt: number, outOfYearRange: number[]) => Store.DQInStore[];
11
8
  export declare const getTestQuestions: (QuestionDB: QRD, cnt: number) => Store.DQInStore[];
12
9
  export declare const getTestQuestionsByUnit: (QuestionDB: QRD, cnt: number, unit: number[]) => Store.DQInStore[];
13
- export declare const getBootQuestions: (QuestionDB: QRD, startCfg: {
14
- tags: import("@nakamura-123/types/dist/types/libType").LevelNames[];
15
- option: import("@nakamura-123/lib/dist/config/startOption").StoreStartOptions;
16
- outOfYearRange: number[];
17
- }, outOfUnitRange: number[], outOfYearRange: number[]) => Store.DQInStore[];
10
+ export declare const getBootQuestions: (QuestionDB: QRD, startCfg: startCfg, outOfUnitRange: number[], outOfYearRange: number[]) => Store.DQInStore[];
18
11
  export {};
@@ -38,14 +38,19 @@ exports.getBasicQuizList = getBasicQuizList;
38
38
  // ミニテストの問題を取得
39
39
  var getMiniTestQuestions = function (QuestionDB, subjectType, key, cnt, outOfYearRange) {
40
40
  var questions = QuestionDB.filtered("FALSEPREDICATE");
41
+ var isOneYearMode = cnt === 901;
42
+ var isShuffle = isOneYearMode ? false : true;
43
+ console.log(isOneYearMode, "isOneYearMode");
41
44
  if (subjectType === "unit") {
42
45
  questions = (0, questionFilterD_1.getUnitQuestions)(QuestionDB, key);
43
46
  questions = (0, questionFilterD_1.filterByOutOfYearRange)(questions, outOfYearRange);
47
+ if (isOneYearMode)
48
+ questions = getMiniTestOneYearQuestions(questions);
44
49
  }
45
50
  else if (subjectType === "year")
46
51
  questions = (0, questionFilterD_1.getYearQuestions)(QuestionDB, key);
47
52
  var formatted = (0, questionFormatD_1.formatQuestions)(questions);
48
- return (0, questionFilterD_1.commonFilter)(formatted, cnt, true);
53
+ return (0, questionFilterD_1.commonFilter)(formatted, cnt, isShuffle);
49
54
  };
50
55
  exports.getMiniTestQuestions = getMiniTestQuestions;
51
56
  // 模擬試験の開始(Randam)
@@ -78,3 +83,13 @@ var getBootQuestions = function (QuestionDB, startCfg, outOfUnitRange, outOfYear
78
83
  return (0, questionFilterD_1.commonFilter)(formatted, quizCnt, isShuffle);
79
84
  };
80
85
  exports.getBootQuestions = getBootQuestions;
86
+ // 特殊ミニテストモードのクイズ取得(1回分の試験だけを取得)
87
+ var getMiniTestOneYearQuestions = function (questions) {
88
+ var _a;
89
+ if (((_a = questions.isEmpty) === null || _a === void 0 ? void 0 : _a.call(questions)) || questions.length === 0)
90
+ return questions;
91
+ // ランダムに 1 問 pick → その yearId を採用(map も shuffle も不要)
92
+ var randomIndex = Math.floor(Math.random() * questions.length);
93
+ var yearId = questions[randomIndex].yearId;
94
+ return questions.filtered("yearId == $0", yearId);
95
+ };
@@ -1,14 +1,13 @@
1
+ import { CfgInitial } from "@nakamura-123/stores";
1
2
  import { Store } from "@nakamura-123/types";
2
3
  import { QRD } from "../types/filterType";
4
+ type startCfg = CfgInitial["startCfg"];
3
5
  export declare const getUnitQuestions: (questions: QRD, unitId: number) => QRD;
4
6
  export declare const getSubUnitQuestions: (questions: QRD, unitId: number, subUnitId: number) => QRD;
5
7
  export declare const getYearQuestions: (questions: QRD, year: number) => QRD;
6
8
  export declare const getSubYearQuestions: (questions: QRD, year: number, key: number) => QRD;
7
9
  export declare const filterByOutOfYearRange: (questions: QRD, outOfYearRange: number[]) => QRD;
8
10
  export declare const filterByOutOfUnitRange: (questions: QRD, outOfUnitRange: number[]) => QRD;
9
- export declare const filterByTags: (questions: QRD, startCfg: {
10
- tags: import("@nakamura-123/types/dist/types/libType").LevelNames[];
11
- option: import("@nakamura-123/lib/dist/config/startOption").StoreStartOptions;
12
- outOfYearRange: number[];
13
- }) => QRD;
11
+ export declare const filterByTags: (questions: QRD, startCfg: startCfg) => QRD;
14
12
  export declare const commonFilter: (questions: Store.DQInStore[], quizCnt: number, isShuffle: boolean) => Store.DQInStore[];
13
+ export {};
@@ -1,10 +1,9 @@
1
1
  import { QRJ } from "../types/filterType";
2
2
  import { Db, JStore } from "@nakamura-123/types";
3
+ import { CfgInitial } from "@nakamura-123/stores";
4
+ type startCfg = CfgInitial["startCfg"];
3
5
  export declare const getUnitQuestionsJ: (questions: QRJ, unitId: number) => QRJ;
4
6
  export declare const getSubUnitQuestionsJ: (questions: QRJ, unitId: number, subUnitId: number) => QRJ;
5
- export declare const filterByTagsJ: (questions: QRJ, startCfg: {
6
- tags: import("@nakamura-123/types/dist/types/libType").LevelNames[];
7
- option: import("@nakamura-123/lib/dist/config/startOption").StoreStartOptions;
8
- outOfYearRange: number[];
9
- }, tagName: Db.SubjectTag) => QRJ;
7
+ export declare const filterByTagsJ: (questions: QRJ, startCfg: startCfg, tagName: Db.SubjectTag) => QRJ;
10
8
  export declare const commonFilterJ: (questions: JStore.JQInStore[], quizCnt: number, isShuffle: boolean) => JStore.JQInStore[];
9
+ export {};
@@ -1,7 +1,14 @@
1
1
  "use strict";
2
2
  // helpers.ts
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.countTagsByLevelSelected = exports.getCategoryRate = exports.countTagsByLevel = exports.getCompletedTagRate = exports.getBootTagLevelCnts = exports.getSubTagLevelCnts = exports.getYearSubTagLevelCnts = exports.getUnitSubTagLevelCnts = exports.getCategoryTagLevelCntsD = void 0;
4
+ exports.getBootTagLevelCnts = exports.getSubTagLevelCnts = void 0;
5
+ exports.getCategoryTagLevelCntsD = getCategoryTagLevelCntsD;
6
+ exports.getUnitSubTagLevelCnts = getUnitSubTagLevelCnts;
7
+ exports.getYearSubTagLevelCnts = getYearSubTagLevelCnts;
8
+ exports.getCompletedTagRate = getCompletedTagRate;
9
+ exports.countTagsByLevel = countTagsByLevel;
10
+ exports.getCategoryRate = getCategoryRate;
11
+ exports.countTagsByLevelSelected = countTagsByLevelSelected;
5
12
  var lib_1 = require("@nakamura-123/lib");
6
13
  var questionFilterD_1 = require("./questionFilterD");
7
14
  // 01_大単元のTagのレベルを取得
@@ -16,7 +23,6 @@ function getCategoryTagLevelCntsD(QuestionDB, category, type, outOfYearRange) {
16
23
  : (0, questionFilterD_1.getYearQuestions)(returnQuestions, category);
17
24
  return returnQuestions.map(function (question) { return question.tag.level; });
18
25
  }
19
- exports.getCategoryTagLevelCntsD = getCategoryTagLevelCntsD;
20
26
  // 02_Unitの小単元のTagのレベルを取得
21
27
  function getUnitSubTagLevelCnts(QuestionDB, unitId, subUnitId, outOfYearRange) {
22
28
  var returnQuestions = QuestionDB;
@@ -26,12 +32,10 @@ function getUnitSubTagLevelCnts(QuestionDB, unitId, subUnitId, outOfYearRange) {
26
32
  returnQuestions = (0, questionFilterD_1.getSubUnitQuestions)(returnQuestions, unitId, subUnitId);
27
33
  return returnQuestions.map(function (question) { return question.tag.level; });
28
34
  }
29
- exports.getUnitSubTagLevelCnts = getUnitSubTagLevelCnts;
30
35
  // 03_Yearの小単元のTagのレベルを取得
31
36
  function getYearSubTagLevelCnts(QuestionDB, year, key) {
32
37
  return (0, questionFilterD_1.getSubYearQuestions)(QuestionDB, year, key).map(function (question) { return question.tag.level; });
33
38
  }
34
- exports.getYearSubTagLevelCnts = getYearSubTagLevelCnts;
35
39
  // 11_5Tagのレベルを取得。Unit(大・小単元) 、Year(大・小単元) どちらでも可。
36
40
  var getSubTagLevelCnts = function (QuestionDB, selected, outOfYearRange) {
37
41
  // QuestionDB をフィルタリング(共通処理)
@@ -78,7 +82,6 @@ function getCompletedTagRate(tags, onlyCnt) {
78
82
  var completedTagRate = Math.round((completedTagCnt / tags.length) * 100);
79
83
  return completedTagRate;
80
84
  }
81
- exports.getCompletedTagRate = getCompletedTagRate;
82
85
  // 22_タグをレベル別に集計し、色と数を返す
83
86
  function countTagsByLevel(tags) {
84
87
  var tagInfos = lib_1.tagLevels.map(function (_a) {
@@ -88,7 +91,6 @@ function countTagsByLevel(tags) {
88
91
  });
89
92
  return tagInfos;
90
93
  }
91
- exports.countTagsByLevel = countTagsByLevel;
92
94
  // 23_タグをレベルごとに点数化し、到達度を%で返す
93
95
  function getCategoryRate(tags) {
94
96
  var tagCnt = tags.length;
@@ -96,7 +98,6 @@ function getCategoryRate(tags) {
96
98
  var tagPoint = tags.reduce(function (acc, tag) { return acc + POINT_LIST[tag]; }, 0);
97
99
  return (tagPoint / (tagCnt * 5)) * 100;
98
100
  }
99
- exports.getCategoryRate = getCategoryRate;
100
101
  // タグをレベル別に集計し、色と数を返す。また、選択すると色が変わる
101
102
  function countTagsByLevelSelected(tags, tagActives) {
102
103
  var tagInfos = lib_1.tagLevels.map(function (_a) {
@@ -111,4 +112,3 @@ function countTagsByLevelSelected(tags, tagActives) {
111
112
  });
112
113
  return tagInfos;
113
114
  }
114
- exports.countTagsByLevelSelected = countTagsByLevelSelected;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTagNameFilterJ = exports.getSubTagLevelCntsJ = exports.getUnitSubTagLevelCntsJ = exports.getCategoryTagLevelCntsJ = void 0;
3
+ exports.getTagNameFilterJ = exports.getSubTagLevelCntsJ = void 0;
4
+ exports.getCategoryTagLevelCntsJ = getCategoryTagLevelCntsJ;
5
+ exports.getUnitSubTagLevelCntsJ = getUnitSubTagLevelCntsJ;
4
6
  var questionFilterJ_1 = require("./questionFilterJ");
5
7
  // 01_大単元のTagのレベルを取得
6
8
  function getCategoryTagLevelCntsJ(QuestionDB, category, tag) {
@@ -8,7 +10,6 @@ function getCategoryTagLevelCntsJ(QuestionDB, category, tag) {
8
10
  var returnQuestions = (0, questionFilterJ_1.getUnitQuestionsJ)(QuestionDB, category);
9
11
  return returnQuestions.map(function (question) { return question[tag].level; });
10
12
  }
11
- exports.getCategoryTagLevelCntsJ = getCategoryTagLevelCntsJ;
12
13
  // 02_Unitの小単元のTagのレベルを取得
13
14
  function getUnitSubTagLevelCntsJ(QuestionDB, unitId, subUnitId, tag) {
14
15
  if (tag === void 0) { tag = "basicTag"; }
@@ -16,7 +17,6 @@ function getUnitSubTagLevelCntsJ(QuestionDB, unitId, subUnitId, tag) {
16
17
  returnQuestions = (0, questionFilterJ_1.getSubUnitQuestionsJ)(returnQuestions, unitId, subUnitId);
17
18
  return returnQuestions.map(function (question) { return question[tag].level; });
18
19
  }
19
- exports.getUnitSubTagLevelCntsJ = getUnitSubTagLevelCntsJ;
20
20
  // 11_5Tagのレベルを取得。Unit(大・小単元) 、Year(大・小単元) どちらでも可。
21
21
  var getSubTagLevelCntsJ = function (QuestionDB, selected) {
22
22
  // QuestionDB をフィルタリング(共通処理)
@@ -32,8 +32,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  var __generator = (this && this.__generator) || function (thisArg, body) {
35
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
36
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
37
  function verb(n) { return function (v) { return step([n, v]); }; }
38
38
  function step(op) {
39
39
  if (f) throw new TypeError("Generator is already executing.");
@@ -32,8 +32,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  var __generator = (this && this.__generator) || function (thisArg, body) {
35
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
36
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
37
  function verb(n) { return function (v) { return step([n, v]); }; }
38
38
  function step(op) {
39
39
  if (f) throw new TypeError("Generator is already executing.");
@@ -86,7 +86,7 @@ var MenuRectangle = function (_a) {
86
86
  };
87
87
  return (<common_1.RectangleCard title={title} note={note} left={<common_1.IconInCircle name={icon} size={25}/>} onPress={handlePress} color={color} outerStyle={{ marginBottom: 20 }}/>);
88
88
  };
89
- var LOAD_OLD_MSG = " 旧システムのデータ引き継ぎを実施いたします。ふせんデータや模擬試験の成績など、可能な限りデータを移行いたしますが、仕様上一部移行ができない項目があります。あらかじめご了承ください。\n\n なお、引き継ぎをキャンセルされた場合でも、設定ページより再度手続きを行うことが可能です。";
89
+ var LOAD_OLD_MSG = " 旧システムのデータ引き継ぎを実施いたします。ふせんデータや模擬試験の成績など、可能な限りデータを移行いたしますが、仕様上一部移行ができない項目があります。あらかじめご了承ください。\n\n なお、引き継ぎをキャンセルされた場合でも、設定ページより再度操作を行うことが可能です。";
90
90
  var HomePage = function (_a) {
91
91
  var menuLists = _a.menuLists, navigation = _a.navigation;
92
92
  var dispatch = (0, react_redux_1.useDispatch)();
@@ -115,7 +115,7 @@ var HomePage = function (_a) {
115
115
  case 0: return [4 /*yield*/, (0, oldStorageFnc_1.existOldData)()];
116
116
  case 1:
117
117
  existOldMarkData = _a.sent();
118
- if (existOldMarkData && oldInfo.testInfo.length > 0)
118
+ if (existOldMarkData && oldInfo.testInfo)
119
119
  (0, oldStorageFnc_1.handleOldData)(realm, oldInfo, dispatch, t, LOAD_OLD_MSG);
120
120
  return [2 /*return*/];
121
121
  }
@@ -33,7 +33,7 @@ var common_1 = require("@nakamura-123/common");
33
33
  var PasswardModal_1 = __importDefault(require("../component/OnlineInput/PasswardModal"));
34
34
  var OnlineSavedList_1 = __importDefault(require("../component/OnlineInput/OnlineSavedList"));
35
35
  var PasswordIdModal_1 = __importDefault(require("../component/OnlineInput/PasswordIdModal"));
36
- var MSG = " 当アプリのデータはお使いの端末にのみ保存されております。そのため、端末の紛失や機種変更などの際に、他の端末へデータを引き継ぐことはできません。そこで、入力されたデータのみバックアップを取ることができる仕組みを構築いたしました。\n 万が一に備え、定期的にバックアップを行っていただくことを推奨いたします。";
36
+ var MSG = " 当アプリのデータは、すべてお使いの端末にのみ保存されています。そのため、端末の紛失や機種変更などがあった場合、別の端末へのデータ引き継ぎはできません。\n そこで、入力した記述データのみをバックアップできる機能を用意いたしました。 万が一に備えて、定期的なバックアップの実施をおすすめいたします。\n なお、バックアップの対象は記述データのみであり、成績データは保存されませんので、あらかじめご了承ください。";
37
37
  var WARN = "※ IDおよびパスワードは、必ずスクリーンショットなどで保存していただきますようお願い申し上げます。";
38
38
  var OnlineInputPage = function () {
39
39
  var _a = (0, react_1.useState)(false), isVisible = _a[0], setVisible = _a[1];
@@ -32,8 +32,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  var __generator = (this && this.__generator) || function (thisArg, body) {
35
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
36
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
37
  function verb(n) { return function (v) { return step([n, v]); }; }
38
38
  function step(op) {
39
39
  if (f) throw new TypeError("Generator is already executing.");
@@ -55,7 +55,7 @@ var SettingPage = function (_a) {
55
55
  icon: "exchange-alt",
56
56
  color: "yellow",
57
57
  handlePress: function () {
58
- if (oldInfo.testInfo.length === 0)
58
+ if (!oldInfo.testInfo)
59
59
  react_native_1.Alert.alert(t("setting.oldSystem.error"), t("setting.oldSystem.errorMsg"));
60
60
  (0, oldStorageFnc_1.handleOldData)(realm, oldInfo, dispatch, t);
61
61
  },
@@ -85,7 +85,7 @@ var TestPage = react_1.default.memo(function (_a) {
85
85
  <AverageBar_1.default percent={average} label={t("test.barLabel")}/>
86
86
  <BarChartContainer_1.default subjectName={subject.name} TestDB={TestDB}/>
87
87
  <react_native_1.View style={styles.test}>
88
- <common_1.RectangleCard title={title} color="red" left={<common_1.IconInCircle name={iconName} circleColor="ltRed" size={25}/>} bottom={<Paw5s_1.default levels={cntByLevels} quizCnt={quizCnt}/>} onPress={function () { return handleStart(); }}/>
88
+ <common_1.RectangleCard title={title} color="red" left={<common_1.IconInCircle name={iconName} circleColor="ltRed" size={25}/>} bottom={<Paw5s_1.default levels={cntByLevels} quizCnt={quizCnt + "問"}/>} onPress={function () { return handleStart(); }}/>
89
89
  </react_native_1.View>
90
90
  <common_1.RoundRectangleIcon title={t("test.showHistory")} onPress={function () {
91
91
  return navigation.navigate("History", { info: historyParams });
@@ -50,10 +50,10 @@ var QuizContentDrill = function (_a) {
50
50
  return (<react_native_gesture_handler_1.ScrollView contentContainerStyle={styles.container} ref={scrollRef} showsVerticalScrollIndicator={false}>
51
51
  <PageContainerWrap_1.default scrollViewRef={scrollRef} navigation={navigation}>
52
52
  <Title_1.default />
53
+ <Question_1.default navigation={navigation}/>
53
54
  <Guide_1.default name={guideName} isVisible={showSwipe1Guide || showSwipe2Guide}>
54
55
  <react_native_1.View></react_native_1.View>
55
56
  </Guide_1.default>
56
- <Question_1.default navigation={navigation}/>
57
57
  <Answer_1.default />
58
58
  {isCheck && !isResult && isNotInput && <CorrectedBar_1.default />}
59
59
  {isNotQuiz && <Explain_1.default navigation={navigation}/>}
@@ -18,6 +18,7 @@ var NormalExplain = function (_a) {
18
18
  var question = (0, quizHook_1.useQuestionDataD)();
19
19
  var rImgs = (0, react_redux_1.useSelector)(function (state) { return state.app.imgs.rImgs; });
20
20
  var mImgs = (0, react_redux_1.useSelector)(function (state) { return state.app.imgs.mImgs; });
21
+ var fsize = (0, react_redux_1.useSelector)(function (state) { return state.quizCfg.inQuizOption.fsize; });
21
22
  if (!question)
22
23
  return null;
23
24
  var yearId = question.yearId, explain = question.explain;
@@ -26,7 +27,7 @@ var NormalExplain = function (_a) {
26
27
  var explainInfos = explain.map(function (word) {
27
28
  return (0, ExplainLogic_1.getExplainDatas)(word, question);
28
29
  });
29
- var formIsImpot = question.form === "input";
30
+ var formIsInput = question.form === "input";
30
31
  // 解説がない場合
31
32
  if (explainInfos.length === 0)
32
33
  return (<react_native_1.View style={styles.container}>
@@ -34,6 +35,7 @@ var NormalExplain = function (_a) {
34
35
  こちらの問題の解説は掲載しておりません。過去問題集やWEBサイトなどでご確認ください。
35
36
  </MyTextqqyy_1.default>
36
37
  </react_native_1.View>);
38
+ var marginBottom = getMarginBottom(fsize);
37
39
  // 解説表示
38
40
  return (<react_native_1.View style={styles.container}>
39
41
  {/* 解説表示 */}
@@ -43,14 +45,14 @@ var NormalExplain = function (_a) {
43
45
  var mt20 = I.color === "light" ? 25 : 0;
44
46
  return (<react_native_1.View style={{
45
47
  backgroundColor: lib_1.colors[color],
46
- marginBottom: 5,
48
+ marginBottom: marginBottom,
47
49
  marginTop: mt20,
48
50
  }} key={index}>
49
51
  <RenderImgOrText_1.default word={I.word} imgKey={"a" + yearId} navigation={navigation}/>
50
52
  </react_native_1.View>);
51
53
  }
52
54
  if (I.viewType === "copy") {
53
- return (<react_native_1.View style={{ backgroundColor: lib_1.colors[color], marginBottom: 10 }} key={index}>
55
+ return (<react_native_1.View style={{ backgroundColor: lib_1.colors[color], marginBottom: marginBottom }} key={index}>
54
56
  <RenderImgOrText_1.default word={I.word} imgKey={"a" + yearId} navigation={navigation} selectable={true}/>
55
57
  </react_native_1.View>);
56
58
  }
@@ -66,7 +68,7 @@ var NormalExplain = function (_a) {
66
68
  </react_native_1.View>);
67
69
  }
68
70
  })}
69
- {formIsImpot && (<common_1.MyText fsize="sm" color="red" style={{ alignSelf: "flex-end" }}>
71
+ {formIsInput && (<common_1.MyText fsize="sm" color="red" style={{ alignSelf: "flex-end" }}>
70
72
  ※記入例は長押しでコピーできます。
71
73
  </common_1.MyText>)}
72
74
  </react_native_1.View>);
@@ -82,4 +84,24 @@ var styles = react_native_1.StyleSheet.create({
82
84
  marginTop: 10,
83
85
  },
84
86
  });
87
+ var getMarginBottom = function (fsize) {
88
+ switch (fsize) {
89
+ case "xs":
90
+ return 3;
91
+ case "sm":
92
+ return 7;
93
+ case "md":
94
+ return 12;
95
+ case "lg":
96
+ return 15;
97
+ case "xl":
98
+ return 20;
99
+ case "xxl":
100
+ return 25;
101
+ case "xxxl":
102
+ return 30;
103
+ default:
104
+ return 0;
105
+ }
106
+ };
85
107
  exports.default = NormalExplain;