@nakamura-123/pages 0.0.1
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/Badge5s.d.ts +9 -0
- package/dist/component/Badge5s.js +46 -0
- package/dist/component/BasicSetting.d.ts +9 -0
- package/dist/component/BasicSetting.js +31 -0
- package/dist/component/Boot/IconTitleAndToggle.d.ts +8 -0
- package/dist/component/Boot/IconTitleAndToggle.js +20 -0
- package/dist/component/Boot/SelectRange.d.ts +6 -0
- package/dist/component/Boot/SelectRange.js +44 -0
- package/dist/component/Boot/SelectUnit.d.ts +6 -0
- package/dist/component/Boot/SelectUnit.js +41 -0
- package/dist/component/Boot/ToggleRange.d.ts +8 -0
- package/dist/component/Boot/ToggleRange.js +54 -0
- package/dist/component/Coin/AppReviews.d.ts +10 -0
- package/dist/component/Coin/AppReviews.js +45 -0
- package/dist/component/Coin/CatchCopy.d.ts +3 -0
- package/dist/component/Coin/CatchCopy.js +31 -0
- package/dist/component/Coin/Recommend.d.ts +3 -0
- package/dist/component/Coin/Recommend.js +87 -0
- package/dist/component/Grade/AllBadges.d.ts +7 -0
- package/dist/component/Grade/AllBadges.js +41 -0
- package/dist/component/Grade/AllTags.d.ts +5 -0
- package/dist/component/Grade/AllTags.js +32 -0
- package/dist/component/Grade/BasicBadge.d.ts +7 -0
- package/dist/component/Grade/BasicBadge.js +72 -0
- package/dist/component/Grade/ChangeWeeklyTargetBtn.d.ts +5 -0
- package/dist/component/Grade/ChangeWeeklyTargetBtn.js +39 -0
- package/dist/component/Grade/DatePickerModal.d.ts +8 -0
- package/dist/component/Grade/DatePickerModal.js +45 -0
- package/dist/component/Grade/GradeCard/ChangeWeeklyModal.d.ts +13 -0
- package/dist/component/Grade/GradeCard/ChangeWeeklyModal.js +39 -0
- package/dist/component/Grade/GradeCard/ChangeWeeklyTargetBtn.d.ts +7 -0
- package/dist/component/Grade/GradeCard/ChangeWeeklyTargetBtn.js +60 -0
- package/dist/component/Grade/GradeCard/DatePickerModal.d.ts +8 -0
- package/dist/component/Grade/GradeCard/DatePickerModal.js +49 -0
- package/dist/component/Grade/GradeCard/GradeCard.d.ts +7 -0
- package/dist/component/Grade/GradeCard/GradeCard.js +53 -0
- package/dist/component/Grade/GradeCard/Square3sGrade.d.ts +11 -0
- package/dist/component/Grade/GradeCard/Square3sGrade.js +60 -0
- package/dist/component/Grade/GradeCard/TargetDate.d.ts +7 -0
- package/dist/component/Grade/GradeCard/TargetDate.js +60 -0
- package/dist/component/Grade/GradeCard/WeeklyAchivedRate.d.ts +9 -0
- package/dist/component/Grade/GradeCard/WeeklyAchivedRate.js +28 -0
- package/dist/component/Grade/GradeCard/WeeklyProgress.d.ts +11 -0
- package/dist/component/Grade/GradeCard/WeeklyProgress.js +88 -0
- package/dist/component/Grade/GradeCard.d.ts +4 -0
- package/dist/component/Grade/GradeCard.js +53 -0
- package/dist/component/Grade/QuizCntGraph.d.ts +8 -0
- package/dist/component/Grade/QuizCntGraph.js +104 -0
- package/dist/component/Grade/Scuare3sGrade.d.ts +9 -0
- package/dist/component/Grade/Scuare3sGrade.js +35 -0
- package/dist/component/Grade/ShareBtn.d.ts +6 -0
- package/dist/component/Grade/ShareBtn.js +86 -0
- package/dist/component/Grade/Square3sGrade.d.ts +9 -0
- package/dist/component/Grade/Square3sGrade.js +63 -0
- package/dist/component/Grade/Square4s.d.ts +7 -0
- package/dist/component/Grade/Square4s.js +63 -0
- package/dist/component/Grade/TargetDate.d.ts +4 -0
- package/dist/component/Grade/TargetDate.js +56 -0
- package/dist/component/Grade/WeeklyAchivedRate.d.ts +7 -0
- package/dist/component/Grade/WeeklyAchivedRate.js +28 -0
- package/dist/component/Grade/WeeklyProgress.d.ts +9 -0
- package/dist/component/Grade/WeeklyProgress.js +80 -0
- package/dist/component/HeadNavigator.d.ts +0 -0
- package/dist/component/HeadNavigator.js +49 -0
- package/dist/component/HomePage.d.ts +8 -0
- package/dist/component/HomePage.js +44 -0
- package/dist/component/MiniTestCard.d.ts +9 -0
- package/dist/component/MiniTestCard.js +75 -0
- package/dist/component/Paw4s.d.ts +7 -0
- package/dist/component/Paw4s.js +51 -0
- package/dist/component/Paw5s.d.ts +7 -0
- package/dist/component/Paw5s.js +51 -0
- package/dist/component/QuizSet/QuizOptionDrill.d.ts +5 -0
- package/dist/component/QuizSet/QuizOptionDrill.js +46 -0
- package/dist/component/QuizSet/QuizSetDrill.d.ts +5 -0
- package/dist/component/QuizSet/QuizSetDrill.js +43 -0
- package/dist/component/Result/CharaCard.d.ts +7 -0
- package/dist/component/Result/CharaCard.js +43 -0
- package/dist/component/Result/LessonTitle.d.ts +3 -0
- package/dist/component/Result/LessonTitle.js +42 -0
- package/dist/component/Result/QuizFlatList.d.ts +7 -0
- package/dist/component/Result/QuizFlatList.js +76 -0
- package/dist/component/Result/ScoreBox.d.ts +7 -0
- package/dist/component/Result/ScoreBox.js +61 -0
- package/dist/component/Result/ScoreCircle.d.ts +7 -0
- package/dist/component/Result/ScoreCircle.js +59 -0
- package/dist/component/SelectRange/SelectYearRange.d.ts +7 -0
- package/dist/component/SelectRange/SelectYearRange.js +105 -0
- package/dist/component/SettingBtns/Config.d.ts +8 -0
- package/dist/component/SettingBtns/Config.js +17 -0
- package/dist/component/SettingBtns/Grade.d.ts +8 -0
- package/dist/component/SettingBtns/Grade.js +17 -0
- package/dist/component/SettingBtns/QuizOptionSelector.d.ts +7 -0
- package/dist/component/SettingBtns/QuizOptionSelector.js +43 -0
- package/dist/component/SettingBtns/Range.d.ts +5 -0
- package/dist/component/SettingBtns/Range.js +44 -0
- package/dist/component/SettingBtns/Report.d.ts +5 -0
- package/dist/component/SettingBtns/Report.js +16 -0
- package/dist/component/SettingBtns/Setting.d.ts +0 -0
- package/dist/component/SettingBtns/Setting.js +1 -0
- package/dist/component/Square3s.d.ts +7 -0
- package/dist/component/Square3s.js +38 -0
- package/dist/component/SubCagegoryList.d.ts +8 -0
- package/dist/component/SubCagegoryList.js +120 -0
- package/dist/component/SubCategoryLeft.d.ts +5 -0
- package/dist/component/SubCategoryLeft.js +14 -0
- package/dist/component/SubCategoryList.d.ts +9 -0
- package/dist/component/SubCategoryList.js +77 -0
- package/dist/component/TabAnimeView.d.ts +7 -0
- package/dist/component/TabAnimeView.js +61 -0
- package/dist/component/TabContents.d.ts +1 -0
- package/dist/component/TabContents.js +18 -0
- package/dist/component/TabContentsWrap.d.ts +7 -0
- package/dist/component/TabContentsWrap.js +38 -0
- package/dist/component/Tag5s.d.ts +6 -0
- package/dist/component/Tag5s.js +49 -0
- package/dist/component/TagBadge5s.d.ts +7 -0
- package/dist/component/TagBadge5s.js +63 -0
- package/dist/component/TagBadge5sPress.d.ts +6 -0
- package/dist/component/TagBadge5sPress.js +29 -0
- package/dist/component/TestCard.d.ts +7 -0
- package/dist/component/TestCard.js +57 -0
- package/dist/component/TestPage/AverageBar.d.ts +11 -0
- package/dist/component/TestPage/AverageBar.js +74 -0
- package/dist/component/TestPage/BarChart.d.ts +7 -0
- package/dist/component/TestPage/BarChart.js +107 -0
- package/dist/component/TestPage/BarChartContainer.d.ts +9 -0
- package/dist/component/TestPage/BarChartContainer.js +99 -0
- package/dist/component/TestPage/BarGraph.d.ts +11 -0
- package/dist/component/TestPage/BarGraph.js +60 -0
- package/dist/component/TestPage/ChartControl.d.ts +10 -0
- package/dist/component/TestPage/ChartControl.js +43 -0
- package/dist/component/TestPage/Square3s.d.ts +9 -0
- package/dist/component/TestPage/Square3s.js +35 -0
- package/dist/component/UnitPage.d.ts +10 -0
- package/dist/component/UnitPage.js +15 -0
- package/dist/functions/InQuizFnc.d.ts +0 -0
- package/dist/functions/InQuizFnc.js +1 -0
- package/dist/functions/badgeBasicFnc.d.ts +14 -0
- package/dist/functions/badgeBasicFnc.js +68 -0
- package/dist/functions/badgeDailyFnc.d.ts +15 -0
- package/dist/functions/badgeDailyFnc.js +65 -0
- package/dist/functions/badgeFilter.d.ts +17 -0
- package/dist/functions/badgeFilter.js +33 -0
- package/dist/functions/badgeFnc.d.ts +15 -0
- package/dist/functions/badgeFnc.js +68 -0
- package/dist/functions/createQuizFnc.d.ts +13 -0
- package/dist/functions/createQuizFnc.js +69 -0
- package/dist/functions/gradeFnc.d.ts +16 -0
- package/dist/functions/gradeFnc.js +83 -0
- package/dist/functions/questionFilter.d.ts +16 -0
- package/dist/functions/questionFilter.js +79 -0
- package/dist/functions/questionFormat.d.ts +7 -0
- package/dist/functions/questionFormat.js +89 -0
- package/dist/functions/tagFnc.d.ts +22 -0
- package/dist/functions/tagFnc.js +105 -0
- package/dist/functions/testFnc.d.ts +8 -0
- package/dist/functions/testFnc.js +21 -0
- package/dist/helper/scoreFnc.d.ts +10 -0
- package/dist/helper/scoreFnc.js +40 -0
- package/dist/helper/tagFnc.d.ts +23 -0
- package/dist/helper/tagFnc.js +69 -0
- package/dist/helper/testFnc.d.ts +7 -0
- package/dist/helper/testFnc.js +17 -0
- package/dist/hooks/BadgeHook.d.ts +1 -0
- package/dist/hooks/BadgeHook.js +65 -0
- package/dist/hooks/ExitQuizHook.d.ts +2 -0
- package/dist/hooks/ExitQuizHook.js +54 -0
- package/dist/hooks/basicHook.d.ts +3 -0
- package/dist/hooks/basicHook.js +14 -0
- package/dist/hooks/quizActionHook.d.ts +5 -0
- package/dist/hooks/quizActionHook.js +86 -0
- package/dist/hooks/quizHook.d.ts +15 -0
- package/dist/hooks/quizHook.js +60 -0
- package/dist/hooks/selector.d.ts +6 -0
- package/dist/hooks/selector.js +24 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +68 -0
- package/dist/page/BadgePage.d.ts +8 -0
- package/dist/page/BadgePage.js +58 -0
- package/dist/page/BasicPage.d.ts +9 -0
- package/dist/page/BasicPage.js +125 -0
- package/dist/page/BootPage.d.ts +9 -0
- package/dist/page/BootPage.js +116 -0
- package/dist/page/CoinPage.d.ts +9 -0
- package/dist/page/CoinPage.js +51 -0
- package/dist/page/GetBadgePage.d.ts +7 -0
- package/dist/page/GetBadgePage.js +173 -0
- package/dist/page/GradePage.d.ts +7 -0
- package/dist/page/GradePage.js +37 -0
- package/dist/page/HistoryPage.d.ts +11 -0
- package/dist/page/HistoryPage.js +62 -0
- package/dist/page/HomePage.d.ts +8 -0
- package/dist/page/HomePage.js +80 -0
- package/dist/page/ImgZoom.d.ts +10 -0
- package/dist/page/ImgZoom.js +29 -0
- package/dist/page/QuixPage.d.ts +7 -0
- package/dist/page/QuixPage.js +33 -0
- package/dist/page/QuizPage.d.ts +7 -0
- package/dist/page/QuizPage.js +98 -0
- package/dist/page/QuizSettingPage.d.ts +7 -0
- package/dist/page/QuizSettingPage.js +72 -0
- package/dist/page/QuizSetupPage.d.ts +7 -0
- package/dist/page/QuizSetupPage.js +85 -0
- package/dist/page/ReportPage.d.ts +8 -0
- package/dist/page/ReportPage.js +185 -0
- package/dist/page/ResultPage.d.ts +7 -0
- package/dist/page/ResultPage.js +47 -0
- package/dist/page/SettingPage.d.ts +7 -0
- package/dist/page/SettingPage.js +62 -0
- package/dist/page/TestPage.d.ts +9 -0
- package/dist/page/TestPage.js +101 -0
- package/dist/page/UnitPage.d.ts +9 -0
- package/dist/page/UnitPage.js +127 -0
- package/dist/page/ZoomImg.d.ts +0 -0
- package/dist/page/ZoomImg.js +1 -0
- package/dist/quiz/GoBackAlert.d.ts +2 -0
- package/dist/quiz/GoBackAlert.js +30 -0
- package/dist/quiz/MyImage.d.ts +9 -0
- package/dist/quiz/MyImage.js +60 -0
- package/dist/quiz/MyTextqqyy.d.ts +10 -0
- package/dist/quiz/MyTextqqyy.js +80 -0
- package/dist/quiz/Question.d.ts +3 -0
- package/dist/quiz/Question.js +43 -0
- package/dist/quiz/Quiz.d.ts +9 -0
- package/dist/quiz/Quiz.js +44 -0
- package/dist/quiz/QuizTitle.d.ts +3 -0
- package/dist/quiz/QuizTitle.js +51 -0
- package/dist/quiz/Title.d.ts +3 -0
- package/dist/quiz/Title.js +51 -0
- package/dist/quiz/answer/Answer.d.ts +3 -0
- package/dist/quiz/answer/Answer.js +41 -0
- package/dist/quiz/answer/BlankAnswer.d.ts +7 -0
- package/dist/quiz/answer/BlankAnswer.js +33 -0
- package/dist/quiz/answer/BlankBtn.d.ts +3 -0
- package/dist/quiz/answer/BlankBtn.js +50 -0
- package/dist/quiz/answer/ChoiceView.d.ts +17 -0
- package/dist/quiz/answer/ChoiceView.js +53 -0
- package/dist/quiz/answer/CommonChoice.d.ts +0 -0
- package/dist/quiz/answer/CommonChoice.js +1 -0
- package/dist/quiz/answer/MultiChoice.d.ts +7 -0
- package/dist/quiz/answer/MultiChoice.js +66 -0
- package/dist/quiz/answer/MultiChoiceContainer.d.ts +7 -0
- package/dist/quiz/answer/MultiChoiceContainer.js +71 -0
- package/dist/quiz/answer/MultiChoiceLogic.d.ts +0 -0
- package/dist/quiz/answer/MultiChoiceLogic.js +1 -0
- package/dist/quiz/answer/MultiNextBtn.d.ts +7 -0
- package/dist/quiz/answer/MultiNextBtn.js +36 -0
- package/dist/quiz/answer/NormalChoice.d.ts +7 -0
- package/dist/quiz/answer/NormalChoice.js +64 -0
- package/dist/quiz/answer/NormalChoiceContainer.d.ts +7 -0
- package/dist/quiz/answer/NormalChoiceContainer.js +76 -0
- package/dist/quiz/answer/NormalChoiceView.d.ts +17 -0
- package/dist/quiz/answer/NormalChoiceView.js +53 -0
- package/dist/quiz/answer/NormalSelect.d.ts +5 -0
- package/dist/quiz/answer/NormalSelect.js +28 -0
- package/dist/quiz/answer/memo.d.ts +9 -0
- package/dist/quiz/answer/memo.js +114 -0
- package/dist/quiz/answer/style/getChoiceStyle.d.ts +2 -0
- package/dist/quiz/answer/style/getChoiceStyle.js +17 -0
- package/dist/quiz/answer/styles/getChoiceStyle.d.ts +5 -0
- package/dist/quiz/answer/styles/getChoiceStyle.js +32 -0
- package/dist/quiz/answer/util/choiceFnc.d.ts +2 -0
- package/dist/quiz/answer/util/choiceFnc.js +9 -0
- package/dist/quiz/check/Check.d.ts +8 -0
- package/dist/quiz/check/Check.js +82 -0
- package/dist/quiz/check/NextQuiz.d.ts +8 -0
- package/dist/quiz/check/NextQuiz.js +42 -0
- package/dist/quiz/check/NextQuizBtn.d.ts +8 -0
- package/dist/quiz/check/NextQuizBtn.js +67 -0
- package/dist/quiz/check/SelectTag.d.ts +5 -0
- package/dist/quiz/check/SelectTag.js +86 -0
- package/dist/quiz/common/MyImage.d.ts +6 -0
- package/dist/quiz/common/MyImage.js +56 -0
- package/dist/quiz/common/MyTextqqyy.d.ts +11 -0
- package/dist/quiz/common/MyTextqqyy.js +133 -0
- package/dist/quiz/common/PageContainerWrap.d.ts +10 -0
- package/dist/quiz/common/PageContainerWrap.js +38 -0
- package/dist/quiz/common/RenderImgOrText.d.ts +11 -0
- package/dist/quiz/common/RenderImgOrText.js +21 -0
- package/dist/quiz/common/ZoomableImage.d.ts +9 -0
- package/dist/quiz/common/ZoomableImage.js +18 -0
- package/dist/quiz/explain/CorrectBar.d.ts +7 -0
- package/dist/quiz/explain/CorrectBar.js +46 -0
- package/dist/quiz/explain/CorrectedBar.d.ts +7 -0
- package/dist/quiz/explain/CorrectedBar.js +45 -0
- package/dist/quiz/explain/Example.d.ts +8 -0
- package/dist/quiz/explain/Example.js +107 -0
- package/dist/quiz/explain/Explain.d.ts +8 -0
- package/dist/quiz/explain/Explain.js +59 -0
- package/dist/quiz/explain/ExplainLogic.d.ts +17 -0
- package/dist/quiz/explain/ExplainLogic.js +52 -0
- package/dist/quiz/function/choiceFnc.d.ts +2 -0
- package/dist/quiz/function/choiceFnc.js +9 -0
- package/dist/quiz/function/turnModeFnc.d.ts +0 -0
- package/dist/quiz/function/turnModeFnc.js +31 -0
- package/dist/quiz/question/FillDiagram.d.ts +10 -0
- package/dist/quiz/question/FillDiagram.js +27 -0
- package/dist/quiz/question/Question.d.ts +8 -0
- package/dist/quiz/question/Question.js +61 -0
- package/dist/quiz/question/QuestionFormat.d.ts +8 -0
- package/dist/quiz/question/QuestionFormat.js +69 -0
- package/dist/quiz/question/QuestionFormats.d.ts +9 -0
- package/dist/quiz/question/QuestionFormats.js +75 -0
- package/dist/quiz/question/QuestionMultiFormat.d.ts +7 -0
- package/dist/quiz/question/QuestionMultiFormat.js +43 -0
- package/dist/quiz/question/QuestionTxtFomat.d.ts +7 -0
- package/dist/quiz/question/QuestionTxtFomat.js +42 -0
- package/dist/quiz/question/SearchYoutue.d.ts +6 -0
- package/dist/quiz/question/SearchYoutue.js +20 -0
- package/dist/quiz/question/questionStyleFormat.d.ts +8 -0
- package/dist/quiz/question/questionStyleFormat.js +61 -0
- package/dist/quiz/save/QuizSaveData.d.ts +9 -0
- package/dist/quiz/save/QuizSaveData.js +68 -0
- package/dist/quiz/setting/Bottom3Btn.d.ts +8 -0
- package/dist/quiz/setting/Bottom3Btn.js +79 -0
- package/dist/quiz/setting/ReturnBtn.d.ts +7 -0
- package/dist/quiz/setting/ReturnBtn.js +77 -0
- package/dist/quiz/setting/ReturnSaveBtn.d.ts +7 -0
- package/dist/quiz/setting/ReturnSaveBtn.js +94 -0
- package/dist/quiz/styles/getChoiceStyle.d.ts +5 -0
- package/dist/quiz/styles/getChoiceStyle.js +32 -0
- package/dist/quiz/util/choiceFnc.d.ts +2 -0
- package/dist/quiz/util/choiceFnc.js +9 -0
- package/dist/quiz/util/commonFnc.d.ts +0 -0
- package/dist/quiz/util/commonFnc.js +1 -0
- package/dist/quiz/util/customHook.d.ts +0 -0
- package/dist/quiz/util/customHook.js +1 -0
- package/dist/quiz/util/customSelector.d.ts +5 -0
- package/dist/quiz/util/customSelector.js +16 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/homePage.d.ts +12 -0
- package/dist/types/homePage.js +2 -0
- package/package.json +23 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { badgeSet } from "@nakamura-123/lib";
|
|
3
|
+
interface BadgeProps {
|
|
4
|
+
badgeType: badgeSet.BadgeType;
|
|
5
|
+
subject: badgeSet.BadgeSubject;
|
|
6
|
+
category: string | number;
|
|
7
|
+
}
|
|
8
|
+
declare const Badge5s: React.FC<BadgeProps>;
|
|
9
|
+
export default Badge5s;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var react_native_1 = require("react-native");
|
|
19
|
+
var react_2 = require("@realm/react");
|
|
20
|
+
var common_1 = require("@nakamura-123/common");
|
|
21
|
+
var lib_1 = require("@nakamura-123/lib");
|
|
22
|
+
var db_1 = require("@nakamura-123/db");
|
|
23
|
+
var Badge5s = function (_a) {
|
|
24
|
+
var badgeType = _a.badgeType, subject = _a.subject, category = _a.category;
|
|
25
|
+
var BadgesDB = (0, react_2.useQuery)(db_1.BadgeSchema);
|
|
26
|
+
var badge5s = lib_1.badgeSet.badge5Sets[badgeType];
|
|
27
|
+
var badge5sInfos = badge5s.map(function (badge) {
|
|
28
|
+
var matchingBadges = BadgesDB.filtered("subject == $0 AND category == $1 AND badgeId == $2", subject, String(category), badge.id);
|
|
29
|
+
var isExist = matchingBadges.length > 0;
|
|
30
|
+
return __assign(__assign({}, badge), { isExist: isExist });
|
|
31
|
+
});
|
|
32
|
+
return (<>
|
|
33
|
+
<react_native_1.View style={styles.container}>
|
|
34
|
+
{badge5sInfos.map(function (badge) { return (<common_1.Badge key={badge.id} name={badge.name} icon={badge.icon} badgeColor={badge.color} isEmpty={!badge.isExist}/>); })}
|
|
35
|
+
</react_native_1.View>
|
|
36
|
+
</>);
|
|
37
|
+
};
|
|
38
|
+
var styles = react_native_1.StyleSheet.create({
|
|
39
|
+
container: {
|
|
40
|
+
flexDirection: "row",
|
|
41
|
+
justifyContent: "space-between",
|
|
42
|
+
width: "100%",
|
|
43
|
+
marginBottom: 10,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
exports.default = Badge5s;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StackNavigationProp } from "@react-navigation/stack";
|
|
3
|
+
import { Nav } from "@nakamura-123/types";
|
|
4
|
+
type BasicSettingProps = {
|
|
5
|
+
navigation: StackNavigationProp<Nav.RootStackParamList>;
|
|
6
|
+
subjectType: "unit" | "year";
|
|
7
|
+
};
|
|
8
|
+
declare const BasicSetting: React.FC<BasicSettingProps>;
|
|
9
|
+
export default BasicSetting;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var react_native_1 = require("react-native");
|
|
8
|
+
var react_redux_1 = require("react-redux");
|
|
9
|
+
var common_1 = require("@nakamura-123/common");
|
|
10
|
+
var Range_1 = __importDefault(require("./SettingBtns/Range"));
|
|
11
|
+
var BasicSetting = function (_a) {
|
|
12
|
+
var navigation = _a.navigation, subjectType = _a.subjectType;
|
|
13
|
+
var isRangeYear = (0, react_redux_1.useSelector)(function (state) { var _a; return (_a = state.app.appSetting.setting) === null || _a === void 0 ? void 0 : _a.basic.isRangeYearInUnit; });
|
|
14
|
+
var isUnit = subjectType === "unit";
|
|
15
|
+
return (<react_native_1.View style={styles.row}>
|
|
16
|
+
<common_1.SettingBtn icon="envelope" title="報 告" onPress={function () { return navigation.navigate("Report"); }}/>
|
|
17
|
+
|
|
18
|
+
{isRangeYear && isUnit && <Range_1.default />}
|
|
19
|
+
<common_1.SettingBtn icon="chart-line" title="成 績" onPress={function () { return navigation.navigate("Grade"); }}/>
|
|
20
|
+
</react_native_1.View>);
|
|
21
|
+
};
|
|
22
|
+
var styles = react_native_1.StyleSheet.create({
|
|
23
|
+
row: {
|
|
24
|
+
width: 250,
|
|
25
|
+
flexDirection: "row",
|
|
26
|
+
justifyContent: "space-around",
|
|
27
|
+
alignItems: "center",
|
|
28
|
+
paddingVertical: 16,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
exports.default = BasicSetting;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_native_1 = require("react-native");
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var common_1 = require("@nakamura-123/common");
|
|
9
|
+
var SelectRange = function (_a) {
|
|
10
|
+
var icon = _a.icon, title = _a.title, type = _a.type;
|
|
11
|
+
return (<react_native_1.View style={styles.container}>
|
|
12
|
+
<common_1.IconTitle icon={icon} title={title}/>
|
|
13
|
+
</react_native_1.View>);
|
|
14
|
+
};
|
|
15
|
+
var styles = react_native_1.StyleSheet.create({
|
|
16
|
+
container: {
|
|
17
|
+
flexDirection: "row",
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
exports.default = SelectRange;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var react_native_1 = require("react-native");
|
|
8
|
+
var react_redux_1 = require("react-redux");
|
|
9
|
+
var common_1 = require("@nakamura-123/common");
|
|
10
|
+
var ToggleRange_1 = __importDefault(require("./ToggleRange"));
|
|
11
|
+
var SelectRange = function (_a) {
|
|
12
|
+
var type = _a.type;
|
|
13
|
+
var dispatch = (0, react_redux_1.useDispatch)();
|
|
14
|
+
// Reduxの状態を取得
|
|
15
|
+
var storeName = type === "unit" ? "outOfUnit" : "outOfYear";
|
|
16
|
+
var reduxOutOfRanges = (0, react_redux_1.useSelector)(function (state) { return state.setting.boot[storeName]; }) || [];
|
|
17
|
+
// リストを取得
|
|
18
|
+
var yearLists = (0, react_redux_1.useSelector)(function (state) { return state.app.yearList; });
|
|
19
|
+
var unitList = (0, react_redux_1.useSelector)(function (state) { return state.app.unitList; });
|
|
20
|
+
var slectedList = type === "unit" ? unitList : yearLists;
|
|
21
|
+
var dispatchName = type === "unit" ? "setting/toggleUnitRange" : "setting/toggleYearRange";
|
|
22
|
+
var allDispatchName = type === "unit" ? "setting/replaceUnitRange" : "setting/replaceYearRange";
|
|
23
|
+
// 選択肢のON/OFFをトグルする関数
|
|
24
|
+
var toggleSelection = function (key) {
|
|
25
|
+
return dispatch({ type: dispatchName, payload: key });
|
|
26
|
+
};
|
|
27
|
+
return (<react_native_1.View style={styles.container}>
|
|
28
|
+
<ToggleRange_1.default lists={slectedList} dispatchName={allDispatchName}/>
|
|
29
|
+
{slectedList.map(function (item, i) { return (<common_1.RoundSelectableItem key={i} title={item.title} onPress={function () { return toggleSelection(item.key); }} isSelected={!reduxOutOfRanges.includes(item.key)} // 選択状態を反映
|
|
30
|
+
/>); })}
|
|
31
|
+
</react_native_1.View>);
|
|
32
|
+
};
|
|
33
|
+
var styles = react_native_1.StyleSheet.create({
|
|
34
|
+
container: {
|
|
35
|
+
flexDirection: "row",
|
|
36
|
+
flexWrap: "wrap",
|
|
37
|
+
justifyContent: "center",
|
|
38
|
+
alignItems: "center",
|
|
39
|
+
width: "100%",
|
|
40
|
+
marginTop: 5,
|
|
41
|
+
marginBottom: 10,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
exports.default = SelectRange;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var react_native_1 = require("react-native");
|
|
8
|
+
var react_redux_1 = require("react-redux");
|
|
9
|
+
var common_1 = require("@nakamura-123/common");
|
|
10
|
+
var stores_1 = require("@nakamura-123/stores");
|
|
11
|
+
var updateOutOfYear = stores_1.cfgAction.updateOutOfYear;
|
|
12
|
+
var SelectRange = function (_a) {
|
|
13
|
+
var type = _a.type;
|
|
14
|
+
var dispatch = (0, react_redux_1.useDispatch)();
|
|
15
|
+
// Reduxの状態を取得
|
|
16
|
+
var storeName = type === "year" ? "outOfYear" : "outOfUnit";
|
|
17
|
+
var reduxOutOfRanges = (0, react_redux_1.useSelector)(function (state) { return state.setting.boot[storeName]; });
|
|
18
|
+
// リストを取得
|
|
19
|
+
var yearLists = (0, react_redux_1.useSelector)(function (state) { return state.app.yearList; });
|
|
20
|
+
var unitList = (0, react_redux_1.useSelector)(function (state) { return state.app.unitList; });
|
|
21
|
+
var typeList = type === "year" ? yearLists : unitList;
|
|
22
|
+
var dispatchName = type === "year" ? "setting/toggleUnitRange" : "setting/toggleYearRange";
|
|
23
|
+
// 選択肢のON/OFFをトグルする関数
|
|
24
|
+
var toggleSelection = function (key) {
|
|
25
|
+
return dispatch({ type: dispatchName, payload: key });
|
|
26
|
+
};
|
|
27
|
+
return (<react_native_1.View style={styles.container}>
|
|
28
|
+
{typeList.map(function (item, i) { return (<common_1.RoundSelectableItem key={i} title={item.title} onPress={function () { return toggleSelection(item.key); }} isSelected={!reduxOutOfRanges.includes(item.key)} // 選択状態を反映
|
|
29
|
+
/>); })}
|
|
30
|
+
</react_native_1.View>);
|
|
31
|
+
};
|
|
32
|
+
var styles = react_native_1.StyleSheet.create({
|
|
33
|
+
container: {
|
|
34
|
+
flexDirection: "row",
|
|
35
|
+
flexWrap: "wrap",
|
|
36
|
+
justifyContent: "center",
|
|
37
|
+
alignItems: "center",
|
|
38
|
+
width: "100%",
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
exports.default = SelectRange;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { YearList, UnitList } from "@nakamura-123/types";
|
|
3
|
+
interface ToggleRangeProps {
|
|
4
|
+
lists: YearList[] | UnitList[];
|
|
5
|
+
dispatchName: string;
|
|
6
|
+
}
|
|
7
|
+
declare const ToggleRange: React.FC<ToggleRangeProps>;
|
|
8
|
+
export default ToggleRange;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var react_native_1 = require("react-native");
|
|
8
|
+
var react_redux_1 = require("react-redux");
|
|
9
|
+
var common_1 = require("@nakamura-123/common");
|
|
10
|
+
var lib_1 = require("@nakamura-123/lib");
|
|
11
|
+
var ToggleRange = function (_a) {
|
|
12
|
+
var lists = _a.lists, dispatchName = _a.dispatchName;
|
|
13
|
+
var dispatch = (0, react_redux_1.useDispatch)();
|
|
14
|
+
// すべてのkeyを取得する
|
|
15
|
+
var allKeys = lists.map(function (item) { return item.key; });
|
|
16
|
+
var onSelectAll = function () { return dispatch({ type: dispatchName, payload: [] }); };
|
|
17
|
+
var onDeselectAll = function () {
|
|
18
|
+
return dispatch({ type: dispatchName, payload: allKeys });
|
|
19
|
+
};
|
|
20
|
+
return (<react_native_1.View style={styles.container}>
|
|
21
|
+
<react_native_1.TouchableOpacity style={styles.button} onPress={onSelectAll}>
|
|
22
|
+
<common_1.MyText style={styles.buttonText}>全選択</common_1.MyText>
|
|
23
|
+
</react_native_1.TouchableOpacity>
|
|
24
|
+
<react_native_1.TouchableOpacity style={styles.button} onPress={onDeselectAll}>
|
|
25
|
+
<common_1.MyText style={styles.buttonText}>全解除</common_1.MyText>
|
|
26
|
+
</react_native_1.TouchableOpacity>
|
|
27
|
+
</react_native_1.View>);
|
|
28
|
+
};
|
|
29
|
+
var styles = react_native_1.StyleSheet.create({
|
|
30
|
+
container: {
|
|
31
|
+
position: "absolute",
|
|
32
|
+
flexDirection: "row",
|
|
33
|
+
justifyContent: "flex-end",
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
padding: 10,
|
|
36
|
+
width: "100%",
|
|
37
|
+
top: -45,
|
|
38
|
+
},
|
|
39
|
+
button: {
|
|
40
|
+
backgroundColor: lib_1.colors.bkBeige,
|
|
41
|
+
paddingVertical: 5,
|
|
42
|
+
paddingHorizontal: 10,
|
|
43
|
+
borderRadius: 20,
|
|
44
|
+
borderWidth: 1,
|
|
45
|
+
borderColor: lib_1.colors.ltBlack,
|
|
46
|
+
marginHorizontal: 5,
|
|
47
|
+
alignItems: "center",
|
|
48
|
+
},
|
|
49
|
+
buttonText: {
|
|
50
|
+
fontSize: 12,
|
|
51
|
+
color: lib_1.colors.text,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
exports.default = ToggleRange;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var common_1 = require("@nakamura-123/common");
|
|
7
|
+
var lib_1 = require("@nakamura-123/lib");
|
|
8
|
+
var react_1 = __importDefault(require("react"));
|
|
9
|
+
var react_native_1 = require("react-native");
|
|
10
|
+
var AppReviews = function (_a) {
|
|
11
|
+
var comments = _a.comments;
|
|
12
|
+
return (<react_native_1.View style={styles.container}>
|
|
13
|
+
<react_native_1.View style={{ width: "100%" }}>
|
|
14
|
+
<common_1.RoundRectangle title="アプリの口コミ" color="blue"/>
|
|
15
|
+
</react_native_1.View>
|
|
16
|
+
{comments.map(function (comment, index) { return (<react_native_1.View key={index} style={styles.reviewBox}>
|
|
17
|
+
<common_1.MyText style={styles.reviewText} fsize="sm" color="gray">
|
|
18
|
+
{comment.msg}
|
|
19
|
+
</common_1.MyText>
|
|
20
|
+
<common_1.MyText fsize="sm" color="gray">
|
|
21
|
+
({comment.day})
|
|
22
|
+
</common_1.MyText>
|
|
23
|
+
</react_native_1.View>); })}
|
|
24
|
+
</react_native_1.View>);
|
|
25
|
+
};
|
|
26
|
+
var styles = react_native_1.StyleSheet.create({
|
|
27
|
+
container: {
|
|
28
|
+
flex: 1,
|
|
29
|
+
justifyContent: "center",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
},
|
|
32
|
+
text: {
|
|
33
|
+
fontSize: 20,
|
|
34
|
+
color: "#000",
|
|
35
|
+
},
|
|
36
|
+
reviewBox: {
|
|
37
|
+
backgroundColor: lib_1.colors.bkBeige,
|
|
38
|
+
width: "100%",
|
|
39
|
+
padding: 10,
|
|
40
|
+
borderRadius: 10,
|
|
41
|
+
marginBottom: 10,
|
|
42
|
+
},
|
|
43
|
+
reviewText: {},
|
|
44
|
+
});
|
|
45
|
+
exports.default = AppReviews;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var react_native_1 = require("react-native");
|
|
8
|
+
var common_1 = require("@nakamura-123/common");
|
|
9
|
+
var CatchCopy = function () {
|
|
10
|
+
return (<react_native_1.View style={styles.container}>
|
|
11
|
+
<common_1.MyText style={styles.text}>いつでもスマホで試験対策</common_1.MyText>
|
|
12
|
+
<common_1.MyText style={styles.msg}>本より安く、合格まで速く</common_1.MyText>
|
|
13
|
+
</react_native_1.View>);
|
|
14
|
+
};
|
|
15
|
+
var styles = react_native_1.StyleSheet.create({
|
|
16
|
+
container: {
|
|
17
|
+
flex: 1,
|
|
18
|
+
justifyContent: "center",
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
marginTop: 20,
|
|
21
|
+
marginBottom: 40,
|
|
22
|
+
},
|
|
23
|
+
text: {
|
|
24
|
+
fontSize: 20,
|
|
25
|
+
fontWeight: "bold",
|
|
26
|
+
},
|
|
27
|
+
msg: {
|
|
28
|
+
marginTop: 5,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
exports.default = CatchCopy;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var common_1 = require("@nakamura-123/common");
|
|
7
|
+
var lib_1 = require("@nakamura-123/lib");
|
|
8
|
+
var react_1 = __importDefault(require("react"));
|
|
9
|
+
var react_native_1 = require("react-native");
|
|
10
|
+
var items = [
|
|
11
|
+
{
|
|
12
|
+
title: "有効期限は無し",
|
|
13
|
+
sub: "来年以降も常に最新版を利用可能。さらに、買い切り型なので毎月の支払いは不要です。",
|
|
14
|
+
icon: "ban",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
title: "ていねいな解説",
|
|
18
|
+
sub: "初学者でも安心!わかりやすい解説を掲載。また、検索機能ですぐにWEB情報も確認できる。",
|
|
19
|
+
icon: "question-circle",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
title: "豊富なモードで0から学べる",
|
|
23
|
+
sub: "まずは単元モードで基礎固め。人気の模試モードや集中特訓モードなど有料版限定機能も。",
|
|
24
|
+
icon: "route",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: "自分にピッタリな勉強法",
|
|
28
|
+
sub: "ふせん機能や問題選択機能など機能充実。アップデートでアプリは進化し続ける。",
|
|
29
|
+
icon: "thumbs-up",
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
var Recommend = function () {
|
|
33
|
+
return (<react_native_1.View style={styles.container}>
|
|
34
|
+
<react_native_1.View style={styles.topRound}>
|
|
35
|
+
<common_1.RoundRectangle title="アプリの魅力" color="blue" width={200}/>
|
|
36
|
+
</react_native_1.View>
|
|
37
|
+
{items.map(function (item, index) { return (<react_native_1.View key={index} style={styles.contentBox}>
|
|
38
|
+
<react_native_1.View style={styles.iconBox}>
|
|
39
|
+
<common_1.IconInCircle name={item.icon} circleColor="ltBlue" iconColor="gray" size={25}/>
|
|
40
|
+
</react_native_1.View>
|
|
41
|
+
<react_native_1.View style={styles.textBox}>
|
|
42
|
+
<common_1.MyText style={styles.title} fsize="md" color="gray">
|
|
43
|
+
{index + 1}.{item.title}
|
|
44
|
+
</common_1.MyText>
|
|
45
|
+
<common_1.MyText style={styles.msg} fsize="sm" color="gray">
|
|
46
|
+
{item.sub}
|
|
47
|
+
</common_1.MyText>
|
|
48
|
+
</react_native_1.View>
|
|
49
|
+
</react_native_1.View>); })}
|
|
50
|
+
</react_native_1.View>);
|
|
51
|
+
};
|
|
52
|
+
var styles = react_native_1.StyleSheet.create({
|
|
53
|
+
container: {
|
|
54
|
+
flex: 1,
|
|
55
|
+
justifyContent: "center",
|
|
56
|
+
alignItems: "center",
|
|
57
|
+
backgroundColor: lib_1.colors.bkBeige,
|
|
58
|
+
borderWidth: 1,
|
|
59
|
+
borderColor: lib_1.colors.blue,
|
|
60
|
+
borderRadius: 10,
|
|
61
|
+
paddingTop: 30,
|
|
62
|
+
paddingBottom: 10,
|
|
63
|
+
},
|
|
64
|
+
topRound: {
|
|
65
|
+
position: "absolute",
|
|
66
|
+
top: -10,
|
|
67
|
+
},
|
|
68
|
+
contentBox: {
|
|
69
|
+
flexDirection: "row",
|
|
70
|
+
paddingHorizontal: 10,
|
|
71
|
+
marginBottom: 10,
|
|
72
|
+
},
|
|
73
|
+
iconBox: {
|
|
74
|
+
flex: 1,
|
|
75
|
+
justifyContent: "center",
|
|
76
|
+
alignItems: "center",
|
|
77
|
+
},
|
|
78
|
+
textBox: {
|
|
79
|
+
flex: 3,
|
|
80
|
+
padding: 5,
|
|
81
|
+
},
|
|
82
|
+
title: {},
|
|
83
|
+
msg: {
|
|
84
|
+
// marginTop: 5,
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
exports.default = Recommend;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var react_native_1 = require("react-native");
|
|
8
|
+
var react_2 = require("@realm/react");
|
|
9
|
+
var db_1 = require("@nakamura-123/db");
|
|
10
|
+
var common_1 = require("@nakamura-123/common");
|
|
11
|
+
var TagBadge5s = function (_a) {
|
|
12
|
+
var subject = _a.subject;
|
|
13
|
+
var TagDB = (0, react_2.useQuery)(db_1.TagSchema);
|
|
14
|
+
console.log(TagDB);
|
|
15
|
+
var tagInfos = [
|
|
16
|
+
{ circleColor: "red", cnt: 1 },
|
|
17
|
+
{ circleColor: "blue", cnt: 2 },
|
|
18
|
+
{ circleColor: "green", cnt: 3 },
|
|
19
|
+
{ circleColor: "yellow", cnt: 4 },
|
|
20
|
+
{ circleColor: "purple", cnt: 5 },
|
|
21
|
+
];
|
|
22
|
+
return (<react_native_1.View style={styles.container}>
|
|
23
|
+
{" "}
|
|
24
|
+
{tagInfos.map(function (tag, i) { return (<common_1.Badge key={i} name={String(tag.cnt)} icon={"tag"}
|
|
25
|
+
// circleColor={tag.color}
|
|
26
|
+
style={styles.badge}/>); })}
|
|
27
|
+
</react_native_1.View>);
|
|
28
|
+
};
|
|
29
|
+
var styles = react_native_1.StyleSheet.create({
|
|
30
|
+
container: {
|
|
31
|
+
flexDirection: "row",
|
|
32
|
+
justifyContent: "space-between",
|
|
33
|
+
width: "100%",
|
|
34
|
+
marginTop: 5,
|
|
35
|
+
},
|
|
36
|
+
badge: {
|
|
37
|
+
borderWidth: 0,
|
|
38
|
+
backgroundColor: "transparent",
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
exports.default = TagBadge5s;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var react_native_1 = require("react-native");
|
|
8
|
+
var react_2 = require("@realm/react");
|
|
9
|
+
var db_1 = require("@nakamura-123/db");
|
|
10
|
+
var common_1 = require("@nakamura-123/common");
|
|
11
|
+
var tagFnc_1 = require("../../functions/tagFnc");
|
|
12
|
+
var TagBadge5s = function (_a) {
|
|
13
|
+
var TagDB = (0, react_2.useQuery)(db_1.TagSchema);
|
|
14
|
+
var tagLegels = TagDB.map(function (tag) { return tag.level; });
|
|
15
|
+
var tag5Infos = (0, tagFnc_1.countTagsByLevel)(tagLegels);
|
|
16
|
+
return (<react_native_1.View style={styles.container}>
|
|
17
|
+
{tag5Infos.map(function (tag, i) { return (<common_1.Badge key={i} name={String(tag.cnt)} icon={"tag"} circleColor={tag.color} style={styles.badge}/>); })}
|
|
18
|
+
</react_native_1.View>);
|
|
19
|
+
};
|
|
20
|
+
var styles = react_native_1.StyleSheet.create({
|
|
21
|
+
container: {
|
|
22
|
+
flexDirection: "row",
|
|
23
|
+
justifyContent: "space-between",
|
|
24
|
+
width: "100%",
|
|
25
|
+
marginTop: 5,
|
|
26
|
+
},
|
|
27
|
+
badge: {
|
|
28
|
+
borderWidth: 0,
|
|
29
|
+
backgroundColor: "transparent",
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
exports.default = TagBadge5s;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var react_native_1 = require("react-native");
|
|
19
|
+
var react_2 = require("@realm/react");
|
|
20
|
+
var react_redux_1 = require("react-redux");
|
|
21
|
+
var common_1 = require("@nakamura-123/common");
|
|
22
|
+
var lib_1 = require("@nakamura-123/lib");
|
|
23
|
+
var db_1 = require("@nakamura-123/db");
|
|
24
|
+
var BasicBadge = function (_a) {
|
|
25
|
+
var info = _a.info;
|
|
26
|
+
var BadgesDB = (0, react_2.useQuery)(db_1.BadgeSchema);
|
|
27
|
+
var basicBadgeSet = lib_1.badgeSet.badge5Sets.basic;
|
|
28
|
+
var list = (0, react_redux_1.useSelector)(function (state) { return state.app[info.list]; });
|
|
29
|
+
var maxBadgeCnt = list.length;
|
|
30
|
+
// バッジ情報をまとめる
|
|
31
|
+
var badge5sInfos = basicBadgeSet.map(function (badge) {
|
|
32
|
+
var matchingBadges = BadgesDB.filtered("subject == $0 AND badgeId == $1", info.subject, badge.id);
|
|
33
|
+
var matchCnt = matchingBadges.length;
|
|
34
|
+
return __assign(__assign({}, badge), { isExist: matchCnt > 0, matchCnt: matchCnt });
|
|
35
|
+
});
|
|
36
|
+
// バッジを集計
|
|
37
|
+
return (<react_native_1.View style={styles.container}>
|
|
38
|
+
<common_1.IconTitle title={info.name} icon={info.icon} withBackground/>
|
|
39
|
+
<react_native_1.View style={styles.badgeBox}>
|
|
40
|
+
{badge5sInfos.map(function (badge) { return (<react_native_1.View style={styles.badge} key={badge.id}>
|
|
41
|
+
<common_1.Badge name={badge.name} icon={badge.icon} badgeColor={badge.color} isEmpty={!badge.isExist}/>
|
|
42
|
+
<react_native_1.View style={styles.txtBox}>
|
|
43
|
+
<common_1.MyText fsize="sm" style={styles.txt}>
|
|
44
|
+
{"".concat(badge.matchCnt, "/").concat(maxBadgeCnt)}
|
|
45
|
+
</common_1.MyText>
|
|
46
|
+
</react_native_1.View>
|
|
47
|
+
</react_native_1.View>); })}
|
|
48
|
+
</react_native_1.View>
|
|
49
|
+
</react_native_1.View>);
|
|
50
|
+
};
|
|
51
|
+
var styles = react_native_1.StyleSheet.create({
|
|
52
|
+
container: {
|
|
53
|
+
// marginBottom: 10,
|
|
54
|
+
},
|
|
55
|
+
badge: {
|
|
56
|
+
alignItems: "center",
|
|
57
|
+
},
|
|
58
|
+
badgeBox: {
|
|
59
|
+
flexDirection: "row",
|
|
60
|
+
justifyContent: "space-between",
|
|
61
|
+
marginBottom: 5,
|
|
62
|
+
},
|
|
63
|
+
txtBox: {
|
|
64
|
+
paddingVertical: 3,
|
|
65
|
+
paddingHorizontal: 6,
|
|
66
|
+
marginTop: 5,
|
|
67
|
+
backgroundColor: lib_1.colors.ltBeige,
|
|
68
|
+
borderRadius: 20,
|
|
69
|
+
},
|
|
70
|
+
txt: {},
|
|
71
|
+
});
|
|
72
|
+
exports.default = BasicBadge;
|