@nakamura-123/pages 0.1.43 → 0.1.45

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.
@@ -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;
4
+ dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
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 = 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;
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;
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,24 +42,26 @@ 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_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
- }
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
+ });
61
63
  });
62
- }); });
64
+ });
63
65
  // 91. 復元を行い、チェックが必要か判定
64
66
  var isCheckRequired = function (allFreeState, lastCheckedDate, isCompoleteFree) {
65
67
  if (isCompoleteFree)
@@ -1,4 +1,4 @@
1
- import RNIap, { ProductPurchase } from "react-native-iap";
1
+ import RNIap, { Product, 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 = 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;
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;
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 = 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;
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;
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.");
@@ -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 = 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;
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;
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 = 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;
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;
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.");
@@ -35,12 +35,19 @@ var getMissingDailyBadgeInfos = function (BadgeDB) {
35
35
  var KEYS = ["day", "week", "total", "continue"];
36
36
  var missingBadgeInfo = [];
37
37
  KEYS.forEach(function (key) {
38
- var missingBadges = (0, exports.getMissingBadgeInfos)(BadgeDB, key);
38
+ var missingBadges = getMissingDailyBadge(BadgeDB, key);
39
39
  missingBadgeInfo = __spreadArray(__spreadArray([], missingBadgeInfo, true), missingBadges, true);
40
40
  });
41
41
  return missingBadgeInfo;
42
42
  };
43
43
  exports.getMissingDailyBadgeInfos = getMissingDailyBadgeInfos;
44
+ // ## デイリーバッジの未獲得情報を取得
45
+ var getMissingDailyBadge = function (BadgeDB, type) {
46
+ var selectedBadgeSet = lib_1.badgeSet.badge5Sets[type];
47
+ var collectedIds = BadgeDB.filtered("category == $0", type).map(function (badge) { return badge.badgeId; });
48
+ var missingBadgeInfo = selectedBadgeSet.filter(function (badgeInfo) { return !collectedIds.includes(badgeInfo.id); });
49
+ return missingBadgeInfo;
50
+ };
44
51
  // テストの合格回数と満点回数から、バッジの取得を判定
45
52
  // 一瞬前にテストデータを保存しているため、ここでscoreを取得する必要はない
46
53
  var checkTest = function (testData, fnc) {
@@ -57,6 +57,9 @@ var checkDailyLogBadge = function (BadgeDB, DailyLogDB, t) {
57
57
  var missingBadgeInfos = (0, badgeBasicFnc_1.getMissingDailyBadgeInfos)(collectedBadges);
58
58
  // ### 02.デイリーログの情報を取得(今日の問題数、今週の問題数、累計問題数、連続日数)
59
59
  var dailyLogData = (0, badgeDailyFnc_1.getDailyLogData)(DailyLogDB);
60
+ console.log("collectedBadges", collectedBadges);
61
+ console.log("dailyLogData", dailyLogData);
62
+ console.log("missingBadgeInfos", missingBadgeInfos);
60
63
  // ### 03.取得条件を満たしているバッジを判定
61
64
  var eligibleBadges = missingBadgeInfos.filter(function (info) {
62
65
  return (0, badgeDailyFnc_1.checkDaily)(dailyLogData, info);
@@ -1,11 +1,18 @@
1
- import { CfgInitial, QuizInitial } from "@nakamura-123/stores";
1
+ import { 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"];
5
4
  type Selected = QuizInitial["selected"];
6
- export declare const getBasicQuizList: (QuestionDB: QRD, startCfg: startCfg, selected: Selected) => Store.DQInStore[];
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[];
7
10
  export declare const getMiniTestQuestions: (QuestionDB: QRD, subjectType: "unit" | "year", key: number, cnt: number, outOfYearRange: number[]) => Store.DQInStore[];
8
11
  export declare const getTestQuestions: (QuestionDB: QRD, cnt: number) => Store.DQInStore[];
9
12
  export declare const getTestQuestionsByUnit: (QuestionDB: QRD, cnt: number, unit: number[]) => Store.DQInStore[];
10
- export declare const getBootQuestions: (QuestionDB: QRD, startCfg: startCfg, outOfUnitRange: number[], outOfYearRange: 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[];
11
18
  export {};
@@ -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 = 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;
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;
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.");
@@ -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 = 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;
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;
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.");
@@ -194,21 +194,23 @@ var replaceOldInputData = function (realm) { return __awaiter(void 0, void 0, vo
194
194
  });
195
195
  }); };
196
196
  // 60. inputIdの読み込み(reduxThunk)
197
- var loadOldInputId = (0, toolkit_1.createAsyncThunk)("old/loadOldInputId", function (_1, _a) { return __awaiter(void 0, [_1, _a], void 0, function (_, _b) {
198
- var id;
199
- var dispatch = _b.dispatch;
200
- return __generator(this, function (_c) {
201
- switch (_c.label) {
202
- case 0: return [4 /*yield*/, loadOldData("id")];
203
- case 1:
204
- id = _c.sent();
205
- if (!id)
197
+ var loadOldInputId = (0, toolkit_1.createAsyncThunk)("old/loadOldInputId", function (_, _a) {
198
+ var dispatch = _a.dispatch;
199
+ return __awaiter(void 0, void 0, void 0, function () {
200
+ var id;
201
+ return __generator(this, function (_b) {
202
+ switch (_b.label) {
203
+ case 0: return [4 /*yield*/, loadOldData("id")];
204
+ case 1:
205
+ id = _b.sent();
206
+ if (!id)
207
+ return [2 /*return*/];
208
+ dispatch({ type: "setting/updateOldId", payload: id[0] });
206
209
  return [2 /*return*/];
207
- dispatch({ type: "setting/updateOldId", payload: id[0] });
208
- return [2 /*return*/];
209
- }
210
+ }
211
+ });
210
212
  });
211
- }); });
213
+ });
212
214
  // 90. 旧データの存在をMarkデータから確認
213
215
  var existOldData = function () { return __awaiter(void 0, void 0, void 0, function () {
214
216
  var markData;
@@ -1,13 +1,14 @@
1
- import { CfgInitial } from "@nakamura-123/stores";
2
1
  import { Store } from "@nakamura-123/types";
3
2
  import { QRD } from "../types/filterType";
4
- type startCfg = CfgInitial["startCfg"];
5
3
  export declare const getUnitQuestions: (questions: QRD, unitId: number) => QRD;
6
4
  export declare const getSubUnitQuestions: (questions: QRD, unitId: number, subUnitId: number) => QRD;
7
5
  export declare const getYearQuestions: (questions: QRD, year: number) => QRD;
8
6
  export declare const getSubYearQuestions: (questions: QRD, year: number, key: number) => QRD;
9
7
  export declare const filterByOutOfYearRange: (questions: QRD, outOfYearRange: number[]) => QRD;
10
8
  export declare const filterByOutOfUnitRange: (questions: QRD, outOfUnitRange: number[]) => QRD;
11
- export declare const filterByTags: (questions: QRD, startCfg: startCfg) => 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;
12
14
  export declare const commonFilter: (questions: Store.DQInStore[], quizCnt: number, isShuffle: boolean) => Store.DQInStore[];
13
- export {};
@@ -1,9 +1,10 @@
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"];
5
3
  export declare const getUnitQuestionsJ: (questions: QRJ, unitId: number) => QRJ;
6
4
  export declare const getSubUnitQuestionsJ: (questions: QRJ, unitId: number, subUnitId: number) => QRJ;
7
- export declare const filterByTagsJ: (questions: QRJ, startCfg: startCfg, tagName: Db.SubjectTag) => 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;
8
10
  export declare const commonFilterJ: (questions: JStore.JQInStore[], quizCnt: number, isShuffle: boolean) => JStore.JQInStore[];
9
- export {};
@@ -1,14 +1,7 @@
1
1
  "use strict";
2
2
  // helpers.ts
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
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;
4
+ exports.countTagsByLevelSelected = exports.getCategoryRate = exports.countTagsByLevel = exports.getCompletedTagRate = exports.getBootTagLevelCnts = exports.getSubTagLevelCnts = exports.getYearSubTagLevelCnts = exports.getUnitSubTagLevelCnts = exports.getCategoryTagLevelCntsD = void 0;
12
5
  var lib_1 = require("@nakamura-123/lib");
13
6
  var questionFilterD_1 = require("./questionFilterD");
14
7
  // 01_大単元のTagのレベルを取得
@@ -23,6 +16,7 @@ function getCategoryTagLevelCntsD(QuestionDB, category, type, outOfYearRange) {
23
16
  : (0, questionFilterD_1.getYearQuestions)(returnQuestions, category);
24
17
  return returnQuestions.map(function (question) { return question.tag.level; });
25
18
  }
19
+ exports.getCategoryTagLevelCntsD = getCategoryTagLevelCntsD;
26
20
  // 02_Unitの小単元のTagのレベルを取得
27
21
  function getUnitSubTagLevelCnts(QuestionDB, unitId, subUnitId, outOfYearRange) {
28
22
  var returnQuestions = QuestionDB;
@@ -32,10 +26,12 @@ function getUnitSubTagLevelCnts(QuestionDB, unitId, subUnitId, outOfYearRange) {
32
26
  returnQuestions = (0, questionFilterD_1.getSubUnitQuestions)(returnQuestions, unitId, subUnitId);
33
27
  return returnQuestions.map(function (question) { return question.tag.level; });
34
28
  }
29
+ exports.getUnitSubTagLevelCnts = getUnitSubTagLevelCnts;
35
30
  // 03_Yearの小単元のTagのレベルを取得
36
31
  function getYearSubTagLevelCnts(QuestionDB, year, key) {
37
32
  return (0, questionFilterD_1.getSubYearQuestions)(QuestionDB, year, key).map(function (question) { return question.tag.level; });
38
33
  }
34
+ exports.getYearSubTagLevelCnts = getYearSubTagLevelCnts;
39
35
  // 11_5Tagのレベルを取得。Unit(大・小単元) 、Year(大・小単元) どちらでも可。
40
36
  var getSubTagLevelCnts = function (QuestionDB, selected, outOfYearRange) {
41
37
  // QuestionDB をフィルタリング(共通処理)
@@ -82,6 +78,7 @@ function getCompletedTagRate(tags, onlyCnt) {
82
78
  var completedTagRate = Math.round((completedTagCnt / tags.length) * 100);
83
79
  return completedTagRate;
84
80
  }
81
+ exports.getCompletedTagRate = getCompletedTagRate;
85
82
  // 22_タグをレベル別に集計し、色と数を返す
86
83
  function countTagsByLevel(tags) {
87
84
  var tagInfos = lib_1.tagLevels.map(function (_a) {
@@ -91,6 +88,7 @@ function countTagsByLevel(tags) {
91
88
  });
92
89
  return tagInfos;
93
90
  }
91
+ exports.countTagsByLevel = countTagsByLevel;
94
92
  // 23_タグをレベルごとに点数化し、到達度を%で返す
95
93
  function getCategoryRate(tags) {
96
94
  var tagCnt = tags.length;
@@ -98,6 +96,7 @@ function getCategoryRate(tags) {
98
96
  var tagPoint = tags.reduce(function (acc, tag) { return acc + POINT_LIST[tag]; }, 0);
99
97
  return (tagPoint / (tagCnt * 5)) * 100;
100
98
  }
99
+ exports.getCategoryRate = getCategoryRate;
101
100
  // タグをレベル別に集計し、色と数を返す。また、選択すると色が変わる
102
101
  function countTagsByLevelSelected(tags, tagActives) {
103
102
  var tagInfos = lib_1.tagLevels.map(function (_a) {
@@ -112,3 +111,4 @@ function countTagsByLevelSelected(tags, tagActives) {
112
111
  });
113
112
  return tagInfos;
114
113
  }
114
+ exports.countTagsByLevelSelected = countTagsByLevelSelected;
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTagNameFilterJ = exports.getSubTagLevelCntsJ = void 0;
4
- exports.getCategoryTagLevelCntsJ = getCategoryTagLevelCntsJ;
5
- exports.getUnitSubTagLevelCntsJ = getUnitSubTagLevelCntsJ;
3
+ exports.getTagNameFilterJ = exports.getSubTagLevelCntsJ = exports.getUnitSubTagLevelCntsJ = exports.getCategoryTagLevelCntsJ = void 0;
6
4
  var questionFilterJ_1 = require("./questionFilterJ");
7
5
  // 01_大単元のTagのレベルを取得
8
6
  function getCategoryTagLevelCntsJ(QuestionDB, category, tag) {
@@ -10,6 +8,7 @@ function getCategoryTagLevelCntsJ(QuestionDB, category, tag) {
10
8
  var returnQuestions = (0, questionFilterJ_1.getUnitQuestionsJ)(QuestionDB, category);
11
9
  return returnQuestions.map(function (question) { return question[tag].level; });
12
10
  }
11
+ exports.getCategoryTagLevelCntsJ = getCategoryTagLevelCntsJ;
13
12
  // 02_Unitの小単元のTagのレベルを取得
14
13
  function getUnitSubTagLevelCntsJ(QuestionDB, unitId, subUnitId, tag) {
15
14
  if (tag === void 0) { tag = "basicTag"; }
@@ -17,6 +16,7 @@ function getUnitSubTagLevelCntsJ(QuestionDB, unitId, subUnitId, tag) {
17
16
  returnQuestions = (0, questionFilterJ_1.getSubUnitQuestionsJ)(returnQuestions, unitId, subUnitId);
18
17
  return returnQuestions.map(function (question) { return question[tag].level; });
19
18
  }
19
+ exports.getUnitSubTagLevelCntsJ = getUnitSubTagLevelCntsJ;
20
20
  // 11_5Tagのレベルを取得。Unit(大・小単元) 、Year(大・小単元) どちらでも可。
21
21
  var getSubTagLevelCntsJ = function (QuestionDB, selected) {
22
22
  // QuestionDB をフィルタリング(共通処理)
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMiniTestLevelCnts = getMiniTestLevelCnts;
4
- exports.getTestLevelCnts = getTestLevelCnts;
5
- exports.countByLevel = countByLevel;
3
+ exports.countByLevel = exports.getTestLevelCnts = exports.getMiniTestLevelCnts = void 0;
6
4
  var lib_1 = require("@nakamura-123/lib");
7
5
  function getMiniTestLevelCnts(MiniTestDB, subject, key) {
8
6
  return MiniTestDB.filtered("subject == $0 && categoryKey == $1", subject, String(key)).map(function (item) { return item.level; });
9
7
  }
8
+ exports.getMiniTestLevelCnts = getMiniTestLevelCnts;
10
9
  function getTestLevelCnts(TestDB, subject) {
11
10
  return TestDB.filtered("subject == $0", subject).map(function (item) { return item.level; });
12
11
  }
12
+ exports.getTestLevelCnts = getTestLevelCnts;
13
13
  // タグをレベル別に集計し、色と数を返す
14
14
  function countByLevel(levels) {
15
15
  var levelInfos = lib_1.scoreLevels.map(function (_a) {
@@ -19,3 +19,4 @@ function countByLevel(levels) {
19
19
  });
20
20
  return levelInfos;
21
21
  }
22
+ exports.countByLevel = countByLevel;
@@ -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 = 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;
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;
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 = 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;
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;
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 = 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;
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;
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 = 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;
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;
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.");
@@ -53,7 +53,6 @@ var Check = function (_a) {
53
53
  dispatch(db_1.BootModel.createBootLog(realm));
54
54
  // バッジの判定を行い、必要情報をオブジェクトにまとめる
55
55
  // realmへ書き込み
56
- console.log("バッジの判定を行い、必要情報をオブジェクトにまとめる");
57
56
  checkBadgeEligibility();
58
57
  }, []);
59
58
  return (<react_native_1.View style={styles.container}>
@@ -72,7 +72,7 @@ var getTagInfos = function (tagLevels, selectedLevel) {
72
72
  return tagLevels.map(function (_a) {
73
73
  var level = _a.level, color = _a.color;
74
74
  return ({
75
- circleColor: level === selectedLevel ? color : "transparent",
75
+ circleColor: level === selectedLevel ? color : "bkBeige",
76
76
  iconColor: level === selectedLevel ? "white" : color,
77
77
  textColor: level === selectedLevel ? "text" : "transparent",
78
78
  level: level,
@@ -87,6 +87,7 @@ var styles = react_native_1.StyleSheet.create({
87
87
  },
88
88
  tag: {
89
89
  alignItems: "center",
90
+ width: "22%",
90
91
  },
91
92
  cntTxt: {
92
93
  fontSize: 10,