@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.
Files changed (334) hide show
  1. package/dist/component/Badge5s.d.ts +9 -0
  2. package/dist/component/Badge5s.js +46 -0
  3. package/dist/component/BasicSetting.d.ts +9 -0
  4. package/dist/component/BasicSetting.js +31 -0
  5. package/dist/component/Boot/IconTitleAndToggle.d.ts +8 -0
  6. package/dist/component/Boot/IconTitleAndToggle.js +20 -0
  7. package/dist/component/Boot/SelectRange.d.ts +6 -0
  8. package/dist/component/Boot/SelectRange.js +44 -0
  9. package/dist/component/Boot/SelectUnit.d.ts +6 -0
  10. package/dist/component/Boot/SelectUnit.js +41 -0
  11. package/dist/component/Boot/ToggleRange.d.ts +8 -0
  12. package/dist/component/Boot/ToggleRange.js +54 -0
  13. package/dist/component/Coin/AppReviews.d.ts +10 -0
  14. package/dist/component/Coin/AppReviews.js +45 -0
  15. package/dist/component/Coin/CatchCopy.d.ts +3 -0
  16. package/dist/component/Coin/CatchCopy.js +31 -0
  17. package/dist/component/Coin/Recommend.d.ts +3 -0
  18. package/dist/component/Coin/Recommend.js +87 -0
  19. package/dist/component/Grade/AllBadges.d.ts +7 -0
  20. package/dist/component/Grade/AllBadges.js +41 -0
  21. package/dist/component/Grade/AllTags.d.ts +5 -0
  22. package/dist/component/Grade/AllTags.js +32 -0
  23. package/dist/component/Grade/BasicBadge.d.ts +7 -0
  24. package/dist/component/Grade/BasicBadge.js +72 -0
  25. package/dist/component/Grade/ChangeWeeklyTargetBtn.d.ts +5 -0
  26. package/dist/component/Grade/ChangeWeeklyTargetBtn.js +39 -0
  27. package/dist/component/Grade/DatePickerModal.d.ts +8 -0
  28. package/dist/component/Grade/DatePickerModal.js +45 -0
  29. package/dist/component/Grade/GradeCard/ChangeWeeklyModal.d.ts +13 -0
  30. package/dist/component/Grade/GradeCard/ChangeWeeklyModal.js +39 -0
  31. package/dist/component/Grade/GradeCard/ChangeWeeklyTargetBtn.d.ts +7 -0
  32. package/dist/component/Grade/GradeCard/ChangeWeeklyTargetBtn.js +60 -0
  33. package/dist/component/Grade/GradeCard/DatePickerModal.d.ts +8 -0
  34. package/dist/component/Grade/GradeCard/DatePickerModal.js +49 -0
  35. package/dist/component/Grade/GradeCard/GradeCard.d.ts +7 -0
  36. package/dist/component/Grade/GradeCard/GradeCard.js +53 -0
  37. package/dist/component/Grade/GradeCard/Square3sGrade.d.ts +11 -0
  38. package/dist/component/Grade/GradeCard/Square3sGrade.js +60 -0
  39. package/dist/component/Grade/GradeCard/TargetDate.d.ts +7 -0
  40. package/dist/component/Grade/GradeCard/TargetDate.js +60 -0
  41. package/dist/component/Grade/GradeCard/WeeklyAchivedRate.d.ts +9 -0
  42. package/dist/component/Grade/GradeCard/WeeklyAchivedRate.js +28 -0
  43. package/dist/component/Grade/GradeCard/WeeklyProgress.d.ts +11 -0
  44. package/dist/component/Grade/GradeCard/WeeklyProgress.js +88 -0
  45. package/dist/component/Grade/GradeCard.d.ts +4 -0
  46. package/dist/component/Grade/GradeCard.js +53 -0
  47. package/dist/component/Grade/QuizCntGraph.d.ts +8 -0
  48. package/dist/component/Grade/QuizCntGraph.js +104 -0
  49. package/dist/component/Grade/Scuare3sGrade.d.ts +9 -0
  50. package/dist/component/Grade/Scuare3sGrade.js +35 -0
  51. package/dist/component/Grade/ShareBtn.d.ts +6 -0
  52. package/dist/component/Grade/ShareBtn.js +86 -0
  53. package/dist/component/Grade/Square3sGrade.d.ts +9 -0
  54. package/dist/component/Grade/Square3sGrade.js +63 -0
  55. package/dist/component/Grade/Square4s.d.ts +7 -0
  56. package/dist/component/Grade/Square4s.js +63 -0
  57. package/dist/component/Grade/TargetDate.d.ts +4 -0
  58. package/dist/component/Grade/TargetDate.js +56 -0
  59. package/dist/component/Grade/WeeklyAchivedRate.d.ts +7 -0
  60. package/dist/component/Grade/WeeklyAchivedRate.js +28 -0
  61. package/dist/component/Grade/WeeklyProgress.d.ts +9 -0
  62. package/dist/component/Grade/WeeklyProgress.js +80 -0
  63. package/dist/component/HeadNavigator.d.ts +0 -0
  64. package/dist/component/HeadNavigator.js +49 -0
  65. package/dist/component/HomePage.d.ts +8 -0
  66. package/dist/component/HomePage.js +44 -0
  67. package/dist/component/MiniTestCard.d.ts +9 -0
  68. package/dist/component/MiniTestCard.js +75 -0
  69. package/dist/component/Paw4s.d.ts +7 -0
  70. package/dist/component/Paw4s.js +51 -0
  71. package/dist/component/Paw5s.d.ts +7 -0
  72. package/dist/component/Paw5s.js +51 -0
  73. package/dist/component/QuizSet/QuizOptionDrill.d.ts +5 -0
  74. package/dist/component/QuizSet/QuizOptionDrill.js +46 -0
  75. package/dist/component/QuizSet/QuizSetDrill.d.ts +5 -0
  76. package/dist/component/QuizSet/QuizSetDrill.js +43 -0
  77. package/dist/component/Result/CharaCard.d.ts +7 -0
  78. package/dist/component/Result/CharaCard.js +43 -0
  79. package/dist/component/Result/LessonTitle.d.ts +3 -0
  80. package/dist/component/Result/LessonTitle.js +42 -0
  81. package/dist/component/Result/QuizFlatList.d.ts +7 -0
  82. package/dist/component/Result/QuizFlatList.js +76 -0
  83. package/dist/component/Result/ScoreBox.d.ts +7 -0
  84. package/dist/component/Result/ScoreBox.js +61 -0
  85. package/dist/component/Result/ScoreCircle.d.ts +7 -0
  86. package/dist/component/Result/ScoreCircle.js +59 -0
  87. package/dist/component/SelectRange/SelectYearRange.d.ts +7 -0
  88. package/dist/component/SelectRange/SelectYearRange.js +105 -0
  89. package/dist/component/SettingBtns/Config.d.ts +8 -0
  90. package/dist/component/SettingBtns/Config.js +17 -0
  91. package/dist/component/SettingBtns/Grade.d.ts +8 -0
  92. package/dist/component/SettingBtns/Grade.js +17 -0
  93. package/dist/component/SettingBtns/QuizOptionSelector.d.ts +7 -0
  94. package/dist/component/SettingBtns/QuizOptionSelector.js +43 -0
  95. package/dist/component/SettingBtns/Range.d.ts +5 -0
  96. package/dist/component/SettingBtns/Range.js +44 -0
  97. package/dist/component/SettingBtns/Report.d.ts +5 -0
  98. package/dist/component/SettingBtns/Report.js +16 -0
  99. package/dist/component/SettingBtns/Setting.d.ts +0 -0
  100. package/dist/component/SettingBtns/Setting.js +1 -0
  101. package/dist/component/Square3s.d.ts +7 -0
  102. package/dist/component/Square3s.js +38 -0
  103. package/dist/component/SubCagegoryList.d.ts +8 -0
  104. package/dist/component/SubCagegoryList.js +120 -0
  105. package/dist/component/SubCategoryLeft.d.ts +5 -0
  106. package/dist/component/SubCategoryLeft.js +14 -0
  107. package/dist/component/SubCategoryList.d.ts +9 -0
  108. package/dist/component/SubCategoryList.js +77 -0
  109. package/dist/component/TabAnimeView.d.ts +7 -0
  110. package/dist/component/TabAnimeView.js +61 -0
  111. package/dist/component/TabContents.d.ts +1 -0
  112. package/dist/component/TabContents.js +18 -0
  113. package/dist/component/TabContentsWrap.d.ts +7 -0
  114. package/dist/component/TabContentsWrap.js +38 -0
  115. package/dist/component/Tag5s.d.ts +6 -0
  116. package/dist/component/Tag5s.js +49 -0
  117. package/dist/component/TagBadge5s.d.ts +7 -0
  118. package/dist/component/TagBadge5s.js +63 -0
  119. package/dist/component/TagBadge5sPress.d.ts +6 -0
  120. package/dist/component/TagBadge5sPress.js +29 -0
  121. package/dist/component/TestCard.d.ts +7 -0
  122. package/dist/component/TestCard.js +57 -0
  123. package/dist/component/TestPage/AverageBar.d.ts +11 -0
  124. package/dist/component/TestPage/AverageBar.js +74 -0
  125. package/dist/component/TestPage/BarChart.d.ts +7 -0
  126. package/dist/component/TestPage/BarChart.js +107 -0
  127. package/dist/component/TestPage/BarChartContainer.d.ts +9 -0
  128. package/dist/component/TestPage/BarChartContainer.js +99 -0
  129. package/dist/component/TestPage/BarGraph.d.ts +11 -0
  130. package/dist/component/TestPage/BarGraph.js +60 -0
  131. package/dist/component/TestPage/ChartControl.d.ts +10 -0
  132. package/dist/component/TestPage/ChartControl.js +43 -0
  133. package/dist/component/TestPage/Square3s.d.ts +9 -0
  134. package/dist/component/TestPage/Square3s.js +35 -0
  135. package/dist/component/UnitPage.d.ts +10 -0
  136. package/dist/component/UnitPage.js +15 -0
  137. package/dist/functions/InQuizFnc.d.ts +0 -0
  138. package/dist/functions/InQuizFnc.js +1 -0
  139. package/dist/functions/badgeBasicFnc.d.ts +14 -0
  140. package/dist/functions/badgeBasicFnc.js +68 -0
  141. package/dist/functions/badgeDailyFnc.d.ts +15 -0
  142. package/dist/functions/badgeDailyFnc.js +65 -0
  143. package/dist/functions/badgeFilter.d.ts +17 -0
  144. package/dist/functions/badgeFilter.js +33 -0
  145. package/dist/functions/badgeFnc.d.ts +15 -0
  146. package/dist/functions/badgeFnc.js +68 -0
  147. package/dist/functions/createQuizFnc.d.ts +13 -0
  148. package/dist/functions/createQuizFnc.js +69 -0
  149. package/dist/functions/gradeFnc.d.ts +16 -0
  150. package/dist/functions/gradeFnc.js +83 -0
  151. package/dist/functions/questionFilter.d.ts +16 -0
  152. package/dist/functions/questionFilter.js +79 -0
  153. package/dist/functions/questionFormat.d.ts +7 -0
  154. package/dist/functions/questionFormat.js +89 -0
  155. package/dist/functions/tagFnc.d.ts +22 -0
  156. package/dist/functions/tagFnc.js +105 -0
  157. package/dist/functions/testFnc.d.ts +8 -0
  158. package/dist/functions/testFnc.js +21 -0
  159. package/dist/helper/scoreFnc.d.ts +10 -0
  160. package/dist/helper/scoreFnc.js +40 -0
  161. package/dist/helper/tagFnc.d.ts +23 -0
  162. package/dist/helper/tagFnc.js +69 -0
  163. package/dist/helper/testFnc.d.ts +7 -0
  164. package/dist/helper/testFnc.js +17 -0
  165. package/dist/hooks/BadgeHook.d.ts +1 -0
  166. package/dist/hooks/BadgeHook.js +65 -0
  167. package/dist/hooks/ExitQuizHook.d.ts +2 -0
  168. package/dist/hooks/ExitQuizHook.js +54 -0
  169. package/dist/hooks/basicHook.d.ts +3 -0
  170. package/dist/hooks/basicHook.js +14 -0
  171. package/dist/hooks/quizActionHook.d.ts +5 -0
  172. package/dist/hooks/quizActionHook.js +86 -0
  173. package/dist/hooks/quizHook.d.ts +15 -0
  174. package/dist/hooks/quizHook.js +60 -0
  175. package/dist/hooks/selector.d.ts +6 -0
  176. package/dist/hooks/selector.js +24 -0
  177. package/dist/index.d.ts +20 -0
  178. package/dist/index.js +68 -0
  179. package/dist/page/BadgePage.d.ts +8 -0
  180. package/dist/page/BadgePage.js +58 -0
  181. package/dist/page/BasicPage.d.ts +9 -0
  182. package/dist/page/BasicPage.js +125 -0
  183. package/dist/page/BootPage.d.ts +9 -0
  184. package/dist/page/BootPage.js +116 -0
  185. package/dist/page/CoinPage.d.ts +9 -0
  186. package/dist/page/CoinPage.js +51 -0
  187. package/dist/page/GetBadgePage.d.ts +7 -0
  188. package/dist/page/GetBadgePage.js +173 -0
  189. package/dist/page/GradePage.d.ts +7 -0
  190. package/dist/page/GradePage.js +37 -0
  191. package/dist/page/HistoryPage.d.ts +11 -0
  192. package/dist/page/HistoryPage.js +62 -0
  193. package/dist/page/HomePage.d.ts +8 -0
  194. package/dist/page/HomePage.js +80 -0
  195. package/dist/page/ImgZoom.d.ts +10 -0
  196. package/dist/page/ImgZoom.js +29 -0
  197. package/dist/page/QuixPage.d.ts +7 -0
  198. package/dist/page/QuixPage.js +33 -0
  199. package/dist/page/QuizPage.d.ts +7 -0
  200. package/dist/page/QuizPage.js +98 -0
  201. package/dist/page/QuizSettingPage.d.ts +7 -0
  202. package/dist/page/QuizSettingPage.js +72 -0
  203. package/dist/page/QuizSetupPage.d.ts +7 -0
  204. package/dist/page/QuizSetupPage.js +85 -0
  205. package/dist/page/ReportPage.d.ts +8 -0
  206. package/dist/page/ReportPage.js +185 -0
  207. package/dist/page/ResultPage.d.ts +7 -0
  208. package/dist/page/ResultPage.js +47 -0
  209. package/dist/page/SettingPage.d.ts +7 -0
  210. package/dist/page/SettingPage.js +62 -0
  211. package/dist/page/TestPage.d.ts +9 -0
  212. package/dist/page/TestPage.js +101 -0
  213. package/dist/page/UnitPage.d.ts +9 -0
  214. package/dist/page/UnitPage.js +127 -0
  215. package/dist/page/ZoomImg.d.ts +0 -0
  216. package/dist/page/ZoomImg.js +1 -0
  217. package/dist/quiz/GoBackAlert.d.ts +2 -0
  218. package/dist/quiz/GoBackAlert.js +30 -0
  219. package/dist/quiz/MyImage.d.ts +9 -0
  220. package/dist/quiz/MyImage.js +60 -0
  221. package/dist/quiz/MyTextqqyy.d.ts +10 -0
  222. package/dist/quiz/MyTextqqyy.js +80 -0
  223. package/dist/quiz/Question.d.ts +3 -0
  224. package/dist/quiz/Question.js +43 -0
  225. package/dist/quiz/Quiz.d.ts +9 -0
  226. package/dist/quiz/Quiz.js +44 -0
  227. package/dist/quiz/QuizTitle.d.ts +3 -0
  228. package/dist/quiz/QuizTitle.js +51 -0
  229. package/dist/quiz/Title.d.ts +3 -0
  230. package/dist/quiz/Title.js +51 -0
  231. package/dist/quiz/answer/Answer.d.ts +3 -0
  232. package/dist/quiz/answer/Answer.js +41 -0
  233. package/dist/quiz/answer/BlankAnswer.d.ts +7 -0
  234. package/dist/quiz/answer/BlankAnswer.js +33 -0
  235. package/dist/quiz/answer/BlankBtn.d.ts +3 -0
  236. package/dist/quiz/answer/BlankBtn.js +50 -0
  237. package/dist/quiz/answer/ChoiceView.d.ts +17 -0
  238. package/dist/quiz/answer/ChoiceView.js +53 -0
  239. package/dist/quiz/answer/CommonChoice.d.ts +0 -0
  240. package/dist/quiz/answer/CommonChoice.js +1 -0
  241. package/dist/quiz/answer/MultiChoice.d.ts +7 -0
  242. package/dist/quiz/answer/MultiChoice.js +66 -0
  243. package/dist/quiz/answer/MultiChoiceContainer.d.ts +7 -0
  244. package/dist/quiz/answer/MultiChoiceContainer.js +71 -0
  245. package/dist/quiz/answer/MultiChoiceLogic.d.ts +0 -0
  246. package/dist/quiz/answer/MultiChoiceLogic.js +1 -0
  247. package/dist/quiz/answer/MultiNextBtn.d.ts +7 -0
  248. package/dist/quiz/answer/MultiNextBtn.js +36 -0
  249. package/dist/quiz/answer/NormalChoice.d.ts +7 -0
  250. package/dist/quiz/answer/NormalChoice.js +64 -0
  251. package/dist/quiz/answer/NormalChoiceContainer.d.ts +7 -0
  252. package/dist/quiz/answer/NormalChoiceContainer.js +76 -0
  253. package/dist/quiz/answer/NormalChoiceView.d.ts +17 -0
  254. package/dist/quiz/answer/NormalChoiceView.js +53 -0
  255. package/dist/quiz/answer/NormalSelect.d.ts +5 -0
  256. package/dist/quiz/answer/NormalSelect.js +28 -0
  257. package/dist/quiz/answer/memo.d.ts +9 -0
  258. package/dist/quiz/answer/memo.js +114 -0
  259. package/dist/quiz/answer/style/getChoiceStyle.d.ts +2 -0
  260. package/dist/quiz/answer/style/getChoiceStyle.js +17 -0
  261. package/dist/quiz/answer/styles/getChoiceStyle.d.ts +5 -0
  262. package/dist/quiz/answer/styles/getChoiceStyle.js +32 -0
  263. package/dist/quiz/answer/util/choiceFnc.d.ts +2 -0
  264. package/dist/quiz/answer/util/choiceFnc.js +9 -0
  265. package/dist/quiz/check/Check.d.ts +8 -0
  266. package/dist/quiz/check/Check.js +82 -0
  267. package/dist/quiz/check/NextQuiz.d.ts +8 -0
  268. package/dist/quiz/check/NextQuiz.js +42 -0
  269. package/dist/quiz/check/NextQuizBtn.d.ts +8 -0
  270. package/dist/quiz/check/NextQuizBtn.js +67 -0
  271. package/dist/quiz/check/SelectTag.d.ts +5 -0
  272. package/dist/quiz/check/SelectTag.js +86 -0
  273. package/dist/quiz/common/MyImage.d.ts +6 -0
  274. package/dist/quiz/common/MyImage.js +56 -0
  275. package/dist/quiz/common/MyTextqqyy.d.ts +11 -0
  276. package/dist/quiz/common/MyTextqqyy.js +133 -0
  277. package/dist/quiz/common/PageContainerWrap.d.ts +10 -0
  278. package/dist/quiz/common/PageContainerWrap.js +38 -0
  279. package/dist/quiz/common/RenderImgOrText.d.ts +11 -0
  280. package/dist/quiz/common/RenderImgOrText.js +21 -0
  281. package/dist/quiz/common/ZoomableImage.d.ts +9 -0
  282. package/dist/quiz/common/ZoomableImage.js +18 -0
  283. package/dist/quiz/explain/CorrectBar.d.ts +7 -0
  284. package/dist/quiz/explain/CorrectBar.js +46 -0
  285. package/dist/quiz/explain/CorrectedBar.d.ts +7 -0
  286. package/dist/quiz/explain/CorrectedBar.js +45 -0
  287. package/dist/quiz/explain/Example.d.ts +8 -0
  288. package/dist/quiz/explain/Example.js +107 -0
  289. package/dist/quiz/explain/Explain.d.ts +8 -0
  290. package/dist/quiz/explain/Explain.js +59 -0
  291. package/dist/quiz/explain/ExplainLogic.d.ts +17 -0
  292. package/dist/quiz/explain/ExplainLogic.js +52 -0
  293. package/dist/quiz/function/choiceFnc.d.ts +2 -0
  294. package/dist/quiz/function/choiceFnc.js +9 -0
  295. package/dist/quiz/function/turnModeFnc.d.ts +0 -0
  296. package/dist/quiz/function/turnModeFnc.js +31 -0
  297. package/dist/quiz/question/FillDiagram.d.ts +10 -0
  298. package/dist/quiz/question/FillDiagram.js +27 -0
  299. package/dist/quiz/question/Question.d.ts +8 -0
  300. package/dist/quiz/question/Question.js +61 -0
  301. package/dist/quiz/question/QuestionFormat.d.ts +8 -0
  302. package/dist/quiz/question/QuestionFormat.js +69 -0
  303. package/dist/quiz/question/QuestionFormats.d.ts +9 -0
  304. package/dist/quiz/question/QuestionFormats.js +75 -0
  305. package/dist/quiz/question/QuestionMultiFormat.d.ts +7 -0
  306. package/dist/quiz/question/QuestionMultiFormat.js +43 -0
  307. package/dist/quiz/question/QuestionTxtFomat.d.ts +7 -0
  308. package/dist/quiz/question/QuestionTxtFomat.js +42 -0
  309. package/dist/quiz/question/SearchYoutue.d.ts +6 -0
  310. package/dist/quiz/question/SearchYoutue.js +20 -0
  311. package/dist/quiz/question/questionStyleFormat.d.ts +8 -0
  312. package/dist/quiz/question/questionStyleFormat.js +61 -0
  313. package/dist/quiz/save/QuizSaveData.d.ts +9 -0
  314. package/dist/quiz/save/QuizSaveData.js +68 -0
  315. package/dist/quiz/setting/Bottom3Btn.d.ts +8 -0
  316. package/dist/quiz/setting/Bottom3Btn.js +79 -0
  317. package/dist/quiz/setting/ReturnBtn.d.ts +7 -0
  318. package/dist/quiz/setting/ReturnBtn.js +77 -0
  319. package/dist/quiz/setting/ReturnSaveBtn.d.ts +7 -0
  320. package/dist/quiz/setting/ReturnSaveBtn.js +94 -0
  321. package/dist/quiz/styles/getChoiceStyle.d.ts +5 -0
  322. package/dist/quiz/styles/getChoiceStyle.js +32 -0
  323. package/dist/quiz/util/choiceFnc.d.ts +2 -0
  324. package/dist/quiz/util/choiceFnc.js +9 -0
  325. package/dist/quiz/util/commonFnc.d.ts +0 -0
  326. package/dist/quiz/util/commonFnc.js +1 -0
  327. package/dist/quiz/util/customHook.d.ts +0 -0
  328. package/dist/quiz/util/customHook.js +1 -0
  329. package/dist/quiz/util/customSelector.d.ts +5 -0
  330. package/dist/quiz/util/customSelector.js +16 -0
  331. package/dist/tsconfig.tsbuildinfo +1 -0
  332. package/dist/types/homePage.d.ts +12 -0
  333. package/dist/types/homePage.js +2 -0
  334. package/package.json +23 -0
