@magmamath/students-features 0.9.113 → 0.9.114-rc.0

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 (247) hide show
  1. package/dist/commonjs/features/pmProgress/PracticeProgress.js +264 -0
  2. package/dist/commonjs/features/pmProgress/PracticeProgress.js.map +1 -0
  3. package/dist/commonjs/features/pmProgress/chart/chart.helpers.js +24 -0
  4. package/dist/commonjs/features/pmProgress/chart/chart.helpers.js.map +1 -0
  5. package/dist/commonjs/features/pmProgress/chart/chart.types.js +2 -0
  6. package/dist/commonjs/features/pmProgress/chart/chart.types.js.map +1 -0
  7. package/dist/commonjs/features/pmProgress/chart/components/PracticeProgressPieChart.js +44 -0
  8. package/dist/commonjs/features/pmProgress/chart/components/PracticeProgressPieChart.js.map +1 -0
  9. package/dist/commonjs/features/pmProgress/chart/components/SlicesClipPaths.js +38 -0
  10. package/dist/commonjs/features/pmProgress/chart/components/SlicesClipPaths.js.map +1 -0
  11. package/dist/commonjs/features/pmProgress/chart/components/SlicesPaths.js +64 -0
  12. package/dist/commonjs/features/pmProgress/chart/components/SlicesPaths.js.map +1 -0
  13. package/dist/commonjs/features/pmProgress/chart/components/layers/SliceArcPattern.js +38 -0
  14. package/dist/commonjs/features/pmProgress/chart/components/layers/SliceArcPattern.js.map +1 -0
  15. package/dist/commonjs/features/pmProgress/chart/components/layers/SliceBackgroundColor.js +21 -0
  16. package/dist/commonjs/features/pmProgress/chart/components/layers/SliceBackgroundColor.js.map +1 -0
  17. package/dist/commonjs/features/pmProgress/chart/components/layers/SliceFillColor.js +49 -0
  18. package/dist/commonjs/features/pmProgress/chart/components/layers/SliceFillColor.js.map +1 -0
  19. package/dist/commonjs/features/pmProgress/chart/model/ArcPatternGenerator.js +49 -0
  20. package/dist/commonjs/features/pmProgress/chart/model/ArcPatternGenerator.js.map +1 -0
  21. package/dist/commonjs/features/pmProgress/chart/model/PieChartManager.js +25 -0
  22. package/dist/commonjs/features/pmProgress/chart/model/PieChartManager.js.map +1 -0
  23. package/dist/commonjs/features/pmProgress/chart/model/SliceHighlight.js +20 -0
  24. package/dist/commonjs/features/pmProgress/chart/model/SliceHighlight.js.map +1 -0
  25. package/dist/commonjs/features/pmProgress/chart/model/SliceShapeGenerator.js +67 -0
  26. package/dist/commonjs/features/pmProgress/chart/model/SliceShapeGenerator.js.map +1 -0
  27. package/dist/commonjs/features/pmProgress/header/PracticeProgressHeader.js +180 -0
  28. package/dist/commonjs/features/pmProgress/header/PracticeProgressHeader.js.map +1 -0
  29. package/dist/commonjs/features/pmProgress/index.js +13 -0
  30. package/dist/commonjs/features/pmProgress/index.js.map +1 -0
  31. package/dist/commonjs/features/pmProgress/list/ListCard.js +128 -0
  32. package/dist/commonjs/features/pmProgress/list/ListCard.js.map +1 -0
  33. package/dist/commonjs/features/pmProgress/list/ListItem.js +128 -0
  34. package/dist/commonjs/features/pmProgress/list/ListItem.js.map +1 -0
  35. package/dist/commonjs/features/pmProgress/recs/TeacherRecs.js +17 -0
  36. package/dist/commonjs/features/pmProgress/recs/TeacherRecs.js.map +1 -0
  37. package/dist/commonjs/features/pmProgress/stats/PracticeProgressStats.js +63 -0
  38. package/dist/commonjs/features/pmProgress/stats/PracticeProgressStats.js.map +1 -0
  39. package/dist/commonjs/features/pmProgress/stats/StatsCard.js +66 -0
  40. package/dist/commonjs/features/pmProgress/stats/StatsCard.js.map +1 -0
  41. package/dist/commonjs/features/pmProgress/temp.js +74 -0
  42. package/dist/commonjs/features/pmProgress/temp.js.map +1 -0
  43. package/dist/commonjs/index.js +14 -2
  44. package/dist/commonjs/index.js.map +1 -1
  45. package/dist/commonjs/shared/icons/PentagonIcon.js +32 -0
  46. package/dist/commonjs/shared/icons/PentagonIcon.js.map +1 -0
  47. package/dist/commonjs/shared/icons/SketchArrowRight.js +33 -0
  48. package/dist/commonjs/shared/icons/SketchArrowRight.js.map +1 -0
  49. package/dist/commonjs/shared/icons/SliceDiamondIcon.js +32 -0
  50. package/dist/commonjs/shared/icons/SliceDiamondIcon.js.map +1 -0
  51. package/dist/commonjs/shared/icons/StarIcon.js +32 -0
  52. package/dist/commonjs/shared/icons/StarIcon.js.map +1 -0
  53. package/dist/commonjs/shared/icons/TimerIcon.js +35 -0
  54. package/dist/commonjs/shared/icons/TimerIcon.js.map +1 -0
  55. package/dist/module/features/pmProgress/PracticeProgress.js +258 -0
  56. package/dist/module/features/pmProgress/PracticeProgress.js.map +1 -0
  57. package/dist/module/features/pmProgress/chart/chart.helpers.js +16 -0
  58. package/dist/module/features/pmProgress/chart/chart.helpers.js.map +1 -0
  59. package/dist/module/features/pmProgress/chart/chart.types.js +2 -0
  60. package/dist/module/features/pmProgress/chart/chart.types.js.map +1 -0
  61. package/dist/module/features/pmProgress/chart/components/PracticeProgressPieChart.js +38 -0
  62. package/dist/module/features/pmProgress/chart/components/PracticeProgressPieChart.js.map +1 -0
  63. package/dist/module/features/pmProgress/chart/components/SlicesClipPaths.js +32 -0
  64. package/dist/module/features/pmProgress/chart/components/SlicesClipPaths.js.map +1 -0
  65. package/dist/module/features/pmProgress/chart/components/SlicesPaths.js +58 -0
  66. package/dist/module/features/pmProgress/chart/components/SlicesPaths.js.map +1 -0
  67. package/dist/module/features/pmProgress/chart/components/layers/SliceArcPattern.js +32 -0
  68. package/dist/module/features/pmProgress/chart/components/layers/SliceArcPattern.js.map +1 -0
  69. package/dist/module/features/pmProgress/chart/components/layers/SliceBackgroundColor.js +15 -0
  70. package/dist/module/features/pmProgress/chart/components/layers/SliceBackgroundColor.js.map +1 -0
  71. package/dist/module/features/pmProgress/chart/components/layers/SliceFillColor.js +43 -0
  72. package/dist/module/features/pmProgress/chart/components/layers/SliceFillColor.js.map +1 -0
  73. package/dist/module/features/pmProgress/chart/model/ArcPatternGenerator.js +44 -0
  74. package/dist/module/features/pmProgress/chart/model/ArcPatternGenerator.js.map +1 -0
  75. package/dist/module/features/pmProgress/chart/model/PieChartManager.js +20 -0
  76. package/dist/module/features/pmProgress/chart/model/PieChartManager.js.map +1 -0
  77. package/dist/module/features/pmProgress/chart/model/SliceHighlight.js +15 -0
  78. package/dist/module/features/pmProgress/chart/model/SliceHighlight.js.map +1 -0
  79. package/dist/module/features/pmProgress/chart/model/SliceShapeGenerator.js +62 -0
  80. package/dist/module/features/pmProgress/chart/model/SliceShapeGenerator.js.map +1 -0
  81. package/dist/module/features/pmProgress/header/PracticeProgressHeader.js +174 -0
  82. package/dist/module/features/pmProgress/header/PracticeProgressHeader.js.map +1 -0
  83. package/dist/module/features/pmProgress/index.js +4 -0
  84. package/dist/module/features/pmProgress/index.js.map +1 -0
  85. package/dist/module/features/pmProgress/list/ListCard.js +121 -0
  86. package/dist/module/features/pmProgress/list/ListCard.js.map +1 -0
  87. package/dist/module/features/pmProgress/list/ListItem.js +122 -0
  88. package/dist/module/features/pmProgress/list/ListItem.js.map +1 -0
  89. package/dist/module/features/pmProgress/recs/TeacherRecs.js +11 -0
  90. package/dist/module/features/pmProgress/recs/TeacherRecs.js.map +1 -0
  91. package/dist/module/features/pmProgress/stats/PracticeProgressStats.js +56 -0
  92. package/dist/module/features/pmProgress/stats/PracticeProgressStats.js.map +1 -0
  93. package/dist/module/features/pmProgress/stats/StatsCard.js +60 -0
  94. package/dist/module/features/pmProgress/stats/StatsCard.js.map +1 -0
  95. package/dist/module/features/pmProgress/temp.js +70 -0
  96. package/dist/module/features/pmProgress/temp.js.map +1 -0
  97. package/dist/module/index.js +1 -0
  98. package/dist/module/index.js.map +1 -1
  99. package/dist/module/shared/icons/PentagonIcon.js +24 -0
  100. package/dist/module/shared/icons/PentagonIcon.js.map +1 -0
  101. package/dist/module/shared/icons/SketchArrowRight.js +25 -0
  102. package/dist/module/shared/icons/SketchArrowRight.js.map +1 -0
  103. package/dist/module/shared/icons/SliceDiamondIcon.js +24 -0
  104. package/dist/module/shared/icons/SliceDiamondIcon.js.map +1 -0
  105. package/dist/module/shared/icons/StarIcon.js +24 -0
  106. package/dist/module/shared/icons/StarIcon.js.map +1 -0
  107. package/dist/module/shared/icons/TimerIcon.js +27 -0
  108. package/dist/module/shared/icons/TimerIcon.js.map +1 -0
  109. package/dist/typescript/commonjs/features/pmProgress/PracticeProgress.d.ts +3 -0
  110. package/dist/typescript/commonjs/features/pmProgress/PracticeProgress.d.ts.map +1 -0
  111. package/dist/typescript/commonjs/features/pmProgress/chart/chart.helpers.d.ts +5 -0
  112. package/dist/typescript/commonjs/features/pmProgress/chart/chart.helpers.d.ts.map +1 -0
  113. package/dist/typescript/commonjs/features/pmProgress/chart/chart.types.d.ts +35 -0
  114. package/dist/typescript/commonjs/features/pmProgress/chart/chart.types.d.ts.map +1 -0
  115. package/dist/typescript/commonjs/features/pmProgress/chart/components/PracticeProgressPieChart.d.ts +9 -0
  116. package/dist/typescript/commonjs/features/pmProgress/chart/components/PracticeProgressPieChart.d.ts.map +1 -0
  117. package/dist/typescript/commonjs/features/pmProgress/chart/components/SlicesClipPaths.d.ts +10 -0
  118. package/dist/typescript/commonjs/features/pmProgress/chart/components/SlicesClipPaths.d.ts.map +1 -0
  119. package/dist/typescript/commonjs/features/pmProgress/chart/components/SlicesPaths.d.ts +11 -0
  120. package/dist/typescript/commonjs/features/pmProgress/chart/components/SlicesPaths.d.ts.map +1 -0
  121. package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceArcPattern.d.ts +12 -0
  122. package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceArcPattern.d.ts.map +1 -0
  123. package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceBackgroundColor.d.ts +8 -0
  124. package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceBackgroundColor.d.ts.map +1 -0
  125. package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceFillColor.d.ts +13 -0
  126. package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceFillColor.d.ts.map +1 -0
  127. package/dist/typescript/commonjs/features/pmProgress/chart/model/ArcPatternGenerator.d.ts +12 -0
  128. package/dist/typescript/commonjs/features/pmProgress/chart/model/ArcPatternGenerator.d.ts.map +1 -0
  129. package/dist/typescript/commonjs/features/pmProgress/chart/model/PieChartManager.d.ts +16 -0
  130. package/dist/typescript/commonjs/features/pmProgress/chart/model/PieChartManager.d.ts.map +1 -0
  131. package/dist/typescript/commonjs/features/pmProgress/chart/model/SliceHighlight.d.ts +10 -0
  132. package/dist/typescript/commonjs/features/pmProgress/chart/model/SliceHighlight.d.ts.map +1 -0
  133. package/dist/typescript/commonjs/features/pmProgress/chart/model/SliceShapeGenerator.d.ts +15 -0
  134. package/dist/typescript/commonjs/features/pmProgress/chart/model/SliceShapeGenerator.d.ts.map +1 -0
  135. package/dist/typescript/commonjs/features/pmProgress/header/PracticeProgressHeader.d.ts +12 -0
  136. package/dist/typescript/commonjs/features/pmProgress/header/PracticeProgressHeader.d.ts.map +1 -0
  137. package/dist/typescript/commonjs/features/pmProgress/index.d.ts +2 -0
  138. package/dist/typescript/commonjs/features/pmProgress/index.d.ts.map +1 -0
  139. package/dist/typescript/commonjs/features/pmProgress/list/ListCard.d.ts +15 -0
  140. package/dist/typescript/commonjs/features/pmProgress/list/ListCard.d.ts.map +1 -0
  141. package/dist/typescript/commonjs/features/pmProgress/list/ListItem.d.ts +11 -0
  142. package/dist/typescript/commonjs/features/pmProgress/list/ListItem.d.ts.map +1 -0
  143. package/dist/typescript/commonjs/features/pmProgress/recs/TeacherRecs.d.ts +3 -0
  144. package/dist/typescript/commonjs/features/pmProgress/recs/TeacherRecs.d.ts.map +1 -0
  145. package/dist/typescript/commonjs/features/pmProgress/stats/PracticeProgressStats.d.ts +3 -0
  146. package/dist/typescript/commonjs/features/pmProgress/stats/PracticeProgressStats.d.ts.map +1 -0
  147. package/dist/typescript/commonjs/features/pmProgress/stats/StatsCard.d.ts +10 -0
  148. package/dist/typescript/commonjs/features/pmProgress/stats/StatsCard.d.ts.map +1 -0
  149. package/dist/typescript/commonjs/features/pmProgress/temp.d.ts +4 -0
  150. package/dist/typescript/commonjs/features/pmProgress/temp.d.ts.map +1 -0
  151. package/dist/typescript/commonjs/index.d.ts +1 -0
  152. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  153. package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts +4 -0
  154. package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts.map +1 -0
  155. package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts +4 -0
  156. package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts.map +1 -0
  157. package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts +4 -0
  158. package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts.map +1 -0
  159. package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts +4 -0
  160. package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts.map +1 -0
  161. package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts +4 -0
  162. package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts.map +1 -0
  163. package/dist/typescript/module/features/pmProgress/PracticeProgress.d.ts +3 -0
  164. package/dist/typescript/module/features/pmProgress/PracticeProgress.d.ts.map +1 -0
  165. package/dist/typescript/module/features/pmProgress/chart/chart.helpers.d.ts +5 -0
  166. package/dist/typescript/module/features/pmProgress/chart/chart.helpers.d.ts.map +1 -0
  167. package/dist/typescript/module/features/pmProgress/chart/chart.types.d.ts +35 -0
  168. package/dist/typescript/module/features/pmProgress/chart/chart.types.d.ts.map +1 -0
  169. package/dist/typescript/module/features/pmProgress/chart/components/PracticeProgressPieChart.d.ts +9 -0
  170. package/dist/typescript/module/features/pmProgress/chart/components/PracticeProgressPieChart.d.ts.map +1 -0
  171. package/dist/typescript/module/features/pmProgress/chart/components/SlicesClipPaths.d.ts +10 -0
  172. package/dist/typescript/module/features/pmProgress/chart/components/SlicesClipPaths.d.ts.map +1 -0
  173. package/dist/typescript/module/features/pmProgress/chart/components/SlicesPaths.d.ts +11 -0
  174. package/dist/typescript/module/features/pmProgress/chart/components/SlicesPaths.d.ts.map +1 -0
  175. package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceArcPattern.d.ts +12 -0
  176. package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceArcPattern.d.ts.map +1 -0
  177. package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceBackgroundColor.d.ts +8 -0
  178. package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceBackgroundColor.d.ts.map +1 -0
  179. package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceFillColor.d.ts +13 -0
  180. package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceFillColor.d.ts.map +1 -0
  181. package/dist/typescript/module/features/pmProgress/chart/model/ArcPatternGenerator.d.ts +12 -0
  182. package/dist/typescript/module/features/pmProgress/chart/model/ArcPatternGenerator.d.ts.map +1 -0
  183. package/dist/typescript/module/features/pmProgress/chart/model/PieChartManager.d.ts +16 -0
  184. package/dist/typescript/module/features/pmProgress/chart/model/PieChartManager.d.ts.map +1 -0
  185. package/dist/typescript/module/features/pmProgress/chart/model/SliceHighlight.d.ts +10 -0
  186. package/dist/typescript/module/features/pmProgress/chart/model/SliceHighlight.d.ts.map +1 -0
  187. package/dist/typescript/module/features/pmProgress/chart/model/SliceShapeGenerator.d.ts +15 -0
  188. package/dist/typescript/module/features/pmProgress/chart/model/SliceShapeGenerator.d.ts.map +1 -0
  189. package/dist/typescript/module/features/pmProgress/header/PracticeProgressHeader.d.ts +12 -0
  190. package/dist/typescript/module/features/pmProgress/header/PracticeProgressHeader.d.ts.map +1 -0
  191. package/dist/typescript/module/features/pmProgress/index.d.ts +2 -0
  192. package/dist/typescript/module/features/pmProgress/index.d.ts.map +1 -0
  193. package/dist/typescript/module/features/pmProgress/list/ListCard.d.ts +15 -0
  194. package/dist/typescript/module/features/pmProgress/list/ListCard.d.ts.map +1 -0
  195. package/dist/typescript/module/features/pmProgress/list/ListItem.d.ts +11 -0
  196. package/dist/typescript/module/features/pmProgress/list/ListItem.d.ts.map +1 -0
  197. package/dist/typescript/module/features/pmProgress/recs/TeacherRecs.d.ts +3 -0
  198. package/dist/typescript/module/features/pmProgress/recs/TeacherRecs.d.ts.map +1 -0
  199. package/dist/typescript/module/features/pmProgress/stats/PracticeProgressStats.d.ts +3 -0
  200. package/dist/typescript/module/features/pmProgress/stats/PracticeProgressStats.d.ts.map +1 -0
  201. package/dist/typescript/module/features/pmProgress/stats/StatsCard.d.ts +10 -0
  202. package/dist/typescript/module/features/pmProgress/stats/StatsCard.d.ts.map +1 -0
  203. package/dist/typescript/module/features/pmProgress/temp.d.ts +4 -0
  204. package/dist/typescript/module/features/pmProgress/temp.d.ts.map +1 -0
  205. package/dist/typescript/module/index.d.ts +1 -0
  206. package/dist/typescript/module/index.d.ts.map +1 -1
  207. package/dist/typescript/module/shared/icons/PentagonIcon.d.ts +4 -0
  208. package/dist/typescript/module/shared/icons/PentagonIcon.d.ts.map +1 -0
  209. package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts +4 -0
  210. package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts.map +1 -0
  211. package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts +4 -0
  212. package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts.map +1 -0
  213. package/dist/typescript/module/shared/icons/StarIcon.d.ts +4 -0
  214. package/dist/typescript/module/shared/icons/StarIcon.d.ts.map +1 -0
  215. package/dist/typescript/module/shared/icons/TimerIcon.d.ts +4 -0
  216. package/dist/typescript/module/shared/icons/TimerIcon.d.ts.map +1 -0
  217. package/package.json +4 -2
  218. package/src/features/pmProgress/PracticeProgress.tsx +249 -0
  219. package/src/features/pmProgress/chart/chart.helpers.ts +15 -0
  220. package/src/features/pmProgress/chart/chart.types.ts +36 -0
  221. package/src/features/pmProgress/chart/components/PracticeProgressPieChart.tsx +32 -0
  222. package/src/features/pmProgress/chart/components/SlicesClipPaths.tsx +36 -0
  223. package/src/features/pmProgress/chart/components/SlicesPaths.tsx +67 -0
  224. package/src/features/pmProgress/chart/components/layers/SliceArcPattern.tsx +44 -0
  225. package/src/features/pmProgress/chart/components/layers/SliceBackgroundColor.tsx +11 -0
  226. package/src/features/pmProgress/chart/components/layers/SliceFillColor.tsx +55 -0
  227. package/src/features/pmProgress/chart/model/ArcPatternGenerator.ts +48 -0
  228. package/src/features/pmProgress/chart/model/PieChartManager.ts +20 -0
  229. package/src/features/pmProgress/chart/model/SliceHighlight.ts +17 -0
  230. package/src/features/pmProgress/chart/model/SliceShapeGenerator.ts +71 -0
  231. package/src/features/pmProgress/header/PracticeProgressHeader.tsx +178 -0
  232. package/src/features/pmProgress/index.ts +1 -0
  233. package/src/features/pmProgress/list/ListCard.tsx +133 -0
  234. package/src/features/pmProgress/list/ListItem.tsx +113 -0
  235. package/src/features/pmProgress/recs/TeacherRecs.tsx +10 -0
  236. package/src/features/pmProgress/stats/PracticeProgressStats.tsx +60 -0
  237. package/src/features/pmProgress/stats/StatsCard.tsx +58 -0
  238. package/src/features/pmProgress/temp.ts +67 -0
  239. package/src/index.ts +1 -0
  240. package/src/shared/icons/PentagonIcon.tsx +17 -0
  241. package/src/shared/icons/SketchArrowRight.tsx +18 -0
  242. package/src/shared/icons/SliceDiamondIcon.tsx +16 -0
  243. package/src/shared/icons/StarIcon.tsx +17 -0
  244. package/src/shared/icons/TimerIcon.tsx +21 -0
  245. package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  246. package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  247. package/src/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
