@nakamura-123/pages 1.1.17 → 1.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/Basic/Badge5s.js +18 -30
- package/dist/component/Basic/BasicContents.js +38 -39
- package/dist/component/Basic/BasicProgressBar.js +16 -17
- package/dist/component/Basic/BasicSetting.js +14 -15
- package/dist/component/Basic/MiniTestCard.js +32 -33
- package/dist/component/Basic/Paw5s.js +9 -13
- package/dist/component/Basic/SelectedExamCnt.js +14 -15
- package/dist/component/Basic/SubCategoryLeft.js +5 -6
- package/dist/component/Basic/SubCategoryList.js +49 -62
- package/dist/component/Boot/SelectRange.js +18 -21
- package/dist/component/Boot/ToggleRange.js +11 -14
- package/dist/component/Coin/AppReviews.js +9 -10
- package/dist/component/Coin/CatchCopy.js +6 -6
- package/dist/component/Coin/CoinCheck.js +18 -54
- package/dist/component/Coin/CoinFnc.js +210 -282
- package/dist/component/Coin/CoinPageComponent.d.ts +1 -0
- package/dist/component/Coin/CoinPageComponent.js +22 -22
- package/dist/component/Coin/ReceiptFnc.js +3 -3
- package/dist/component/Coin/Recommend.js +10 -10
- package/dist/component/Coin/WaitingPayBanner.js +8 -9
- package/dist/component/Discription.js +6 -7
- package/dist/component/Grade/AllTags.js +12 -12
- package/dist/component/Grade/BasicBadge.js +20 -32
- package/dist/component/Grade/GradeCard/ChangeWeeklyModal.js +8 -10
- package/dist/component/Grade/GradeCard/ChangeWeeklyTargetBtn.js +21 -22
- package/dist/component/Grade/GradeCard/DatePickerModal.js +17 -19
- package/dist/component/Grade/GradeCard/GradeCard.js +19 -20
- package/dist/component/Grade/GradeCard/Square3sGrade.js +16 -17
- package/dist/component/Grade/GradeCard/TargetDate.js +19 -20
- package/dist/component/Grade/GradeCard/WeeklyAchivedRate.js +7 -8
- package/dist/component/Grade/GradeCard/WeeklyProgress.js +19 -29
- package/dist/component/Grade/JAllTags.js +16 -16
- package/dist/component/Grade/QuizCntGraph.js +31 -45
- package/dist/component/Grade/ShareBtn.js +30 -68
- package/dist/component/Grade/Square4s.js +14 -15
- package/dist/component/Grade/UnitCircles.js +18 -23
- package/dist/component/Grade/YearCircles.js +17 -22
- package/dist/component/Guide.js +6 -7
- package/dist/component/Home/OpeningMsg.js +14 -14
- package/dist/component/OnlineInput/OnlineInputFnc.js +6 -6
- package/dist/component/OnlineInput/OnlineSaveBtn.js +7 -8
- package/dist/component/OnlineInput/OnlineSavedList.js +13 -14
- package/dist/component/OnlineInput/PasswardModal.js +64 -110
- package/dist/component/OnlineInput/PasswordIdModal.js +40 -80
- package/dist/component/QuizSet/QuizOptionDrill.js +29 -42
- package/dist/component/Result/AdCard.js +21 -16
- package/dist/component/Result/CharaCard.js +15 -16
- package/dist/component/Result/LessonTitle.js +10 -10
- package/dist/component/Result/QuizFlatList.js +26 -30
- package/dist/component/Result/ScoreCircle.js +8 -9
- package/dist/component/SelectRange/SelectYearRange.js +22 -34
- package/dist/component/SettingBtns/QuizOptionSelector.js +16 -17
- package/dist/component/SettingBtns/Range.js +9 -9
- package/dist/component/SettingBtns/TransBtn.js +17 -17
- package/dist/component/TabAnimeView.js +9 -10
- package/dist/component/Tag5s.js +10 -14
- package/dist/component/TagBadge5s.js +16 -17
- package/dist/component/TagBadge5sPress.js +14 -15
- package/dist/component/TestPage/AverageBar.js +12 -24
- package/dist/component/TestPage/BarChartContainer.js +30 -31
- package/dist/component/TestPage/ChartControl.js +5 -6
- package/dist/component/TestPage/Square3s.js +12 -13
- package/dist/functions/badgeBasicFnc.js +22 -42
- package/dist/functions/badgeDailyFnc.js +24 -35
- package/dist/functions/badgeFilter.js +16 -18
- package/dist/functions/badgeFnc.js +24 -33
- package/dist/functions/createQuizFncD.js +33 -33
- package/dist/functions/createQuizFncJ.js +27 -33
- package/dist/functions/gradeFnc.js +48 -87
- package/dist/functions/oldStorageFnc.js +77 -200
- package/dist/functions/questionFilterD.js +19 -28
- package/dist/functions/questionFilterJ.js +9 -9
- package/dist/functions/questionFormatD.js +34 -47
- package/dist/functions/questionFormatJ.js +30 -41
- package/dist/functions/tagFncD.js +37 -39
- package/dist/functions/tagFncJ.js +16 -19
- package/dist/functions/testFnc.js +6 -7
- package/dist/hooks/BadgeHook.js +24 -35
- package/dist/hooks/ExitQuizHook.js +21 -21
- package/dist/hooks/basicHook.js +12 -12
- package/dist/hooks/quizActionHook.js +44 -57
- package/dist/hooks/quizHook.d.ts +2 -1
- package/dist/hooks/quizHook.js +58 -48
- package/dist/index.js +25 -25
- package/dist/page/BadgePage.js +26 -29
- package/dist/page/BasicPage.js +23 -25
- package/dist/page/BootPage.js +48 -53
- package/dist/page/CoinPage.d.ts +1 -0
- package/dist/page/CoinPage.js +90 -144
- package/dist/page/FAQPage.js +23 -23
- package/dist/page/GetBadgePage.js +35 -71
- package/dist/page/GradePage.js +26 -27
- package/dist/page/GuidePage.js +28 -33
- package/dist/page/HistoryPage.js +25 -33
- package/dist/page/HomePage.d.ts +1 -0
- package/dist/page/HomePage.js +62 -108
- package/dist/page/ImgZoom.js +8 -9
- package/dist/page/InformationPage.js +15 -15
- package/dist/page/JDetailSettingPage.js +23 -25
- package/dist/page/OnlineInputPage.js +19 -20
- package/dist/page/QuizPage.js +25 -26
- package/dist/page/QuizSettingPage.js +19 -19
- package/dist/page/QuizSetupPage.js +40 -43
- package/dist/page/ReportPage.js +55 -94
- package/dist/page/ResultPage.js +55 -103
- package/dist/page/SettingPage.js +35 -40
- package/dist/page/TestPage.js +41 -44
- package/dist/quiz/QuizContentsDrill.js +17 -18
- package/dist/quiz/QuizContentsJLPT.js +8 -9
- package/dist/quiz/Title.js +22 -22
- package/dist/quiz/answer/Answer.js +20 -20
- package/dist/quiz/answer/BlangGuide.js +10 -10
- package/dist/quiz/answer/BlankAnswer.js +11 -12
- package/dist/quiz/answer/BlankBtn.js +10 -10
- package/dist/quiz/answer/CheckButton.js +6 -9
- package/dist/quiz/answer/ChoiceView.js +15 -30
- package/dist/quiz/answer/Input/CollapseExplain.js +10 -11
- package/dist/quiz/answer/Input/InputAnswerBtn.js +9 -9
- package/dist/quiz/answer/Input/InputBox.js +17 -18
- package/dist/quiz/answer/Input/InputCounter.js +6 -7
- package/dist/quiz/answer/Input/InputFnc.js +10 -19
- package/dist/quiz/answer/Input/InputSaveSelector.js +12 -13
- package/dist/quiz/answer/Input/InputTab.js +12 -13
- package/dist/quiz/answer/Input/InputWarnning.js +13 -14
- package/dist/quiz/answer/InputGuide.js +10 -10
- package/dist/quiz/answer/InputNav.js +38 -39
- package/dist/quiz/answer/MultiChoice.js +20 -22
- package/dist/quiz/answer/MultiGuide.js +10 -10
- package/dist/quiz/answer/MultiNextBtn.js +13 -14
- package/dist/quiz/answer/NormalChoice.js +29 -42
- package/dist/quiz/answer/NormalMultiGuide.js +11 -12
- package/dist/quiz/answer/styles/getChoiceStyle.js +4 -4
- package/dist/quiz/check/Check.js +17 -18
- package/dist/quiz/check/NextQuizBtn.js +18 -19
- package/dist/quiz/check/SelectTag.js +36 -51
- package/dist/quiz/common/MyTextqqyy.js +29 -47
- package/dist/quiz/common/PageContainerWrap.js +14 -15
- package/dist/quiz/common/RenderImgOrText.js +17 -18
- package/dist/quiz/common/RubyText.js +21 -35
- package/dist/quiz/common/ZoomableImage.js +6 -9
- package/dist/quiz/explain/CorrectedBar.js +13 -14
- package/dist/quiz/explain/Explain.js +9 -10
- package/dist/quiz/explain/ExplainLogic.js +17 -23
- package/dist/quiz/explain/MovieBtn.js +10 -11
- package/dist/quiz/explain/MultiExplain.js +12 -24
- package/dist/quiz/explain/NormalExplain.js +29 -30
- package/dist/quiz/function/choiceFnc.js +2 -2
- package/dist/quiz/jAnswer/JAnswer.js +24 -26
- package/dist/quiz/jAnswer/JAnswerContents.js +12 -27
- package/dist/quiz/jQuestion/JQuestion.js +12 -13
- package/dist/quiz/jQuestion/JQuestionBottomText.js +14 -15
- package/dist/quiz/jQuestion/JQuestionText.js +13 -14
- package/dist/quiz/jQuestion/QuizCnt.js +9 -9
- package/dist/quiz/jQuestion/TimeLimit.js +23 -25
- package/dist/quiz/question/FillDiagram.js +12 -13
- package/dist/quiz/question/Question.js +25 -26
- package/dist/quiz/question/QuestionFormats.js +29 -45
- package/dist/quiz/question/QuestionReference.js +7 -7
- package/dist/quiz/question/SearchYoutue.js +10 -11
- package/dist/quiz/save/QuizSaveData.js +18 -19
- package/dist/quiz/setting/Above3BtnJ.js +25 -30
- package/dist/quiz/setting/Bottom3Btn.js +25 -30
- package/dist/quiz/setting/GuideBtn.js +19 -22
- package/dist/quiz/setting/RepeatBtn.js +27 -34
- package/dist/quiz/setting/ReturnBtn.js +8 -20
- package/dist/quiz/setting/ReturnSaveBtn.js +21 -33
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,71 +1,59 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
var dispatch = (0, react_redux_1.useDispatch)();
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const react_redux_1 = require("react-redux");
|
|
9
|
+
const common_1 = require("@nakamura-123/common");
|
|
10
|
+
const stores_1 = require("@nakamura-123/stores");
|
|
11
|
+
const SubCategoryLeft_1 = __importDefault(require("./SubCategoryLeft"));
|
|
12
|
+
const tagFncD_1 = require("../../functions/tagFncD");
|
|
13
|
+
const Tag5s_1 = __importDefault(require("../Tag5s"));
|
|
14
|
+
const createQuizFncD_1 = require("../../functions/createQuizFncD");
|
|
15
|
+
const quizActionHook_1 = require("../../hooks/quizActionHook");
|
|
16
|
+
const basicHook_1 = require("../../hooks/basicHook");
|
|
17
|
+
const createQuizFncJ_1 = require("../../functions/createQuizFncJ");
|
|
18
|
+
const tagFncJ_1 = require("../../functions/tagFncJ");
|
|
19
|
+
const SubCategoryList = ({ navigation, topSubject, index, }) => {
|
|
20
|
+
var _a;
|
|
21
|
+
const dispatch = (0, react_redux_1.useDispatch)();
|
|
34
22
|
// Redux states
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
const categoryList = (0, react_redux_1.useSelector)((state) => state.app[topSubject.list]);
|
|
24
|
+
const preSelect = (0, react_redux_1.useSelector)((state) => state.setting.viewSet[topSubject.name].preSelect);
|
|
25
|
+
const outOfYearRange = (0, react_redux_1.useSelector)((state) => state.quizCfg.startCfg.outOfYearRange);
|
|
26
|
+
const startCfg = (0, react_redux_1.useSelector)((state) => state.quizCfg.startCfg);
|
|
39
27
|
// Derived states
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
const selectedList = categoryList[index];
|
|
29
|
+
const selectKey = selectedList.key;
|
|
30
|
+
const subCategories = (_a = selectedList.sub) !== null && _a !== void 0 ? _a : [];
|
|
43
31
|
// const QuestionDB = useQuery(DQuestionSchema);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
32
|
+
const QuestionDBInfo = (0, basicHook_1.useGetQuestionQuery)();
|
|
33
|
+
const useStartQuiz = (0, quizActionHook_1.useStartQuizAction)();
|
|
34
|
+
const getLessonTitle = (index) => {
|
|
47
35
|
if (topSubject.type === "unit")
|
|
48
|
-
return
|
|
49
|
-
return
|
|
36
|
+
return `${selectedList.label} ${subCategories[index].title}`;
|
|
37
|
+
return `${selectedList.title} ${subCategories[index].title}`;
|
|
50
38
|
};
|
|
51
39
|
// 課金ロック
|
|
52
|
-
|
|
40
|
+
const isLocked = common_1.commonHook.useIsLocked(topSubject.type, selectKey);
|
|
53
41
|
// # クイズ開始前の共通処理
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
42
|
+
const handleSetLesson = (index) => {
|
|
43
|
+
const lesson = Object.assign(Object.assign({}, subCategories[index]), { title: getLessonTitle(index) });
|
|
44
|
+
const selected = {
|
|
57
45
|
subject: topSubject.name,
|
|
58
46
|
type: topSubject.type,
|
|
59
47
|
tagName: topSubject.tag,
|
|
60
48
|
system: topSubject.system,
|
|
61
49
|
category: selectKey,
|
|
62
|
-
lesson
|
|
50
|
+
lesson,
|
|
63
51
|
};
|
|
64
52
|
dispatch(stores_1.quizAction.setLesson(selected));
|
|
65
53
|
return selected;
|
|
66
54
|
};
|
|
67
55
|
// # セットアップページへ遷移
|
|
68
|
-
|
|
56
|
+
const handleSubCategory = (index) => {
|
|
69
57
|
if (isLocked)
|
|
70
58
|
navigation.navigate("Coin");
|
|
71
59
|
else {
|
|
@@ -74,47 +62,46 @@ var SubCategoryList = function (_a) {
|
|
|
74
62
|
}
|
|
75
63
|
};
|
|
76
64
|
// ### 長押しでクイズ開始
|
|
77
|
-
|
|
65
|
+
const handleLongPress = (index) => {
|
|
78
66
|
if (isLocked) {
|
|
79
67
|
navigation.navigate("Coin");
|
|
80
68
|
return;
|
|
81
69
|
}
|
|
82
|
-
|
|
70
|
+
const selected = handleSetLesson(index);
|
|
83
71
|
if (!selected)
|
|
84
72
|
return;
|
|
85
|
-
|
|
86
|
-
|
|
73
|
+
const { system, query } = QuestionDBInfo;
|
|
74
|
+
const quizList = system === "JLPT"
|
|
87
75
|
? (0, createQuizFncJ_1.getBasicQuizListJ)(query, startCfg, selected)
|
|
88
76
|
: (0, createQuizFncD_1.getBasicQuizList)(query, startCfg, selected);
|
|
89
|
-
|
|
77
|
+
const { subject, category, lesson } = selected;
|
|
90
78
|
dispatch({
|
|
91
79
|
type: "quiz/saveBasicPreSelect",
|
|
92
|
-
payload: { subject
|
|
80
|
+
payload: { subject, category, lessonKey: lesson.key },
|
|
93
81
|
});
|
|
94
|
-
|
|
82
|
+
const isExistQuiz = useStartQuiz(subject, quizList);
|
|
95
83
|
if (!isExistQuiz)
|
|
96
84
|
return;
|
|
97
85
|
navigation.navigate("Quiz");
|
|
98
86
|
};
|
|
99
87
|
// # タグを取得する関数を選ぶ
|
|
100
|
-
|
|
88
|
+
const getTagFunctions = {
|
|
101
89
|
unit: tagFncD_1.getUnitSubTagLevelCnts,
|
|
102
90
|
year: tagFncD_1.getYearSubTagLevelCnts,
|
|
103
91
|
};
|
|
104
|
-
|
|
92
|
+
const getTagFnc = getTagFunctions[topSubject.type];
|
|
105
93
|
return (<react_native_1.View style={{ flex: 1 }}>
|
|
106
|
-
{subCategories.map(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
var subTags = system === "JLPT"
|
|
94
|
+
{subCategories.map(({ key, title }, i) => {
|
|
95
|
+
const { system, query } = QuestionDBInfo;
|
|
96
|
+
const subTags = system === "JLPT"
|
|
110
97
|
? (0, tagFncJ_1.getUnitSubTagLevelCntsJ)(query, selectKey, key, topSubject.tag)
|
|
111
98
|
: getTagFnc(query, selectKey, key, outOfYearRange);
|
|
112
|
-
|
|
113
|
-
return (<common_1.RectangleCard key={key} title={title} left={<SubCategoryLeft_1.default rate={(0, tagFncD_1.getCategoryRate)(subTags)} isLocked={isLocked}/>} bottom={<Tag5s_1.default tags={subTags}/>} onPress={
|
|
99
|
+
const isPreSelect = preSelect.category === selectKey && preSelect.lessonKey === key;
|
|
100
|
+
return (<common_1.RectangleCard key={key} title={title} left={<SubCategoryLeft_1.default rate={(0, tagFncD_1.getCategoryRate)(subTags)} isLocked={isLocked}/>} bottom={<Tag5s_1.default tags={subTags}/>} onPress={() => handleSubCategory(i)} borderColor={isPreSelect ? "green" : undefined} outerStyle={styles.cardSpacing} onLongPress={() => handleLongPress(i)}/>);
|
|
114
101
|
})}
|
|
115
102
|
</react_native_1.View>);
|
|
116
103
|
};
|
|
117
|
-
|
|
104
|
+
const styles = react_native_1.StyleSheet.create({
|
|
118
105
|
cardSpacing: {
|
|
119
106
|
marginBottom: 20,
|
|
120
107
|
},
|
|
@@ -3,34 +3,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var dispatch = (0, react_redux_1.useDispatch)();
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const react_redux_1 = require("react-redux");
|
|
9
|
+
const common_1 = require("@nakamura-123/common");
|
|
10
|
+
const ToggleRange_1 = __importDefault(require("./ToggleRange"));
|
|
11
|
+
const SelectRange = ({ type }) => {
|
|
12
|
+
const dispatch = (0, react_redux_1.useDispatch)();
|
|
14
13
|
// Reduxの状態を取得
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const storeName = type === "unit" ? "outOfUnit" : "outOfYear";
|
|
15
|
+
const reduxOutOfRanges = (0, react_redux_1.useSelector)((state) => state.setting.boot[storeName]) || [];
|
|
17
16
|
// リストを取得
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
const yearLists = (0, react_redux_1.useSelector)((state) => state.app.yearList);
|
|
18
|
+
const unitList = (0, react_redux_1.useSelector)((state) => state.app.unitList);
|
|
19
|
+
const slectedList = type === "unit" ? unitList : yearLists;
|
|
20
|
+
const dispatchName = type === "unit" ? "setting/toggleUnitRange" : "setting/toggleYearRange";
|
|
21
|
+
const allDispatchName = type === "unit" ? "setting/replaceUnitRange" : "setting/replaceYearRange";
|
|
23
22
|
// 選択肢のON/OFFをトグルする関数
|
|
24
|
-
|
|
25
|
-
return dispatch({ type: dispatchName, payload: key });
|
|
26
|
-
};
|
|
23
|
+
const toggleSelection = (key) => dispatch({ type: dispatchName, payload: key });
|
|
27
24
|
return (<react_native_1.View style={styles.container}>
|
|
28
25
|
<ToggleRange_1.default lists={slectedList} dispatchName={allDispatchName}/>
|
|
29
|
-
{slectedList.map(
|
|
30
|
-
/>)
|
|
26
|
+
{slectedList.map((item, i) => (<common_1.RoundSelectableItem key={i} title={item.title} onPress={() => toggleSelection(item.key)} isSelected={!reduxOutOfRanges.includes(item.key)} // 選択状態を反映
|
|
27
|
+
/>))}
|
|
31
28
|
</react_native_1.View>);
|
|
32
29
|
};
|
|
33
|
-
|
|
30
|
+
const styles = react_native_1.StyleSheet.create({
|
|
34
31
|
container: {
|
|
35
32
|
flexDirection: "row",
|
|
36
33
|
flexWrap: "wrap",
|
|
@@ -3,20 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var dispatch = (0, react_redux_1.useDispatch)();
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const react_redux_1 = require("react-redux");
|
|
9
|
+
const common_1 = require("@nakamura-123/common");
|
|
10
|
+
const lib_1 = require("@nakamura-123/lib");
|
|
11
|
+
const ToggleRange = ({ lists, dispatchName }) => {
|
|
12
|
+
const dispatch = (0, react_redux_1.useDispatch)();
|
|
14
13
|
// すべてのkeyを取得する
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return dispatch({ type: dispatchName, payload: allKeys });
|
|
19
|
-
};
|
|
14
|
+
const allKeys = lists.map((item) => item.key);
|
|
15
|
+
const onSelectAll = () => dispatch({ type: dispatchName, payload: [] });
|
|
16
|
+
const onDeselectAll = () => dispatch({ type: dispatchName, payload: allKeys });
|
|
20
17
|
return (<react_native_1.View style={styles.container}>
|
|
21
18
|
<react_native_1.TouchableOpacity style={styles.button} onPress={onSelectAll}>
|
|
22
19
|
<common_1.MyText style={styles.buttonText}>全選択</common_1.MyText>
|
|
@@ -26,7 +23,7 @@ var ToggleRange = function (_a) {
|
|
|
26
23
|
</react_native_1.TouchableOpacity>
|
|
27
24
|
</react_native_1.View>);
|
|
28
25
|
};
|
|
29
|
-
|
|
26
|
+
const styles = react_native_1.StyleSheet.create({
|
|
30
27
|
container: {
|
|
31
28
|
position: "absolute",
|
|
32
29
|
flexDirection: "row",
|
|
@@ -3,28 +3,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var t = (0, common_1.useDrillTranslation)().t;
|
|
6
|
+
const common_1 = require("@nakamura-123/common");
|
|
7
|
+
const lib_1 = require("@nakamura-123/lib");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const react_native_1 = require("react-native");
|
|
10
|
+
const AppReviews = ({ comments }) => {
|
|
11
|
+
const { t } = (0, common_1.useDrillTranslation)();
|
|
13
12
|
return (<react_native_1.View style={styles.container}>
|
|
14
13
|
<react_native_1.View style={{ width: "100%" }}>
|
|
15
14
|
<common_1.RoundRectangle title={t("coin.title.review")} color="blue"/>
|
|
16
15
|
</react_native_1.View>
|
|
17
|
-
{comments.map(
|
|
16
|
+
{comments.map((comment, index) => (<react_native_1.View key={index} style={styles.reviewBox}>
|
|
18
17
|
<common_1.MyText style={styles.reviewText} fsize="sm" color="gray">
|
|
19
18
|
{comment.msg}
|
|
20
19
|
</common_1.MyText>
|
|
21
20
|
<common_1.MyText fsize="sm" color="gray">
|
|
22
21
|
({comment.day})
|
|
23
22
|
</common_1.MyText>
|
|
24
|
-
</react_native_1.View>)
|
|
23
|
+
</react_native_1.View>))}
|
|
25
24
|
</react_native_1.View>);
|
|
26
25
|
};
|
|
27
|
-
|
|
26
|
+
const styles = react_native_1.StyleSheet.create({
|
|
28
27
|
container: {
|
|
29
28
|
flex: 1,
|
|
30
29
|
justifyContent: "center",
|
|
@@ -3,17 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const common_1 = require("@nakamura-123/common");
|
|
9
|
+
const CatchCopy = () => {
|
|
10
|
+
const { t } = (0, common_1.useDrillTranslation)();
|
|
11
11
|
return (<react_native_1.View style={styles.container}>
|
|
12
12
|
<common_1.MyText style={styles.text}>{t("coin.catchCopy.title")}</common_1.MyText>
|
|
13
13
|
<common_1.MyText style={styles.msg}>{t("coin.catchCopy.msg")}</common_1.MyText>
|
|
14
14
|
</react_native_1.View>);
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
const styles = react_native_1.StyleSheet.create({
|
|
17
17
|
container: {
|
|
18
18
|
flex: 1,
|
|
19
19
|
justifyContent: "center",
|
|
@@ -8,67 +8,31 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
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;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
12
|
exports.isCheckRequired = exports.coinCheckFnc = void 0;
|
|
40
|
-
|
|
13
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
41
14
|
// import { initConnection } from "expo-iap";
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
15
|
+
const lib_1 = require("@nakamura-123/lib");
|
|
16
|
+
const CoinFnc_1 = require("./CoinFnc");
|
|
17
|
+
const stores_1 = require("@nakamura-123/stores");
|
|
45
18
|
// 00.メイン関数
|
|
46
|
-
exports.coinCheckFnc = (0, toolkit_1.createAsyncThunk)("coin/check",
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
});
|
|
63
|
-
}); });
|
|
19
|
+
exports.coinCheckFnc = (0, toolkit_1.createAsyncThunk)("coin/check", (allFreeId_1, _a) => __awaiter(void 0, [allFreeId_1, _a], void 0, function* (allFreeId, { dispatch }) {
|
|
20
|
+
const receipts = yield (0, CoinFnc_1.restorePurchases)(dispatch, false);
|
|
21
|
+
const isExistedId = hasPurchasedItems(receipts, allFreeId);
|
|
22
|
+
if (!isExistedId) {
|
|
23
|
+
// 返金などをされていて、flaseの場合、このIDのアイテムを削除し、store更新
|
|
24
|
+
stores_1.coinStorage.removePurchasedItem(allFreeId);
|
|
25
|
+
dispatch({ type: "setting/updateAllFreeState", payload: "none" });
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
64
28
|
// 91. 復元を行い、チェックが必要か判定
|
|
65
|
-
|
|
29
|
+
const isCheckRequired = (allFreeState, lastCheckedDate, isCompoleteFree) => {
|
|
66
30
|
if (isCompoleteFree)
|
|
67
31
|
return false;
|
|
68
32
|
if (allFreeState === "none")
|
|
69
33
|
return false;
|
|
70
|
-
|
|
71
|
-
|
|
34
|
+
const isOver3Days = lib_1.timeFnc.isOver3Days(lastCheckedDate);
|
|
35
|
+
const isOver1Day = lib_1.timeFnc.isOver1Day(lastCheckedDate);
|
|
72
36
|
if (!isOver3Days && allFreeState === "paid")
|
|
73
37
|
return false;
|
|
74
38
|
if (!isOver1Day && allFreeState === "wait")
|
|
@@ -77,8 +41,8 @@ var isCheckRequired = function (allFreeState, lastCheckedDate, isCompoleteFree)
|
|
|
77
41
|
};
|
|
78
42
|
exports.isCheckRequired = isCheckRequired;
|
|
79
43
|
// 92. 課金アイテムが有るかを確認
|
|
80
|
-
|
|
44
|
+
const hasPurchasedItems = (receipts, id) => {
|
|
81
45
|
if (!receipts)
|
|
82
46
|
return false;
|
|
83
|
-
return receipts.some(
|
|
47
|
+
return receipts.some((receipt) => receipt.productId === id);
|
|
84
48
|
};
|