@@ -0,0 +1,53 @@
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 react_2 = require("@realm/react");
10
+ var db_1 = require("@nakamura-123/db");
11
+ var TargetDate_1 = __importDefault(require("./TargetDate"));
12
+ var Square3sGrade_1 = __importDefault(require("./Square3sGrade"));
13
+ var lib_1 = require("@nakamura-123/lib");
14
+ var WeeklyAchivedRate_1 = __importDefault(require("./WeeklyAchivedRate"));
15
+ var ChangeWeeklyTargetBtn_1 = __importDefault(require("./ChangeWeeklyTargetBtn"));
16
+ var WeeklyProgress_1 = __importDefault(require("./WeeklyProgress"));
17
+ var GradeCard = function (_a) {
18
+ // データベースの読み込み
19
+ var DailyDB = (0, react_2.useQuery)(db_1.DailyLogSchema);
20
+ var dailyLog = db_1.DailyLogModel.readTodayDailyLog(DailyDB);
21
+ var weeklyLogs = db_1.DailyLogModel.readWeeklyLogs(DailyDB);
22
+ var weeklyQuizCntTotal = weeklyLogs.reduce(function (a, c) { return a + c.quizCnt; }, 0);
23
+ var weeklyTargetCnt = (0, react_redux_1.useSelector)(function (state) { return state.setting.grade.weeklyTargetCnt; });
24
+ return (<react_native_1.View style={styles.container}>
25
+ <TargetDate_1.default />
26
+ <Square3sGrade_1.default dailyLog={dailyLog} weeklyQuizCntTotal={weeklyQuizCntTotal} weeklyTargetCnt={weeklyTargetCnt}/>
27
+ <react_native_1.View style={styles.weeklyBox}>
28
+ <WeeklyAchivedRate_1.default weeklyQuizCntTotal={weeklyQuizCntTotal} weeklyTargetCnt={weeklyTargetCnt}/>
29
+ <ChangeWeeklyTargetBtn_1.default />
30
+ </react_native_1.View>
31
+ <WeeklyProgress_1.default weeklyLogs={weeklyLogs} weeklyTargetCnt={weeklyTargetCnt}/>
32
+ </react_native_1.View>);
33
+ };
34
+ var styles = react_native_1.StyleSheet.create({
35
+ container: {
36
+ flex: 1,
37
+ alignItems: "center",
38
+ paddingBottom: 16,
39
+ width: "100%",
40
+ backgroundColor: lib_1.colors.bkBeige,
41
+ paddingVertical: 5,
42
+ paddingHorizontal: 5,
43
+ borderRadius: 20,
44
+ borderWidth: 1,
45
+ borderColor: lib_1.colors.ltBlack,
46
+ marginBottom: 10,
47
+ },
48
+ weeklyBox: {
49
+ width: "100%",
50
+ flexDirection: "row",
51
+ },
52
+ });
53
+ exports.default = GradeCard;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Results } from "realm";
3
+ import { DailyLogSchema } from "@nakamura-123/db";
4
+ interface QuizCntGraphProps {
5
+ DailyLogDB: Results<DailyLogSchema>;
6
+ }
7
+ declare const QuizCntGraph: React.FC<QuizCntGraphProps>;
8
+ export default QuizCntGraph;
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
26
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
27
+ if (ar || !(i in from)) {
28
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
29
+ ar[i] = from[i];
30
+ }
31
+ }
32
+ return to.concat(ar || Array.prototype.slice.call(from));
33
+ };
34
+ var __importDefault = (this && this.__importDefault) || function (mod) {
35
+ return (mod && mod.__esModule) ? mod : { "default": mod };
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ var react_1 = __importStar(require("react"));
39
+ var react_native_1 = require("react-native");
40
+ var common_1 = require("@nakamura-123/common");
41
+ var lib_1 = require("@nakamura-123/lib");
42
+ var gradeFnc_1 = require("../../functions/gradeFnc");
43
+ var ChartControl_1 = __importDefault(require("../TestPage/ChartControl"));
44
+ var QuizCntGraph = function (_a) {
45
+ var DailyLogDB = _a.DailyLogDB;
46
+ var _b = (0, react_1.useState)(true), isDaily = _b[0], setIsDaily = _b[1];
47
+ var _c = (0, react_1.useState)([]), graphData = _c[0], setGraphData = _c[1];
48
+ var _d = (0, react_1.useState)(0), agoDateCnt = _d[0], setAgoDateCnt = _d[1];
49
+ var _e = (0, react_1.useState)(0), agoWeekCnt = _e[0], setAgoWeekCnt = _e[1];
50
+ var _f = (0, react_1.useState)(100), maxValue = _f[0], setMaxValue = _f[1];
51
+ // 日別のデータを取得
52
+ var baseDate = lib_1.timeFnc.getDateWeeksAgo(agoDateCnt).toDate();
53
+ var selectedOneWeek = lib_1.timeFnc.getThisWeek(baseDate);
54
+ var weeklyQuizCnts = (0, gradeFnc_1.getWeeklyCnts)(DailyLogDB, selectedOneWeek);
55
+ var dailyMaxValue = Math.max.apply(Math, __spreadArray([100], weeklyQuizCnts, false));
56
+ var sumWeeklyQuizCnts = weeklyQuizCnts.reduce(function (acc, cur) { return acc + cur; }, 0);
57
+ // 日別データの作成
58
+ var dailyData = getDaileyData(selectedOneWeek, weeklyQuizCnts, dailyMaxValue);
59
+ // 週別データの取得
60
+ // 日別・週別データどちらを表示するか選択
61
+ (0, react_1.useEffect)(function () {
62
+ var data = isDaily ? dailyData : [];
63
+ setGraphData(data);
64
+ setMaxValue(isDaily ? dailyMaxValue : 100);
65
+ }, [agoWeekCnt, agoDateCnt]);
66
+ // コントロールボックスの関数
67
+ var handleLeft = function () {
68
+ return isDaily ? setAgoDateCnt(agoDateCnt + 1) : setAgoWeekCnt(agoWeekCnt + 1);
69
+ };
70
+ var handleRight = function () {
71
+ return isDaily ? setAgoDateCnt(agoDateCnt - 1) : setAgoWeekCnt(agoWeekCnt - 1);
72
+ };
73
+ var showLeft = isDaily ? agoDateCnt < 30 : agoWeekCnt < 5;
74
+ var showRight = agoDateCnt > 0 || agoWeekCnt > 0;
75
+ var title = "\u5408\u8A08 ".concat(sumWeeklyQuizCnts, "\u554F");
76
+ return (<react_native_1.View style={styles.container}>
77
+ <ChartControl_1.default title={title} onPressLeft={handleLeft} onPressRight={handleRight} showLeft={showLeft} showRight={showRight}/>
78
+ <common_1.BarChart data={graphData} width={25} maxValue={100} isPercent={false}/>
79
+ </react_native_1.View>);
80
+ };
81
+ var getDaileyData = function (weeklyDates, weeklyQuizCnts, dailyMaxValue) {
82
+ return weeklyDates.map(function (day, i) {
83
+ var cnt = weeklyQuizCnts[i];
84
+ var value = Math.floor((cnt / dailyMaxValue) * 100);
85
+ var label = day.format("M/D");
86
+ return { label: label, value: value, color: "blue", cnt: cnt };
87
+ });
88
+ };
89
+ var styles = react_native_1.StyleSheet.create({
90
+ container: {
91
+ flex: 1,
92
+ paddingBottom: 20,
93
+ paddingHorizontal: 3,
94
+ marginHorizontal: 5,
95
+ marginBottom: 10,
96
+ justifyContent: "center",
97
+ alignItems: "center",
98
+ backgroundColor: lib_1.colors.bkBeige,
99
+ borderRadius: 20,
100
+ borderWidth: 1,
101
+ borderColor: lib_1.colors.ltBlack,
102
+ },
103
+ });
104
+ exports.default = QuizCntGraph;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { TestSchema } from "@nakamura-123/db";
3
+ import { Db } from "@nakamura-123/types";
4
+ type Square3sProps = {
5
+ subjectName: Db.SubjectTest;
6
+ TestDB: Realm.Results<TestSchema>;
7
+ };
8
+ declare const Square3s: React.FC<Square3sProps>;
9
+ export default Square3s;
@@ -0,0 +1,35 @@
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 Square3s = function (_a) {
10
+ var subjectName = _a.subjectName, TestDB = _a.TestDB;
11
+ // 回数を数える
12
+ var ThisTestDB = TestDB.filtered("subject == $0", subjectName);
13
+ var challengeCnt = ThisTestDB.length;
14
+ var successCnt = ThisTestDB.filtered("isSuccess == true").length;
15
+ var perfectCnt = ThisTestDB.filtered("isPerfect == true").length;
16
+ var info = [
17
+ { cnt: challengeCnt, label: "試験", icon: "clipboard" },
18
+ { cnt: successCnt, label: "合格", icon: "check-circle" },
19
+ { cnt: perfectCnt, label: "満点", icon: "paw" },
20
+ ];
21
+ return (<react_native_1.View style={styles.container}>
22
+ {info.map(function (item, index) {
23
+ return (<common_1.SquareIcon key={index} cnt={item.cnt} cntText="回" label={item.label} icon={item.icon}/>);
24
+ })}
25
+ </react_native_1.View>);
26
+ };
27
+ var styles = react_native_1.StyleSheet.create({
28
+ container: {
29
+ flexDirection: "row",
30
+ justifyContent: "space-between",
31
+ alignItems: "center",
32
+ marginVertical: 10,
33
+ },
34
+ });
35
+ exports.default = Square3s;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ interface ShareBtnProps {
3
+ style: any;
4
+ }
5
+ declare const ShareBtn: React.FC<ShareBtnProps>;
6
+ export default ShareBtn;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var react_1 = __importDefault(require("react"));
43
+ var react_native_1 = require("react-native");
44
+ var common_1 = require("@nakamura-123/common");
45
+ var ShareBtn = function (_a) {
46
+ var style = _a.style;
47
+ var handleShare = function () { return __awaiter(void 0, void 0, void 0, function () {
48
+ var result, error_1;
49
+ return __generator(this, function (_a) {
50
+ switch (_a.label) {
51
+ case 0:
52
+ _a.trys.push([0, 2, , 3]);
53
+ return [4 /*yield*/, react_native_1.Share.share({
54
+ message: "このメッセージをシェアしよう!",
55
+ url: "https://example.com", // シェアするURL(オプション)
56
+ title: "シェアのタイトル", // iOS用(オプション)
57
+ })];
58
+ case 1:
59
+ result = _a.sent();
60
+ if (result.action === react_native_1.Share.sharedAction) {
61
+ if (result.activityType) {
62
+ // iOSの場合、具体的なシェア方法がここに返されます
63
+ console.log("Shared with activity type:", result.activityType);
64
+ }
65
+ else {
66
+ console.log("Shared successfully");
67
+ }
68
+ }
69
+ else if (result.action === react_native_1.Share.dismissedAction) {
70
+ // シェアがキャンセルされた場合
71
+ console.log("Share dismissed");
72
+ }
73
+ return [3 /*break*/, 3];
74
+ case 2:
75
+ error_1 = _a.sent();
76
+ console.error("Error sharing:", error_1);
77
+ react_native_1.Alert.alert("シェアに失敗しました", error_1.message);
78
+ return [3 /*break*/, 3];
79
+ case 3: return [2 /*return*/];
80
+ }
81
+ });
82
+ }); };
83
+ return (<common_1.MiniIconBtn onPress={handleShare} icon="share" title="シェア" color="green" outerStyle={style}/>);
84
+ };
85
+ var styles = react_native_1.StyleSheet.create({});
86
+ exports.default = ShareBtn;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { DailyLogSchema } from "@nakamura-123/db";
3
+ type Square3sGradeProps = {
4
+ dailyLog: DailyLogSchema | null;
5
+ weeklyQuizCntTotal: number;
6
+ weeklyTargetCnt: number;
7
+ };
8
+ declare const Square3sGrade: React.FC<Square3sGradeProps>;
9
+ export default Square3sGrade;
@@ -0,0 +1,63 @@
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 FontAwesome5_1 = __importDefault(require("react-native-vector-icons/FontAwesome5"));
9
+ var react_2 = require("@realm/react");
10
+ var common_1 = require("@nakamura-123/common");
11
+ var db_1 = require("@nakamura-123/db");
12
+ var lib_1 = require("@nakamura-123/lib");
13
+ var gradeFnc_1 = require("../../functions/gradeFnc");
14
+ var Square3sGrade = function (_a) {
15
+ var dailyLog = _a.dailyLog, weeklyQuizCntTotal = _a.weeklyQuizCntTotal, weeklyTargetCnt = _a.weeklyTargetCnt;
16
+ var DailyDB = (0, react_2.useQuery)(db_1.DailyLogSchema);
17
+ // 01_今日の学習回数を算出
18
+ var _b = (0, gradeFnc_1.formatTodayLog)(dailyLog), quizCnt = _b.quizCnt, targetCnt = _b.targetCnt;
19
+ // 03_連続学習日数を算出
20
+ var consecutiveDays = (0, gradeFnc_1.getConsecutiveStudyDays)(DailyDB);
21
+ var info = [
22
+ {
23
+ // 今日の学習回数
24
+ cnt: quizCnt,
25
+ cntText: "/ ".concat(targetCnt),
26
+ label: "今日",
27
+ icon: "clock",
28
+ },
29
+ {
30
+ // 今週の学習回数
31
+ cnt: weeklyQuizCntTotal,
32
+ cntText: "/ ".concat(weeklyTargetCnt),
33
+ label: "今週",
34
+ icon: "chart-bar",
35
+ },
36
+ {
37
+ cnt: consecutiveDays,
38
+ cntText: "日",
39
+ label: "連続学習日数",
40
+ icon: "calendar-alt",
41
+ },
42
+ ];
43
+ return (<react_native_1.View style={styles.container}>
44
+ {info.map(function (item, index) {
45
+ return (<common_1.MiniSquare key={index} cnt={item.cnt} cntText={item.cntText} label={item.label} borderColor="ltBlack">
46
+ <FontAwesome5_1.default name={item.icon} size={20} color={lib_1.colors.ltBlack}/>
47
+ </common_1.MiniSquare>);
48
+ })}
49
+ </react_native_1.View>);
50
+ };
51
+ var CompleteIcon = function () {
52
+ return <FontAwesome5_1.default name="check-circle" size={20} color={lib_1.colors.green}/>;
53
+ };
54
+ var styles = react_native_1.StyleSheet.create({
55
+ container: {
56
+ width: "100%",
57
+ flexDirection: "row",
58
+ justifyContent: "space-between",
59
+ alignItems: "center",
60
+ marginVertical: 10,
61
+ },
62
+ });
63
+ exports.default = Square3sGrade;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { DailyLogSchema } from "@nakamura-123/db";
3
+ type Square4sProps = {
4
+ DailyLogDB: Realm.Results<DailyLogSchema>;
5
+ };
6
+ declare const Square4s: React.FC<Square4sProps>;
7
+ export default Square4s;
@@ -0,0 +1,63 @@
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 gradeFnc_1 = require("../../functions/gradeFnc");
10
+ var Square4s = function (_a) {
11
+ var DailyLogDB = _a.DailyLogDB;
12
+ // 1.最大の問題数を取得
13
+ var maxQuizCntLog = (0, gradeFnc_1.findMaxQuizCntLog)(DailyLogDB);
14
+ var maxQuizCnt = maxQuizCntLog ? maxQuizCntLog.quizCnt : 0;
15
+ // 2.通算問題数を取得
16
+ var totalCnt = (0, gradeFnc_1.getTotalQuizCnt)(DailyLogDB);
17
+ // 3.最高連続学習日数を取得
18
+ var longestConsecutiveDays = (0, gradeFnc_1.getLongestConsecutiveStudyDays)(DailyLogDB);
19
+ // 4.通算学習日数を取得
20
+ var studyDayCnt = DailyLogDB.length;
21
+ var squareInfo = [
22
+ {
23
+ cnt: maxQuizCnt,
24
+ cntText: "問",
25
+ label: "1日の最高問題数",
26
+ icon: "clock",
27
+ },
28
+ {
29
+ cnt: totalCnt,
30
+ cntText: "問",
31
+ label: "通算問題数",
32
+ icon: "layer-group",
33
+ },
34
+ {
35
+ cnt: longestConsecutiveDays,
36
+ cntText: "日",
37
+ label: "最高連続学習日数",
38
+ icon: "calendar-alt",
39
+ },
40
+ {
41
+ cnt: studyDayCnt,
42
+ cntText: "日",
43
+ label: "通算学習日数",
44
+ icon: "calendar",
45
+ },
46
+ ];
47
+ return (<react_native_1.View style={styles.container}>
48
+ {squareInfo.map(function (item, index) { return (<common_1.SquareIcon key={index} cnt={item.cnt} cntText={item.cntText} label={item.label} icon={item.icon} style={styles.square} iconColor="ltBlack"/>); })}
49
+ </react_native_1.View>);
50
+ };
51
+ var styles = react_native_1.StyleSheet.create({
52
+ container: {
53
+ flex: 1,
54
+ flexWrap: "wrap",
55
+ flexDirection: "row",
56
+ justifyContent: "space-between",
57
+ },
58
+ square: {
59
+ width: "49%",
60
+ marginBottom: 10,
61
+ },
62
+ });
63
+ exports.default = Square4s;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ type TargetDateProps = {};
3
+ declare const TargetDate: React.FC<TargetDateProps>;
4
+ export default TargetDate;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ var react_1 = __importStar(require("react"));
30
+ var react_native_1 = require("react-native");
31
+ var react_redux_1 = require("react-redux");
32
+ var common_1 = require("@nakamura-123/common");
33
+ var lib_1 = require("@nakamura-123/lib");
34
+ var DatePickerModal_1 = __importDefault(require("./DatePickerModal")); // モーダル部分を別コンポーネント化
35
+ var TargetDate = function () {
36
+ var _a = (0, react_1.useState)(false), isModalVisible = _a[0], setModalVisible = _a[1];
37
+ var targetDay = (0, react_redux_1.useSelector)(function (state) { return state.setting.grade.targetDay; });
38
+ var targetDayStr = getTargetDayStr(targetDay);
39
+ return (<react_native_1.View style={styles.container}>
40
+ <common_1.RoundRectangle title={targetDayStr} onPress={function () { return setModalVisible(true); }} color="black"/>
41
+ <DatePickerModal_1.default isVisible={isModalVisible} onClose={function () { return setModalVisible(false); }} targetDay={targetDay}/>
42
+ </react_native_1.View>);
43
+ };
44
+ var getTargetDayStr = function (targetDay) {
45
+ if (!targetDay)
46
+ return "タップして試験日を設定";
47
+ var date = lib_1.timeFnc.formatDateYW(targetDay);
48
+ var limitDays = lib_1.timeFnc.getCountdownDays(targetDay);
49
+ return "".concat(date, "\u307E\u3067 ").concat(limitDays, "\u65E5");
50
+ };
51
+ var styles = react_native_1.StyleSheet.create({
52
+ container: {
53
+ width: "100%",
54
+ },
55
+ });
56
+ exports.default = TargetDate;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface WeeklyAchievedRateProps {
3
+ weeklyQuizCntTotal: number;
4
+ weeklyTargetCnt: number;
5
+ }
6
+ declare const WeeklyAchievedRate: React.FC<WeeklyAchievedRateProps>;
7
+ export default WeeklyAchievedRate;
@@ -0,0 +1,28 @@
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 WeeklyAchievedRate = function (_a) {
10
+ var weeklyQuizCntTotal = _a.weeklyQuizCntTotal, weeklyTargetCnt = _a.weeklyTargetCnt;
11
+ var rate = Math.floor((weeklyQuizCntTotal / weeklyTargetCnt) * 100);
12
+ return (<react_native_1.View style={styles.container}>
13
+ <common_1.MyText fsize="sm" style={styles.txt}>
14
+ 今週のゴール
15
+ </common_1.MyText>
16
+ <common_1.ProgressBar progress={rate} barColor="black" height={20}/>
17
+ </react_native_1.View>);
18
+ };
19
+ var styles = react_native_1.StyleSheet.create({
20
+ container: {
21
+ flex: 2,
22
+ },
23
+ txt: {
24
+ marginLeft: 5,
25
+ marginBottom: 3,
26
+ },
27
+ });
28
+ exports.default = WeeklyAchievedRate;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { Results } from "realm";
3
+ import { DailyLogSchema } from "@nakamura-123/db";
4
+ type WeeklyProgressProps = {
5
+ weeklyLogs: Results<DailyLogSchema>;
6
+ weeklyTargetCnt: number;
7
+ };
8
+ declare const WeeklyProgress: React.FC<WeeklyProgressProps>;
9
+ export default WeeklyProgress;
@@ -0,0 +1,80 @@
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 FontAwesome5_1 = __importDefault(require("react-native-vector-icons/FontAwesome5"));
9
+ var common_1 = require("@nakamura-123/common");
10
+ var lib_1 = require("@nakamura-123/lib");
11
+ var gradeFnc_1 = require("../../functions/gradeFnc");
12
+ var WeeklyProgress = function (_a) {
13
+ var weeklyLogs = _a.weeklyLogs, weeklyTargetCnt = _a.weeklyTargetCnt;
14
+ // 今週のログをデータベースから取得
15
+ // 今週の日付を所得
16
+ var today = lib_1.timeFnc.getToday();
17
+ var weeklyDays = lib_1.timeFnc.getThisWeek(today);
18
+ // 今週のクイズ数を合計
19
+ var weeklyQuizCnts = (0, gradeFnc_1.getWeeklyCnts)(weeklyLogs, weeklyDays);
20
+ // データを配列化して挿入
21
+ var weeklyInfo = weeklyDays.map(function (day, i) {
22
+ var percent = (weeklyQuizCnts[i] / (weeklyTargetCnt / 7)) * 100;
23
+ return {
24
+ day: day.format("ddd"),
25
+ month: day.format("MM"),
26
+ date: day.format("D"),
27
+ percent: percent,
28
+ };
29
+ });
30
+ return (<react_native_1.View style={styles.container}>
31
+ {weeklyInfo.map(function (_a) {
32
+ var day = _a.day, month = _a.month, date = _a.date, percent = _a.percent;
33
+ return (<react_native_1.View key={day} style={styles.dayContainer}>
34
+ <common_1.MyText style={styles.dayText}>{day}</common_1.MyText>
35
+ <react_native_1.View style={styles.dateBox}>
36
+ {/* <MyText style={styles.monthText}>{month}/</MyText> */}
37
+ <common_1.MyText style={styles.dateText}>{date}</common_1.MyText>
38
+ </react_native_1.View>
39
+ {percent >= 100 ? <CompoletedIcon /> : <Circle percent={percent}/>}
40
+ </react_native_1.View>);
41
+ })}
42
+ </react_native_1.View>);
43
+ };
44
+ var CompoletedIcon = function () { return (<react_native_1.View style={{ marginTop: 5 }}>
45
+ <FontAwesome5_1.default name="check-circle" size={25} color={lib_1.colors.green}/>
46
+ </react_native_1.View>); };
47
+ var Circle = function (_a) {
48
+ var percent = _a.percent;
49
+ return (<common_1.CircleProgress percentage={percent} radius={10} showNumber={false} strokeWidth={7}/>);
50
+ };
51
+ var styles = react_native_1.StyleSheet.create({
52
+ container: {
53
+ width: "100%",
54
+ flexDirection: "row",
55
+ justifyContent: "space-around",
56
+ alignItems: "flex-start",
57
+ },
58
+ dayContainer: {
59
+ alignItems: "center",
60
+ width: "14%",
61
+ },
62
+ dateBox: {
63
+ flexDirection: "row",
64
+ marginTop: 2,
65
+ paddingLeft: 2,
66
+ },
67
+ dayText: {
68
+ fontSize: 10,
69
+ color: lib_1.colors.ltBlack,
70
+ },
71
+ monthText: {
72
+ fontSize: 8,
73
+ color: lib_1.colors.darkGray,
74
+ },
75
+ dateText: {
76
+ fontSize: 14,
77
+ color: lib_1.colors.darkGray,
78
+ },
79
+ });
80
+ exports.default = WeeklyProgress;
File without changes