@@ -0,0 +1,264 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PracticeProgress = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeUi = require("@magmamath/react-native-ui");
10
+ var _PracticeProgressPieChart = require("./chart/components/PracticeProgressPieChart.js");
11
+ var _temp = require("./temp.js");
12
+ var _PracticeProgressHeader = require("./header/PracticeProgressHeader.js");
13
+ var _PracticeProgressStats = require("./stats/PracticeProgressStats.js");
14
+ var _ListCard = require("./list/ListCard.js");
15
+ var _SliceDiamondIcon = require("../../shared/icons/SliceDiamondIcon.js");
16
+ var _PentagonIcon = require("../../shared/icons/PentagonIcon.js");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
+ const SAMPLE_ITEMS = [{
20
+ title: 'Solve real-world problems',
21
+ subtitle: '4.NS.3B',
22
+ skillsLeft: 3
23
+ }, {
24
+ title: 'Divide fractions',
25
+ subtitle: '4.NS.3A',
26
+ skillsLeft: 0,
27
+ isFinished: true
28
+ }, {
29
+ title: 'Add and subtract fractions',
30
+ subtitle: '4.NS.2A',
31
+ skillsLeft: 5
32
+ }, {
33
+ title: 'Multiply whole numbers',
34
+ subtitle: '4.NS.1C',
35
+ skillsLeft: 0,
36
+ isFinished: true
37
+ }];
38
+ const LIST_DATA = [...Array.from({
39
+ length: 11
40
+ }, (_, i) => ({
41
+ id: `algebra-${i}`,
42
+ title: 'Algebra and Functions',
43
+ color: _reactNativeUi.COLORS.PRIMARY_INDIGO,
44
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SliceDiamondIcon.SliceDiamondIcon, {
45
+ color: _reactNativeUi.COLORS.PRIMARY_INDIGO
46
+ }),
47
+ items: SAMPLE_ITEMS,
48
+ progress: Math.round(10 + i * 8)
49
+ })), {
50
+ id: 'data-analysis',
51
+ title: 'Data Analysis and Probability',
52
+ color: _reactNativeUi.COLORS.PRIMARY_BLUE,
53
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SliceDiamondIcon.SliceDiamondIcon, {
54
+ color: _reactNativeUi.COLORS.PRIMARY_BLUE
55
+ }),
56
+ items: SAMPLE_ITEMS,
57
+ progress: 63
58
+ }, {
59
+ id: 'ratios',
60
+ title: 'Ratios and Proportionality',
61
+ color: _reactNativeUi.COLORS.PRIMARY_RED,
62
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SliceDiamondIcon.SliceDiamondIcon, {
63
+ color: _reactNativeUi.COLORS.PRIMARY_RED
64
+ }),
65
+ items: SAMPLE_ITEMS,
66
+ progress: 27
67
+ }];
68
+ const FLUENCY_DATA = {
69
+ id: 'fluency',
70
+ title: 'Fluency',
71
+ color: _reactNativeUi.COLORS.PRIMARY_ORANGE,
72
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SliceDiamondIcon.SliceDiamondIcon, {
73
+ color: _reactNativeUi.COLORS.PRIMARY_ORANGE
74
+ }),
75
+ items: SAMPLE_ITEMS,
76
+ progress: 85
77
+ };
78
+ const SCROLLBAR_WIDTH = 8;
79
+ const BADGE_SIZE = 20;
80
+ const BADGE_OFFSET = -8;
81
+ const BADGE_FONT_SIZE = 12;
82
+ const CHART_SIZE = 432;
83
+ const STATS_MAX_HEIGHT = 136;
84
+ const ListFooter = () => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
85
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
86
+ style: styles.separator
87
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListCard.ListCard, {
88
+ icon: FLUENCY_DATA.icon,
89
+ title: FLUENCY_DATA.title,
90
+ color: FLUENCY_DATA.color,
91
+ items: FLUENCY_DATA.items,
92
+ progress: FLUENCY_DATA.progress,
93
+ isFirst: true,
94
+ isLast: true
95
+ })]
96
+ });
97
+ const PracticeProgress = () => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
98
+ style: styles.container,
99
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_PracticeProgressHeader.PracticeProgressHeader, {
100
+ title: "Practice & Progress",
101
+ buttonLabel: "START",
102
+ grade: "Grade 4",
103
+ nextUp: "Next up!",
104
+ topic: "Algebra and functions",
105
+ topicColor: _reactNativeUi.COLORS.PRIMARY_RED
106
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
107
+ style: styles.content,
108
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
109
+ style: styles.column,
110
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
111
+ style: styles.recommendations,
112
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
113
+ style: styles.badgeWrapper,
114
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListCard.ListCard, {
115
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PentagonIcon.PentagonIcon, {
116
+ color: _reactNativeUi.COLORS.PRIMARY_YELLOW
117
+ }),
118
+ title: "Teacher Recommendations",
119
+ color: _reactNativeUi.COLORS.PRIMARY_YELLOW,
120
+ items: SAMPLE_ITEMS,
121
+ progress: 42,
122
+ isFirst: true,
123
+ isLast: true,
124
+ rightContent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
125
+ size: _reactNativeUi.ButtonSize.SMALL,
126
+ variant: _reactNativeUi.ButtonVariant.SECONDARY,
127
+ children: "PRACTICE"
128
+ })
129
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
130
+ style: styles.badge,
131
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
132
+ style: styles.badgeText,
133
+ children: "7"
134
+ })
135
+ })]
136
+ })
137
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
138
+ style: styles.cards,
139
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.ScrollableList, {
140
+ style: styles.scroll,
141
+ scrollbarWidth: SCROLLBAR_WIDTH,
142
+ hideShadow: true,
143
+ data: LIST_DATA,
144
+ renderItem: ({
145
+ item,
146
+ index
147
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListCard.ListCard, {
148
+ icon: item.icon,
149
+ title: item.title,
150
+ color: item.color,
151
+ items: item.items,
152
+ progress: item.progress,
153
+ isFirst: index === 0,
154
+ isLast: index === LIST_DATA.length - 1
155
+ }),
156
+ keyExtractor: item => item.id,
157
+ contentContainerStyle: styles.list,
158
+ ListFooterComponent: ListFooter
159
+ })
160
+ })]
161
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
162
+ style: styles.metrics,
163
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
164
+ style: styles.chart,
165
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PracticeProgressPieChart.PracticeProgressPieChart, {
166
+ data: _temp.SAMPLE_DATA,
167
+ config: _temp.DEFAULT_CONFIG
168
+ })
169
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
170
+ style: styles.stats,
171
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PracticeProgressStats.PracticeProgressStats, {})
172
+ })]
173
+ })]
174
+ })]
175
+ });
176
+ exports.PracticeProgress = PracticeProgress;
177
+ const styles = _reactNative.StyleSheet.create({
178
+ container: {
179
+ flex: 1
180
+ },
181
+ content: {
182
+ flex: 1,
183
+ flexDirection: 'row'
184
+ },
185
+ column: {
186
+ flex: 1,
187
+ gap: _reactNativeUi.SPACING[200],
188
+ marginRight: _reactNativeUi.SPACING[400] + _reactNativeUi.SPACING[50]
189
+ },
190
+ recommendations: {
191
+ backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
192
+ padding: _reactNativeUi.SPACING[200],
193
+ borderRadius: _reactNativeUi.BORDER_RADIUS[400],
194
+ overflow: 'visible'
195
+ },
196
+ badgeWrapper: {
197
+ position: 'relative'
198
+ },
199
+ badge: {
200
+ position: 'absolute',
201
+ top: BADGE_OFFSET,
202
+ right: BADGE_OFFSET,
203
+ width: BADGE_SIZE,
204
+ height: BADGE_SIZE,
205
+ backgroundColor: _reactNativeUi.COLORS.PRIMARY_RED,
206
+ alignItems: 'center',
207
+ justifyContent: 'center',
208
+ borderRadius: BADGE_SIZE / 2
209
+ },
210
+ badgeText: {
211
+ fontSize: BADGE_FONT_SIZE,
212
+ fontWeight: '600',
213
+ color: _reactNativeUi.COLORS.NEUTRAL_1,
214
+ textAlign: 'center'
215
+ },
216
+ cards: {
217
+ flex: 1,
218
+ backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
219
+ padding: _reactNativeUi.SPACING[200],
220
+ borderRadius: _reactNativeUi.BORDER_RADIUS[400],
221
+ overflow: 'visible'
222
+ },
223
+ scroll: {
224
+ flex: 1
225
+ },
226
+ list: {
227
+ marginRight: _reactNativeUi.SPACING[400]
228
+ },
229
+ separator: {
230
+ height: 1,
231
+ backgroundColor: _reactNativeUi.COLORS.NEUTRAL_4,
232
+ marginHorizontal: _reactNativeUi.SPACING[100],
233
+ marginVertical: _reactNativeUi.SPACING[200]
234
+ },
235
+ metrics: {
236
+ height: '100%'
237
+ },
238
+ chart: {
239
+ alignItems: 'center',
240
+ justifyContent: 'center',
241
+ backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
242
+ borderRadius: _reactNativeUi.BORDER_RADIUS[250],
243
+ width: CHART_SIZE,
244
+ height: CHART_SIZE,
245
+ marginBottom: _reactNativeUi.SPACING[400],
246
+ marginTop: _reactNativeUi.SPACING[400]
247
+ },
248
+ stats: {
249
+ maxHeight: STATS_MAX_HEIGHT,
250
+ height: '100%',
251
+ padding: _reactNativeUi.SPACING[200],
252
+ backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
253
+ borderRadius: _reactNativeUi.BORDER_RADIUS[300],
254
+ shadowColor: _reactNativeUi.COLORS.NEUTRAL_9,
255
+ shadowOffset: {
256
+ width: 0,
257
+ height: 1
258
+ },
259
+ shadowOpacity: 0.1,
260
+ shadowRadius: 3,
261
+ elevation: 2
262
+ }
263
+ });
264
+ //# sourceMappingURL=PracticeProgress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeUi","_PracticeProgressPieChart","_temp","_PracticeProgressHeader","_PracticeProgressStats","_ListCard","_SliceDiamondIcon","_PentagonIcon","_jsxRuntime","e","__esModule","default","SAMPLE_ITEMS","title","subtitle","skillsLeft","isFinished","LIST_DATA","Array","from","length","_","i","id","color","COLORS","PRIMARY_INDIGO","icon","jsx","SliceDiamondIcon","items","progress","Math","round","PRIMARY_BLUE","PRIMARY_RED","FLUENCY_DATA","PRIMARY_ORANGE","SCROLLBAR_WIDTH","BADGE_SIZE","BADGE_OFFSET","BADGE_FONT_SIZE","CHART_SIZE","STATS_MAX_HEIGHT","ListFooter","jsxs","Fragment","children","View","style","styles","separator","ListCard","isFirst","isLast","PracticeProgress","container","PracticeProgressHeader","buttonLabel","grade","nextUp","topic","topicColor","content","column","recommendations","badgeWrapper","PentagonIcon","PRIMARY_YELLOW","rightContent","Button","size","ButtonSize","SMALL","variant","ButtonVariant","SECONDARY","badge","Text","badgeText","cards","ScrollableList","scroll","scrollbarWidth","hideShadow","data","renderItem","item","index","keyExtractor","contentContainerStyle","list","ListFooterComponent","metrics","chart","PracticeProgressPieChart","SAMPLE_DATA","config","DEFAULT_CONFIG","stats","PracticeProgressStats","exports","StyleSheet","create","flex","flexDirection","gap","SPACING","marginRight","backgroundColor","NEUTRAL_1","padding","borderRadius","BORDER_RADIUS","overflow","position","top","right","width","height","alignItems","justifyContent","fontSize","fontWeight","textAlign","NEUTRAL_4","marginHorizontal","marginVertical","marginBottom","marginTop","maxHeight","shadowColor","NEUTRAL_9","shadowOffset","shadowOpacity","shadowRadius","elevation"],"sourceRoot":"../../../../src","sources":["features/pmProgress/PracticeProgress.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AASA,IAAAG,yBAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,uBAAA,GAAAL,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.getSliceClipId = exports.getFillClipId = exports.dynamicInnerRadius = exports.dynamicCornerRadius = void 0;
7
+ const getSliceClipId = index => `slice-clip-${index}`;
8
+ exports.getSliceClipId = getSliceClipId;
9
+ const getFillClipId = index => `fill-clip-${index}`;
10
+ exports.getFillClipId = getFillClipId;
11
+ const dynamicInnerRadius = sliceCount => {
12
+ if (sliceCount > 5) return 16;
13
+ if (sliceCount > 3) return 20;
14
+ return 30;
15
+ };
16
+ exports.dynamicInnerRadius = dynamicInnerRadius;
17
+ const dynamicCornerRadius = fillPercent => {
18
+ return 8;
19
+ if (fillPercent >= 75) return 8;
20
+ if (fillPercent >= 40) return 5;
21
+ return 2;
22
+ };
23
+ exports.dynamicCornerRadius = dynamicCornerRadius;
24
+ //# sourceMappingURL=chart.helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getSliceClipId","index","exports","getFillClipId","dynamicInnerRadius","sliceCount","dynamicCornerRadius","fillPercent"],"sourceRoot":"../../../../../src","sources":["features/pmProgress/chart/chart.helpers.ts"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAIC,KAAsB,IAAK,cAAcA,KAAK,EAAE;AAAAC,OAAA,CAAAF,cAAA,GAAAA,cAAA;AACxE,MAAMG,aAAa,GAAIF,KAAsB,IAAK,aAAaA,KAAK,EAAE;AAAAC,OAAA,CAAAC,aAAA,GAAAA,aAAA;AAEtE,MAAMC,kBAAkB,GAAIC,UAAkB,IAAa;EAChE,IAAIA,UAAU,GAAG,CAAC,EAAE,OAAO,EAAE;EAC7B,IAAIA,UAAU,GAAG,CAAC,EAAE,OAAO,EAAE;EAC7B,OAAO,EAAE;AACX,CAAC;AAAAH,OAAA,CAAAE,kBAAA,GAAAA,kBAAA;AAEM,MAAME,mBAAmB,GAAIC,WAAmB,IAAa;EAClE,OAAO,CAAC;EACR,IAAIA,WAAW,IAAI,EAAE,EAAE,OAAO,CAAC;EAC/B,IAAIA,WAAW,IAAI,EAAE,EAAE,OAAO,CAAC;EAC/B,OAAO,CAAC;AACV,CAAC;AAAAL,OAAA,CAAAI,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=chart.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["features/pmProgress/chart/chart.types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PracticeProgressPieChart = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeSvg = _interopRequireWildcard(require("react-native-svg"));
10
+ var _PieChartManager = require("../model/PieChartManager.js");
11
+ var _SlicesClipPaths = require("./SlicesClipPaths.js");
12
+ var _SlicesPaths = require("./SlicesPaths.js");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ const PracticeProgressPieChart = exports.PracticeProgressPieChart = /*#__PURE__*/(0, _react.memo)(({
17
+ data,
18
+ config
19
+ }) => {
20
+ const [pieChartManager] = (0, _react.useState)(() => new _PieChartManager.PieChartManager(config));
21
+ const center = pieChartManager.getCenter();
22
+ const slices = (0, _react.useMemo)(() => {
23
+ return pieChartManager.shape.generateSlices(data);
24
+ }, [data]);
25
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
26
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.default, {
27
+ width: config.size,
28
+ height: config.size,
29
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.G, {
30
+ x: center.x,
31
+ y: center.y,
32
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SlicesClipPaths.SlicesClipPaths, {
33
+ slices: slices,
34
+ pieChartManager: pieChartManager
35
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SlicesPaths.SlicesPaths, {
36
+ slices: slices,
37
+ pieChartManager: pieChartManager,
38
+ config: config
39
+ })]
40
+ })
41
+ })
42
+ });
43
+ });
44
+ //# sourceMappingURL=PracticeProgressPieChart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeSvg","_PieChartManager","_SlicesClipPaths","_SlicesPaths","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","PracticeProgressPieChart","exports","memo","data","config","pieChartManager","useState","PieChartManager","center","getCenter","slices","useMemo","shape","generateSlices","jsx","View","children","width","size","height","jsxs","G","x","y","SlicesClipPaths","SlicesPaths"],"sourceRoot":"../../../../../../src","sources":["features/pmProgress/chart/components/PracticeProgressPieChart.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAA2C,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAO,yBAAAC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,MAAM,IAAIC,gCAAe,CAACH,MAAM,CAAC,CAAC;EACrE,MAAMI,MAAM,GAAGH,eAAe,CAACI,SAAS,CAAC,CAAC;EAE1C,MAAMC,MAAM,GAAG,IAAAC,cAAO,EAAC,MAAM;IAC3B,OAAON,eAAe,CAACO,KAAK,CAACC,cAAc,CAACV,IAAI,CAAC;EACnD,CAAC,EAAE,CAACA,IAAI,CAAC,CAAC;EAEV,oBACE,IAAAxB,WAAA,CAAAmC,GAAA,EAACxC,YAAA,CAAAyC,IAAI;IAAAC,QAAA,eACH,IAAArC,WAAA,CAAAmC,GAAA,EAACvC,eAAA,CAAAW,OAAG;MAAC+B,KAAK,EAAEb,MAAM,CAACc,IAAK;MAACC,MAAM,EAAEf,MAAM,CAACc,IAAK;MAAAF,QAAA,eAC3C,IAAArC,WAAA,CAAAyC,IAAA,EAAC7C,eAAA,CAAA8C,CAAC;QAACC,CAAC,EAAEd,MAAM,CAACc,CAAE;QAACC,CAAC,EAAEf,MAAM,CAACe,CAAE;QAAAP,QAAA,gBAC1B,IAAArC,WAAA,CAAAmC,GAAA,EAACrC,gBAAA,CAAA+C,eAAe;UAACd,MAAM,EAAEA,MAAO;UAACL,eAAe,EAAEA;QAAgB,CAAE,CAAC,eACrE,IAAA1B,WAAA,CAAAmC,GAAA,EAACpC,YAAA,CAAA+C,WAAW;UAACf,MAAM,EAAEA,MAAO;UAACL,eAAe,EAAEA,eAAgB;UAACD,MAAM,EAAEA;QAAO,CAAE,CAAC;MAAA,CAChF;IAAC,CACD;EAAC,CACF,CAAC;AAEX,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SlicesClipPaths = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNativeSvg = require("react-native-svg");
9
+ var _chartHelpers = require("../chart.helpers.js");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ const SlicesClipPaths = ({
13
+ slices,
14
+ pieChartManager
15
+ }) => {
16
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Defs, {
17
+ children: slices.map(slice => {
18
+ const isPartiallyFilled = slice.fillPercent > 0 && slice.fillPercent < 100;
19
+ const shapeId = (0, _chartHelpers.getSliceClipId)(slice.index);
20
+ const fillId = (0, _chartHelpers.getFillClipId)(slice.index);
21
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.default.Fragment, {
22
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.ClipPath, {
23
+ id: shapeId,
24
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
25
+ d: pieChartManager.shape.generateSlicePath(slice)
26
+ })
27
+ }), isPartiallyFilled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.ClipPath, {
28
+ id: fillId,
29
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
30
+ d: pieChartManager.shape.generateFillPath(slice)
31
+ })
32
+ })]
33
+ }, slice.index);
34
+ })
35
+ });
36
+ };
37
+ exports.SlicesClipPaths = SlicesClipPaths;
38
+ //# sourceMappingURL=SlicesClipPaths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeSvg","_chartHelpers","_jsxRuntime","e","__esModule","default","SlicesClipPaths","slices","pieChartManager","jsx","Defs","children","map","slice","isPartiallyFilled","fillPercent","shapeId","getSliceClipId","index","fillId","getFillClipId","jsxs","Fragment","ClipPath","id","Path","d","shape","generateSlicePath","generateFillPath","exports"],"sourceRoot":"../../../../../../src","sources":["features/pmProgress/chart/components/SlicesClipPaths.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE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K,CAACK,KAUX,CAAC;IAErB,CAAC;EAAC,CACE,CAAC;AAEX,CAAC;AAAAY,OAAA,CAAAxB,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SlicesPaths = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeSvg = require("react-native-svg");
10
+ var _effectorReact = require("effector-react");
11
+ var _SliceBackgroundColor = require("./layers/SliceBackgroundColor.js");
12
+ var _SliceFillColor = require("./layers/SliceFillColor.js");
13
+ var _SliceArcPattern = require("./layers/SliceArcPattern.js");
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
+ const SlicesPaths = ({
17
+ slices,
18
+ pieChartManager,
19
+ config
20
+ }) => {
21
+ const highlightedIndex = (0, _effectorReact.useUnit)(pieChartManager.highlight.$highlightedIndex);
22
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
23
+ children: slices.map(slice => {
24
+ const id = `${slice.index}`;
25
+ const shapeSvg = pieChartManager.shape.generateSlicePath(slice);
26
+ const fillSvg = pieChartManager.shape.generateFillPath(slice);
27
+ const isHighlighted = highlightedIndex === slice.index;
28
+ const translateY = pieChartManager.highlight.getTranslateY(isHighlighted);
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.G, {
30
+ style: styles.container,
31
+ translateY: translateY,
32
+ onPressIn: () => pieChartManager.highlight.highlightSlice(slice.index),
33
+ onPressOut: () => pieChartManager.highlight.resetHighlight(),
34
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SliceBackgroundColor.SliceBackgroundColor, {
35
+ path: shapeSvg,
36
+ color: slice.backgroundColor
37
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SliceFillColor.SliceFillColor, {
38
+ clipPathId: id,
39
+ shapeSvg: shapeSvg,
40
+ fillSvg: fillSvg,
41
+ color: slice.fillColor,
42
+ percent: slice.fillPercent,
43
+ borderColor: isHighlighted ? slice.borderColor : undefined,
44
+ borderWidth: isHighlighted ? config.borderWidth : undefined
45
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SliceArcPattern.SliceArcPattern, {
46
+ clipPathId: id,
47
+ slice: slice,
48
+ config: config,
49
+ pieChartManager: pieChartManager
50
+ })]
51
+ }, id);
52
+ })
53
+ });
54
+ };
55
+ exports.SlicesPaths = SlicesPaths;
56
+ const styles = _reactNative.StyleSheet.create({
57
+ container: {
58
+ cursor: 'pointer',
59
+ ...(_reactNative.Platform.OS === 'web' ? {
60
+ transition: 'transform 0.1s ease-in-out'
61
+ } : {})
62
+ }
63
+ });
64
+ //# sourceMappingURL=SlicesPaths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeSvg","_effectorReact","_SliceBackgroundColor","_SliceFillColor","_SliceArcPattern","_jsxRuntime","e","__esModule","default","SlicesPaths","slices","pieChartManager","config","highlightedIndex","useUnit","highlight","$highlightedIndex","jsx","Fragment","children","map","slice","id","index","shapeSvg","shape","generateSlicePath","fillSvg","generateFillPath","isHighlighted","translateY","getTranslateY","jsxs","G","style","styles","container","onPressIn","highlightSlice","onPressOut","resetHighlight","SliceBackgroundColor","path","color","backgroundColor","SliceFillColor","clipPathId","fillColor","percent","fillPercent","borderColor","undefined","borderWidth","SliceArcPattern","exports","StyleSheet","create","cursor","Platform","OS","transition"],"sourceRoot":"../../../../../../src","sources":["features/pmProgress/chart/components/SlicesPaths.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,qBAAA,GAAAJ,O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AAA,CAAAuC,oBAAoB;UAACC,IAAI,EAAElB,QAAS;UAACmB,KAAK,EAAEtB,KAAK,CAACuB;QAAgB,CAAE,CAAC,eAEtE,IAAAvC,WAAA,CAAAY,GAAA,EAACd,eAAA,CAAA0C,cAAc;UACbC,UAAU,EAAExB,EAAG;UACfE,QAAQ,EAAEA,QAAS;UACnBG,OAAO,EAAEA,OAAQ;UACjBgB,KAAK,EAAEtB,KAAK,CAAC0B,SAAU;UACvBC,OAAO,EAAE3B,KAAK,CAAC4B,WAAY;UAC3BC,WAAW,EAAErB,aAAa,GAAGR,KAAK,CAAC6B,WAAW,GAAGC,SAAU;UAC3DC,WAAW,EAAEvB,aAAa,GAAGjB,MAAM,CAACwC,WAAW,GAAGD;QAAU,CAC7D,CAAC,eAEF,IAAA9C,WAAA,CAAAY,GAAA,EAACb,gBAAA,CAAAiD,eAAe;UACdP,UAAU,EAAExB,EAAG;UACfD,KAAK,EAAEA,KAAM;UACbT,MAAM,EAAEA,MAAO;UACfD,eAAe,EAAEA;QAAgB,CAClC,CAAC;MAAA,GAvBGW,EAwBJ,CAAC;IAER,CAAC;EAAC,CACF,CAAC;AAEP,CAAC;AAAAgC,OAAA,CAAA7C,WAAA,GAAAA,WAAA;AAED,MAAM0B,MAAM,GAAGoB,uBAAU,CAACC,MAAM,CAAC;EAC/BpB,SAAS,EAAE;IACTqB,MAAM,EAAE,SAAS;IACjB,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,GAAG;MAAEC,UAAU,EAAE;IAA6B,CAAC,GAAG,CAAC,CAAC;EAC/E;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SliceArcPattern = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNativeSvg = require("react-native-svg");
9
+ var _chartHelpers = require("../../chart.helpers.js");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ const SliceArcPattern = ({
13
+ clipPathId,
14
+ slice,
15
+ pieChartManager,
16
+ config
17
+ }) => {
18
+ const patternSizes = pieChartManager.pattern.getPatternTrackSizes();
19
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.G, {
20
+ clipPath: `url(#${(0, _chartHelpers.getSliceClipId)(clipPathId)})`,
21
+ children: patternSizes.map((radius, rowIndex) => {
22
+ const arcPath = pieChartManager.pattern.generateArcPath(slice, radius);
23
+ const dashWidth = pieChartManager.pattern.getDashWidthForRadius(radius);
24
+ const dashOffset = pieChartManager.pattern.getDashOffset(rowIndex, radius);
25
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
26
+ d: arcPath,
27
+ fill: "none",
28
+ stroke: config.outerArc.color,
29
+ strokeWidth: config.outerArc.strokeWidth,
30
+ strokeDasharray: [dashWidth, dashWidth],
31
+ strokeDashoffset: dashOffset,
32
+ strokeLinecap: "butt"
33
+ }, rowIndex);
34
+ })
35
+ });
36
+ };
37
+ exports.SliceArcPattern = SliceArcPattern;
38
+ //# sourceMappingURL=SliceArcPattern.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeSvg","_chartHelpers","_jsxRuntime","e","__esModule","default","SliceArcPattern","clipPathId","slice","pieChartManager","config","patternSizes","pattern","getPatternTrackSizes","jsx","G","clipPath","getSliceClipId","children","map","radius","rowIndex","arcPath","generateArcPath","dashWidth","getDashWidthForRadius","dashOffset","getDashOffset","Path","d","fill","stroke","outerArc","color","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","exports"],"sourceRoot":"../../../../../../../src","sources":["features/pmProgress/chart/components/layers/SliceArcPattern.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,aAA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
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SliceBackgroundColor = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNativeSvg = require("react-native-svg");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ const SliceBackgroundColor = ({
12
+ path,
13
+ color
14
+ }) => {
15
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
16
+ d: path,
17
+ fill: color
18
+ });
19
+ };
20
+ exports.SliceBackgroundColor = SliceBackgroundColor;
21
+ //# sourceMappingURL=SliceBackgroundColor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeSvg","_jsxRuntime","e","__esModule","default","SliceBackgroundColor","path","color","jsx","Path","d","fill","exports"],"sourceRoot":"../../../../../../../src","sources":["features/pmProgress/chart/components/layers/SliceBackgroundColor.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAAuC,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAOhC,MAAMG,oBAAoB,GAAGA,CAAC;EAAEC,IAAI;EAAEC;AAA4B,CAAC,KAAK;EAC7E,oBAAO,IAAAN,WAAA,CAAAO,GAAA,EAACR,eAAA,CAAAS,IAAI;IAACC,CAAC,EAAEJ,IAAK;IAACK,IAAI,EAAEJ;EAAM,CAAE,CAAC;AACvC,CAAC;AAAAK,OAAA,CAAAP,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SliceFillColor = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNativeSvg = require("react-native-svg");
9
+ var _chartHelpers = require("../../chart.helpers.js");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ const SliceFillColor = ({
13
+ clipPathId,
14
+ shapeSvg,
15
+ fillSvg,
16
+ color,
17
+ percent,
18
+ borderColor,
19
+ borderWidth
20
+ }) => {
21
+ const isFullyFilled = percent >= 100;
22
+ const isPartiallyFilled = percent > 0;
23
+ const hasBorder = borderColor != null && borderWidth != null && borderWidth > 0;
24
+ if (isFullyFilled) {
25
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.G, {
26
+ clipPath: `url(#${(0, _chartHelpers.getSliceClipId)(clipPathId)})`,
27
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
28
+ d: shapeSvg,
29
+ fill: color,
30
+ stroke: hasBorder ? borderColor : undefined,
31
+ strokeWidth: hasBorder ? borderWidth * 2 : undefined
32
+ })
33
+ });
34
+ }
35
+ if (isPartiallyFilled) {
36
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.G, {
37
+ clipPath: `url(#${(0, _chartHelpers.getFillClipId)(clipPathId)})`,
38
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
39
+ d: fillSvg,
40
+ fill: color,
41
+ stroke: hasBorder ? borderColor : undefined,
42
+ strokeWidth: hasBorder ? borderWidth * 2 : undefined
43
+ })
44
+ });
45
+ }
46
+ return null;
47
+ };
48
+ exports.SliceFillColor = SliceFillColor;
49
+ //# sourceMappingURL=SliceFillColor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeSvg","_chartHelpers","_jsxRuntime","e","__esModule","default","SliceFillColor","clipPathId","shapeSvg","fillSvg","color","percent","borderColor","borderWidth","isFullyFilled","isPartiallyFilled","hasBorder","jsx","G","clipPath","getSliceClipId","children","Path","d","fill","stroke","undefined","strokeWidth","getFillClipId","exports"],"sourceRoot":"../../../../../../../src","sources":["features/pmProgress/chart/components/layers/SliceFillColor.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAAmE,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAY5D,MAAMG,cAAc,GAAGA,CAAC;EAC7BC,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC,KAAK;EACLC,OAAO;EACPC,WAAW;EACXC;AACmB,CAAC,KAAK;EACzB,MAAMC,aAAa,GAAGH,OAAO,IAAI,GAAG;EACpC,MAAMI,iBAAiB,GAAGJ,OAAO,GAAG,CAAC;EACrC,MAAMK,SAAS,GAAGJ,WAAW,IAAI,IAAI,IAAIC,WAAW,IAAI,IAAI,IAAIA,WAAW,GAAG,CAAC;EAE/E,IAAIC,aAAa,EAAE;IACjB,oBACE,IAAAZ,WAAA,CAAAe,GAAA,EAACjB,eAAA,CAAAkB,CAAC;MAACC,QAAQ,EAAE,QAAQ,IAAAC,4BAAc,EAACb,UAAU,CAAC,GAAI;MAAAc,QAAA,eACjD,IAAAnB,WAAA,CAAAe,GAAA,EAACjB,eAAA,CAAAsB,IAAI;QACHC,CAAC,EAAEf,QAAS;QACZgB,IAAI,EAAEd,KAAM;QACZe,MAAM,EAAET,SAAS,GAAGJ,WAAW,GAAGc,SAAU;QAC5CC,WAAW,EAAEX,SAAS,GAAGH,WAAW,GAAG,CAAC,GAAGa;MAAU,CACtD;IAAC,CACD,CAAC;EAER;EAEA,IAAIX,iBAAiB,EAAE;IACrB,oBACE,IAAAb,W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