@nakamura-123/pages 0.1.46 → 0.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/Coin/CoinCheck.d.ts +1 -1
- package/dist/component/Coin/CoinCheck.js +19 -21
- package/dist/component/Coin/CoinFnc.d.ts +1 -1
- package/dist/component/Coin/CoinFnc.js +2 -2
- package/dist/component/Grade/ShareBtn.js +2 -2
- package/dist/component/OnlineInput/PasswardModal.js +2 -2
- package/dist/component/OnlineInput/PasswordIdModal.js +2 -2
- package/dist/functions/createQuizFncD.d.ts +4 -11
- package/dist/functions/gradeFnc.js +2 -2
- package/dist/functions/oldStorageFnc.js +15 -17
- package/dist/functions/questionFilterD.d.ts +4 -5
- package/dist/functions/questionFilterJ.d.ts +4 -5
- package/dist/functions/tagFncD.js +8 -8
- package/dist/functions/tagFncJ.js +3 -3
- package/dist/functions/testFnc.js +3 -4
- package/dist/page/CoinPage.js +2 -2
- package/dist/page/GetBadgePage.js +2 -2
- package/dist/page/HomePage.js +2 -2
- package/dist/page/ReportPage.js +2 -2
- package/dist/quiz/explain/ExplainLogic.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -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;
|
|
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 =
|
|
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 (
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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, {
|
|
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 =
|
|
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 =
|
|
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.");
|
|
@@ -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 =
|
|
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 =
|
|
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.");
|
|
@@ -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 {};
|
|
@@ -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 =
|
|
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.");
|
|
@@ -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 =
|
|
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.");
|
|
@@ -194,23 +194,21 @@ 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 (
|
|
198
|
-
var
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
if (!id)
|
|
207
|
-
return [2 /*return*/];
|
|
208
|
-
dispatch({ type: "setting/updateOldId", payload: id[0] });
|
|
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)
|
|
209
206
|
return [2 /*return*/];
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
dispatch({ type: "setting/updateOldId", payload: id[0] });
|
|
208
|
+
return [2 /*return*/];
|
|
209
|
+
}
|
|
212
210
|
});
|
|
213
|
-
});
|
|
211
|
+
}); });
|
|
214
212
|
// 90. 旧データの存在をMarkデータから確認
|
|
215
213
|
var existOldData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
216
214
|
var markData;
|
|
@@ -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.
|
|
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 =
|
|
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 をフィルタリング(共通処理)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getMiniTestLevelCnts = getMiniTestLevelCnts;
|
|
4
|
+
exports.getTestLevelCnts = getTestLevelCnts;
|
|
5
|
+
exports.countByLevel = countByLevel;
|
|
4
6
|
var lib_1 = require("@nakamura-123/lib");
|
|
5
7
|
function getMiniTestLevelCnts(MiniTestDB, subject, key) {
|
|
6
8
|
return MiniTestDB.filtered("subject == $0 && categoryKey == $1", subject, String(key)).map(function (item) { return item.level; });
|
|
7
9
|
}
|
|
8
|
-
exports.getMiniTestLevelCnts = getMiniTestLevelCnts;
|
|
9
10
|
function getTestLevelCnts(TestDB, subject) {
|
|
10
11
|
return TestDB.filtered("subject == $0", subject).map(function (item) { return item.level; });
|
|
11
12
|
}
|
|
12
|
-
exports.getTestLevelCnts = getTestLevelCnts;
|
|
13
13
|
// タグをレベル別に集計し、色と数を返す
|
|
14
14
|
function countByLevel(levels) {
|
|
15
15
|
var levelInfos = lib_1.scoreLevels.map(function (_a) {
|
|
@@ -19,4 +19,3 @@ function countByLevel(levels) {
|
|
|
19
19
|
});
|
|
20
20
|
return levelInfos;
|
|
21
21
|
}
|
|
22
|
-
exports.countByLevel = countByLevel;
|
package/dist/page/CoinPage.js
CHANGED
|
@@ -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 =
|
|
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 =
|
|
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.");
|
package/dist/page/HomePage.js
CHANGED
|
@@ -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 =
|
|
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.");
|
package/dist/page/ReportPage.js
CHANGED
|
@@ -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 =
|
|
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.");
|
|
@@ -41,7 +41,7 @@ var getNormalChoice = function (choices, word) {
|
|
|
41
41
|
};
|
|
42
42
|
// 空欄選択肢
|
|
43
43
|
var getBlankChoice = function (blankAns, word) {
|
|
44
|
-
return processWord(word, function (num) { return blankAns[num] || null; });
|
|
44
|
+
return processWord(word, function (num) { return blankAns[num + 1] || null; });
|
|
45
45
|
};
|
|
46
46
|
// マルチ選択肢
|
|
47
47
|
var getMultiChoice = function (multiSel, word) {
|