@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.
- package/dist/commonjs/features/pmProgress/PracticeProgress.js +264 -0
- package/dist/commonjs/features/pmProgress/PracticeProgress.js.map +1 -0
- package/dist/commonjs/features/pmProgress/chart/chart.helpers.js +24 -0
- package/dist/commonjs/features/pmProgress/chart/chart.helpers.js.map +1 -0
- package/dist/commonjs/features/pmProgress/chart/chart.types.js +2 -0
- package/dist/commonjs/features/pmProgress/chart/chart.types.js.map +1 -0
- package/dist/commonjs/features/pmProgress/chart/components/PracticeProgressPieChart.js +44 -0
- package/dist/commonjs/features/pmProgress/chart/components/PracticeProgressPieChart.js.map +1 -0
- package/dist/commonjs/features/pmProgress/chart/components/SlicesClipPaths.js +38 -0
- package/dist/commonjs/features/pmProgress/chart/components/SlicesClipPaths.js.map +1 -0
- package/dist/commonjs/features/pmProgress/chart/components/SlicesPaths.js +64 -0
- package/dist/commonjs/features/pmProgress/chart/components/SlicesPaths.js.map +1 -0
- package/dist/commonjs/features/pmProgress/chart/components/layers/SliceArcPattern.js +38 -0
- package/dist/commonjs/features/pmProgress/chart/components/layers/SliceArcPattern.js.map +1 -0
- package/dist/commonjs/features/pmProgress/chart/components/layers/SliceBackgroundColor.js +21 -0
- package/dist/commonjs/features/pmProgress/chart/components/layers/SliceBackgroundColor.js.map +1 -0
- package/dist/commonjs/features/pmProgress/chart/components/layers/SliceFillColor.js +49 -0
- package/dist/commonjs/features/pmProgress/chart/components/layers/SliceFillColor.js.map +1 -0
- package/dist/commonjs/features/pmProgress/chart/model/ArcPatternGenerator.js +49 -0
- package/dist/commonjs/features/pmProgress/chart/model/ArcPatternGenerator.js.map +1 -0
- package/dist/commonjs/features/pmProgress/chart/model/PieChartManager.js +25 -0
- package/dist/commonjs/features/pmProgress/chart/model/PieChartManager.js.map +1 -0
- package/dist/commonjs/features/pmProgress/chart/model/SliceHighlight.js +20 -0
- package/dist/commonjs/features/pmProgress/chart/model/SliceHighlight.js.map +1 -0
- package/dist/commonjs/features/pmProgress/chart/model/SliceShapeGenerator.js +67 -0
- package/dist/commonjs/features/pmProgress/chart/model/SliceShapeGenerator.js.map +1 -0
- package/dist/commonjs/features/pmProgress/header/PracticeProgressHeader.js +180 -0
- package/dist/commonjs/features/pmProgress/header/PracticeProgressHeader.js.map +1 -0
- package/dist/commonjs/features/pmProgress/index.js +13 -0
- package/dist/commonjs/features/pmProgress/index.js.map +1 -0
- package/dist/commonjs/features/pmProgress/list/ListCard.js +128 -0
- package/dist/commonjs/features/pmProgress/list/ListCard.js.map +1 -0
- package/dist/commonjs/features/pmProgress/list/ListItem.js +128 -0
- package/dist/commonjs/features/pmProgress/list/ListItem.js.map +1 -0
- package/dist/commonjs/features/pmProgress/recs/TeacherRecs.js +17 -0
- package/dist/commonjs/features/pmProgress/recs/TeacherRecs.js.map +1 -0
- package/dist/commonjs/features/pmProgress/stats/PracticeProgressStats.js +63 -0
- package/dist/commonjs/features/pmProgress/stats/PracticeProgressStats.js.map +1 -0
- package/dist/commonjs/features/pmProgress/stats/StatsCard.js +66 -0
- package/dist/commonjs/features/pmProgress/stats/StatsCard.js.map +1 -0
- package/dist/commonjs/features/pmProgress/temp.js +74 -0
- package/dist/commonjs/features/pmProgress/temp.js.map +1 -0
- package/dist/commonjs/index.js +14 -2
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/icons/PentagonIcon.js +32 -0
- package/dist/commonjs/shared/icons/PentagonIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/SketchArrowRight.js +33 -0
- package/dist/commonjs/shared/icons/SketchArrowRight.js.map +1 -0
- package/dist/commonjs/shared/icons/SliceDiamondIcon.js +32 -0
- package/dist/commonjs/shared/icons/SliceDiamondIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/StarIcon.js +32 -0
- package/dist/commonjs/shared/icons/StarIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/TimerIcon.js +35 -0
- package/dist/commonjs/shared/icons/TimerIcon.js.map +1 -0
- package/dist/module/features/pmProgress/PracticeProgress.js +258 -0
- package/dist/module/features/pmProgress/PracticeProgress.js.map +1 -0
- package/dist/module/features/pmProgress/chart/chart.helpers.js +16 -0
- package/dist/module/features/pmProgress/chart/chart.helpers.js.map +1 -0
- package/dist/module/features/pmProgress/chart/chart.types.js +2 -0
- package/dist/module/features/pmProgress/chart/chart.types.js.map +1 -0
- package/dist/module/features/pmProgress/chart/components/PracticeProgressPieChart.js +38 -0
- package/dist/module/features/pmProgress/chart/components/PracticeProgressPieChart.js.map +1 -0
- package/dist/module/features/pmProgress/chart/components/SlicesClipPaths.js +32 -0
- package/dist/module/features/pmProgress/chart/components/SlicesClipPaths.js.map +1 -0
- package/dist/module/features/pmProgress/chart/components/SlicesPaths.js +58 -0
- package/dist/module/features/pmProgress/chart/components/SlicesPaths.js.map +1 -0
- package/dist/module/features/pmProgress/chart/components/layers/SliceArcPattern.js +32 -0
- package/dist/module/features/pmProgress/chart/components/layers/SliceArcPattern.js.map +1 -0
- package/dist/module/features/pmProgress/chart/components/layers/SliceBackgroundColor.js +15 -0
- package/dist/module/features/pmProgress/chart/components/layers/SliceBackgroundColor.js.map +1 -0
- package/dist/module/features/pmProgress/chart/components/layers/SliceFillColor.js +43 -0
- package/dist/module/features/pmProgress/chart/components/layers/SliceFillColor.js.map +1 -0
- package/dist/module/features/pmProgress/chart/model/ArcPatternGenerator.js +44 -0
- package/dist/module/features/pmProgress/chart/model/ArcPatternGenerator.js.map +1 -0
- package/dist/module/features/pmProgress/chart/model/PieChartManager.js +20 -0
- package/dist/module/features/pmProgress/chart/model/PieChartManager.js.map +1 -0
- package/dist/module/features/pmProgress/chart/model/SliceHighlight.js +15 -0
- package/dist/module/features/pmProgress/chart/model/SliceHighlight.js.map +1 -0
- package/dist/module/features/pmProgress/chart/model/SliceShapeGenerator.js +62 -0
- package/dist/module/features/pmProgress/chart/model/SliceShapeGenerator.js.map +1 -0
- package/dist/module/features/pmProgress/header/PracticeProgressHeader.js +174 -0
- package/dist/module/features/pmProgress/header/PracticeProgressHeader.js.map +1 -0
- package/dist/module/features/pmProgress/index.js +4 -0
- package/dist/module/features/pmProgress/index.js.map +1 -0
- package/dist/module/features/pmProgress/list/ListCard.js +121 -0
- package/dist/module/features/pmProgress/list/ListCard.js.map +1 -0
- package/dist/module/features/pmProgress/list/ListItem.js +122 -0
- package/dist/module/features/pmProgress/list/ListItem.js.map +1 -0
- package/dist/module/features/pmProgress/recs/TeacherRecs.js +11 -0
- package/dist/module/features/pmProgress/recs/TeacherRecs.js.map +1 -0
- package/dist/module/features/pmProgress/stats/PracticeProgressStats.js +56 -0
- package/dist/module/features/pmProgress/stats/PracticeProgressStats.js.map +1 -0
- package/dist/module/features/pmProgress/stats/StatsCard.js +60 -0
- package/dist/module/features/pmProgress/stats/StatsCard.js.map +1 -0
- package/dist/module/features/pmProgress/temp.js +70 -0
- package/dist/module/features/pmProgress/temp.js.map +1 -0
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/icons/PentagonIcon.js +24 -0
- package/dist/module/shared/icons/PentagonIcon.js.map +1 -0
- package/dist/module/shared/icons/SketchArrowRight.js +25 -0
- package/dist/module/shared/icons/SketchArrowRight.js.map +1 -0
- package/dist/module/shared/icons/SliceDiamondIcon.js +24 -0
- package/dist/module/shared/icons/SliceDiamondIcon.js.map +1 -0
- package/dist/module/shared/icons/StarIcon.js +24 -0
- package/dist/module/shared/icons/StarIcon.js.map +1 -0
- package/dist/module/shared/icons/TimerIcon.js +27 -0
- package/dist/module/shared/icons/TimerIcon.js.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/PracticeProgress.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/PracticeProgress.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/chart.helpers.d.ts +5 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/chart.helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/chart.types.d.ts +35 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/chart.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/components/PracticeProgressPieChart.d.ts +9 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/components/PracticeProgressPieChart.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/components/SlicesClipPaths.d.ts +10 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/components/SlicesClipPaths.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/components/SlicesPaths.d.ts +11 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/components/SlicesPaths.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceArcPattern.d.ts +12 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceArcPattern.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceBackgroundColor.d.ts +8 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceBackgroundColor.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceFillColor.d.ts +13 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceFillColor.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/model/ArcPatternGenerator.d.ts +12 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/model/ArcPatternGenerator.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/model/PieChartManager.d.ts +16 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/model/PieChartManager.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/model/SliceHighlight.d.ts +10 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/model/SliceHighlight.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/model/SliceShapeGenerator.d.ts +15 -0
- package/dist/typescript/commonjs/features/pmProgress/chart/model/SliceShapeGenerator.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/header/PracticeProgressHeader.d.ts +12 -0
- package/dist/typescript/commonjs/features/pmProgress/header/PracticeProgressHeader.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/index.d.ts +2 -0
- package/dist/typescript/commonjs/features/pmProgress/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/list/ListCard.d.ts +15 -0
- package/dist/typescript/commonjs/features/pmProgress/list/ListCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/list/ListItem.d.ts +11 -0
- package/dist/typescript/commonjs/features/pmProgress/list/ListItem.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/recs/TeacherRecs.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/recs/TeacherRecs.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/stats/PracticeProgressStats.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/stats/PracticeProgressStats.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/stats/StatsCard.d.ts +10 -0
- package/dist/typescript/commonjs/features/pmProgress/stats/StatsCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/temp.d.ts +4 -0
- package/dist/typescript/commonjs/features/pmProgress/temp.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +1 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/PracticeProgress.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/PracticeProgress.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/chart/chart.helpers.d.ts +5 -0
- package/dist/typescript/module/features/pmProgress/chart/chart.helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/chart/chart.types.d.ts +35 -0
- package/dist/typescript/module/features/pmProgress/chart/chart.types.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/chart/components/PracticeProgressPieChart.d.ts +9 -0
- package/dist/typescript/module/features/pmProgress/chart/components/PracticeProgressPieChart.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/chart/components/SlicesClipPaths.d.ts +10 -0
- package/dist/typescript/module/features/pmProgress/chart/components/SlicesClipPaths.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/chart/components/SlicesPaths.d.ts +11 -0
- package/dist/typescript/module/features/pmProgress/chart/components/SlicesPaths.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceArcPattern.d.ts +12 -0
- package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceArcPattern.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceBackgroundColor.d.ts +8 -0
- package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceBackgroundColor.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceFillColor.d.ts +13 -0
- package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceFillColor.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/chart/model/ArcPatternGenerator.d.ts +12 -0
- package/dist/typescript/module/features/pmProgress/chart/model/ArcPatternGenerator.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/chart/model/PieChartManager.d.ts +16 -0
- package/dist/typescript/module/features/pmProgress/chart/model/PieChartManager.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/chart/model/SliceHighlight.d.ts +10 -0
- package/dist/typescript/module/features/pmProgress/chart/model/SliceHighlight.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/chart/model/SliceShapeGenerator.d.ts +15 -0
- package/dist/typescript/module/features/pmProgress/chart/model/SliceShapeGenerator.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/header/PracticeProgressHeader.d.ts +12 -0
- package/dist/typescript/module/features/pmProgress/header/PracticeProgressHeader.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/index.d.ts +2 -0
- package/dist/typescript/module/features/pmProgress/index.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/list/ListCard.d.ts +15 -0
- package/dist/typescript/module/features/pmProgress/list/ListCard.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/list/ListItem.d.ts +11 -0
- package/dist/typescript/module/features/pmProgress/list/ListItem.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/recs/TeacherRecs.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/recs/TeacherRecs.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/stats/PracticeProgressStats.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/stats/PracticeProgressStats.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/stats/StatsCard.d.ts +10 -0
- package/dist/typescript/module/features/pmProgress/stats/StatsCard.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/temp.d.ts +4 -0
- package/dist/typescript/module/features/pmProgress/temp.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +1 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/PentagonIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/PentagonIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts +4 -0
- package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/StarIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/StarIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/TimerIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/TimerIcon.d.ts.map +1 -0
- package/package.json +4 -2
- package/src/features/pmProgress/PracticeProgress.tsx +249 -0
- package/src/features/pmProgress/chart/chart.helpers.ts +15 -0
- package/src/features/pmProgress/chart/chart.types.ts +36 -0
- package/src/features/pmProgress/chart/components/PracticeProgressPieChart.tsx +32 -0
- package/src/features/pmProgress/chart/components/SlicesClipPaths.tsx +36 -0
- package/src/features/pmProgress/chart/components/SlicesPaths.tsx +67 -0
- package/src/features/pmProgress/chart/components/layers/SliceArcPattern.tsx +44 -0
- package/src/features/pmProgress/chart/components/layers/SliceBackgroundColor.tsx +11 -0
- package/src/features/pmProgress/chart/components/layers/SliceFillColor.tsx +55 -0
- package/src/features/pmProgress/chart/model/ArcPatternGenerator.ts +48 -0
- package/src/features/pmProgress/chart/model/PieChartManager.ts +20 -0
- package/src/features/pmProgress/chart/model/SliceHighlight.ts +17 -0
- package/src/features/pmProgress/chart/model/SliceShapeGenerator.ts +71 -0
- package/src/features/pmProgress/header/PracticeProgressHeader.tsx +178 -0
- package/src/features/pmProgress/index.ts +1 -0
- package/src/features/pmProgress/list/ListCard.tsx +133 -0
- package/src/features/pmProgress/list/ListItem.tsx +113 -0
- package/src/features/pmProgress/recs/TeacherRecs.tsx +10 -0
- package/src/features/pmProgress/stats/PracticeProgressStats.tsx +60 -0
- package/src/features/pmProgress/stats/StatsCard.tsx +58 -0
- package/src/features/pmProgress/temp.ts +67 -0
- package/src/index.ts +1 -0
- package/src/shared/icons/PentagonIcon.tsx +17 -0
- package/src/shared/icons/SketchArrowRight.tsx +18 -0
- package/src/shared/icons/SliceDiamondIcon.tsx +16 -0
- package/src/shared/icons/StarIcon.tsx +17 -0
- package/src/shared/icons/TimerIcon.tsx +21 -0
- package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/src/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TimerIcon = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNativeSvg = _interopRequireWildcard(require("react-native-svg"));
|
|
9
|
+
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const TimerIcon = ({
|
|
15
|
+
size = 25,
|
|
16
|
+
color = _reactNativeUi.COLORS.NEUTRAL_1
|
|
17
|
+
}) => {
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.default, {
|
|
19
|
+
width: size,
|
|
20
|
+
height: size,
|
|
21
|
+
viewBox: "0 0 21 23",
|
|
22
|
+
fill: "none",
|
|
23
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
|
|
24
|
+
d: "M10.781 8.984a1.078 1.078 0 10-2.156 0v3.235H6.828a1.078 1.078 0 100 2.156h2.875c.596 0 1.078-.483 1.078-1.078V8.984z",
|
|
25
|
+
fill: color
|
|
26
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
|
|
27
|
+
fillRule: "evenodd",
|
|
28
|
+
clipRule: "evenodd",
|
|
29
|
+
d: "M7.547 0a1.078 1.078 0 100 2.156h1.078v1.497C3.773 4.189 0 8.303 0 13.297 0 18.656 4.344 23 9.703 23c5.359 0 9.703-4.344 9.703-9.703 0-2.28-.787-4.377-2.103-6.033l1.034-1.058.666.666a1.078 1.078 0 101.525-1.525l-2.875-2.875a1.078 1.078 0 10-1.525 1.525l.684.684-1.029 1.054a9.663 9.663 0 00-5.002-2.082V2.156h1.078a1.078 1.078 0 000-2.156H7.547zm-5.39 13.297a7.547 7.547 0 1115.093 0 7.547 7.547 0 01-15.094 0z",
|
|
30
|
+
fill: color
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
exports.TimerIcon = TimerIcon;
|
|
35
|
+
//# sourceMappingURL=TimerIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeSvg","_interopRequireWildcard","_reactNativeUi","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TimerIcon","size","color","COLORS","NE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YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAAA,SAAAf,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAI,UAAA,GAAAJ,CAAA,KAAAK,OAAA,EAAAL,CAAA;AAE5C,MAAMmB,SAAS,GAAGA,CAAC;EAAEC,IAAI,GAAG,EAAE;EAAEC,KAAK,GAAGC,qBAAM,CAACC;AAAqB,CAAC,KAAK;EAC/E,oBACE,IAAAzB,WAAA,CAAA0B,IAAA,EAAC7B,eAAA,CAAAU,OAAG;IAACoB,KAAK,EAAEL,IAAK;IAACM,MAAM,EAAEN,IAAK;IAACO,OAAO,EAAC,WAAW;IAACC,IAAI,EAAC,MAAM;IAAAC,QAAA,gBAC7D,IAAA/B,WAAA,CAAAgC,GAAA,EAACnC,eAAA,CAAAoC,IAAI;MACHC,CAAC,EAAC,uHAAuH;MACzHJ,IAAI,EAAEP;IAAM,CACb,CAAC,eACF,IAAAvB,WAAA,CAAAgC,GAAA,EAACnC,eAAA,CAAAoC,IAAI;MACHE,QAAQ,EAAC,SAAS;MAClBC,QAAQ,EAAC,SAAS;MAClBF,CAAC,EAAC,4ZAA4Z;MAC9ZJ,IAAI,EAAEP;IAAM,CACb,CAAC;EAAA,CACC,CAAC;AAEV,CAAC;AAAAc,OAAA,CAAAhB,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View, StyleSheet, Text } from 'react-native';
|
|
5
|
+
import { BORDER_RADIUS, COLORS, SPACING, ScrollableList, Button, ButtonSize, ButtonVariant } from '@magmamath/react-native-ui';
|
|
6
|
+
import { PracticeProgressPieChart } from "./chart/components/PracticeProgressPieChart.js";
|
|
7
|
+
import { DEFAULT_CONFIG, SAMPLE_DATA } from "./temp.js";
|
|
8
|
+
import { PracticeProgressHeader } from "./header/PracticeProgressHeader.js";
|
|
9
|
+
import { PracticeProgressStats } from "./stats/PracticeProgressStats.js";
|
|
10
|
+
import { ListCard } from "./list/ListCard.js";
|
|
11
|
+
import { SliceDiamondIcon } from "../../shared/icons/SliceDiamondIcon.js";
|
|
12
|
+
import { PentagonIcon } from "../../shared/icons/PentagonIcon.js";
|
|
13
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
const SAMPLE_ITEMS = [{
|
|
15
|
+
title: 'Solve real-world problems',
|
|
16
|
+
subtitle: '4.NS.3B',
|
|
17
|
+
skillsLeft: 3
|
|
18
|
+
}, {
|
|
19
|
+
title: 'Divide fractions',
|
|
20
|
+
subtitle: '4.NS.3A',
|
|
21
|
+
skillsLeft: 0,
|
|
22
|
+
isFinished: true
|
|
23
|
+
}, {
|
|
24
|
+
title: 'Add and subtract fractions',
|
|
25
|
+
subtitle: '4.NS.2A',
|
|
26
|
+
skillsLeft: 5
|
|
27
|
+
}, {
|
|
28
|
+
title: 'Multiply whole numbers',
|
|
29
|
+
subtitle: '4.NS.1C',
|
|
30
|
+
skillsLeft: 0,
|
|
31
|
+
isFinished: true
|
|
32
|
+
}];
|
|
33
|
+
const LIST_DATA = [...Array.from({
|
|
34
|
+
length: 11
|
|
35
|
+
}, (_, i) => ({
|
|
36
|
+
id: `algebra-${i}`,
|
|
37
|
+
title: 'Algebra and Functions',
|
|
38
|
+
color: COLORS.PRIMARY_INDIGO,
|
|
39
|
+
icon: /*#__PURE__*/_jsx(SliceDiamondIcon, {
|
|
40
|
+
color: COLORS.PRIMARY_INDIGO
|
|
41
|
+
}),
|
|
42
|
+
items: SAMPLE_ITEMS,
|
|
43
|
+
progress: Math.round(10 + i * 8)
|
|
44
|
+
})), {
|
|
45
|
+
id: 'data-analysis',
|
|
46
|
+
title: 'Data Analysis and Probability',
|
|
47
|
+
color: COLORS.PRIMARY_BLUE,
|
|
48
|
+
icon: /*#__PURE__*/_jsx(SliceDiamondIcon, {
|
|
49
|
+
color: COLORS.PRIMARY_BLUE
|
|
50
|
+
}),
|
|
51
|
+
items: SAMPLE_ITEMS,
|
|
52
|
+
progress: 63
|
|
53
|
+
}, {
|
|
54
|
+
id: 'ratios',
|
|
55
|
+
title: 'Ratios and Proportionality',
|
|
56
|
+
color: COLORS.PRIMARY_RED,
|
|
57
|
+
icon: /*#__PURE__*/_jsx(SliceDiamondIcon, {
|
|
58
|
+
color: COLORS.PRIMARY_RED
|
|
59
|
+
}),
|
|
60
|
+
items: SAMPLE_ITEMS,
|
|
61
|
+
progress: 27
|
|
62
|
+
}];
|
|
63
|
+
const FLUENCY_DATA = {
|
|
64
|
+
id: 'fluency',
|
|
65
|
+
title: 'Fluency',
|
|
66
|
+
color: COLORS.PRIMARY_ORANGE,
|
|
67
|
+
icon: /*#__PURE__*/_jsx(SliceDiamondIcon, {
|
|
68
|
+
color: COLORS.PRIMARY_ORANGE
|
|
69
|
+
}),
|
|
70
|
+
items: SAMPLE_ITEMS,
|
|
71
|
+
progress: 85
|
|
72
|
+
};
|
|
73
|
+
const SCROLLBAR_WIDTH = 8;
|
|
74
|
+
const BADGE_SIZE = 20;
|
|
75
|
+
const BADGE_OFFSET = -8;
|
|
76
|
+
const BADGE_FONT_SIZE = 12;
|
|
77
|
+
const CHART_SIZE = 432;
|
|
78
|
+
const STATS_MAX_HEIGHT = 136;
|
|
79
|
+
const ListFooter = () => /*#__PURE__*/_jsxs(_Fragment, {
|
|
80
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
81
|
+
style: styles.separator
|
|
82
|
+
}), /*#__PURE__*/_jsx(ListCard, {
|
|
83
|
+
icon: FLUENCY_DATA.icon,
|
|
84
|
+
title: FLUENCY_DATA.title,
|
|
85
|
+
color: FLUENCY_DATA.color,
|
|
86
|
+
items: FLUENCY_DATA.items,
|
|
87
|
+
progress: FLUENCY_DATA.progress,
|
|
88
|
+
isFirst: true,
|
|
89
|
+
isLast: true
|
|
90
|
+
})]
|
|
91
|
+
});
|
|
92
|
+
export const PracticeProgress = () => /*#__PURE__*/_jsxs(View, {
|
|
93
|
+
style: styles.container,
|
|
94
|
+
children: [/*#__PURE__*/_jsx(PracticeProgressHeader, {
|
|
95
|
+
title: "Practice & Progress",
|
|
96
|
+
buttonLabel: "START",
|
|
97
|
+
grade: "Grade 4",
|
|
98
|
+
nextUp: "Next up!",
|
|
99
|
+
topic: "Algebra and functions",
|
|
100
|
+
topicColor: COLORS.PRIMARY_RED
|
|
101
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
102
|
+
style: styles.content,
|
|
103
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
104
|
+
style: styles.column,
|
|
105
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
106
|
+
style: styles.recommendations,
|
|
107
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
108
|
+
style: styles.badgeWrapper,
|
|
109
|
+
children: [/*#__PURE__*/_jsx(ListCard, {
|
|
110
|
+
icon: /*#__PURE__*/_jsx(PentagonIcon, {
|
|
111
|
+
color: COLORS.PRIMARY_YELLOW
|
|
112
|
+
}),
|
|
113
|
+
title: "Teacher Recommendations",
|
|
114
|
+
color: COLORS.PRIMARY_YELLOW,
|
|
115
|
+
items: SAMPLE_ITEMS,
|
|
116
|
+
progress: 42,
|
|
117
|
+
isFirst: true,
|
|
118
|
+
isLast: true,
|
|
119
|
+
rightContent: /*#__PURE__*/_jsx(Button, {
|
|
120
|
+
size: ButtonSize.SMALL,
|
|
121
|
+
variant: ButtonVariant.SECONDARY,
|
|
122
|
+
children: "PRACTICE"
|
|
123
|
+
})
|
|
124
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
125
|
+
style: styles.badge,
|
|
126
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
127
|
+
style: styles.badgeText,
|
|
128
|
+
children: "7"
|
|
129
|
+
})
|
|
130
|
+
})]
|
|
131
|
+
})
|
|
132
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
133
|
+
style: styles.cards,
|
|
134
|
+
children: /*#__PURE__*/_jsx(ScrollableList, {
|
|
135
|
+
style: styles.scroll,
|
|
136
|
+
scrollbarWidth: SCROLLBAR_WIDTH,
|
|
137
|
+
hideShadow: true,
|
|
138
|
+
data: LIST_DATA,
|
|
139
|
+
renderItem: ({
|
|
140
|
+
item,
|
|
141
|
+
index
|
|
142
|
+
}) => /*#__PURE__*/_jsx(ListCard, {
|
|
143
|
+
icon: item.icon,
|
|
144
|
+
title: item.title,
|
|
145
|
+
color: item.color,
|
|
146
|
+
items: item.items,
|
|
147
|
+
progress: item.progress,
|
|
148
|
+
isFirst: index === 0,
|
|
149
|
+
isLast: index === LIST_DATA.length - 1
|
|
150
|
+
}),
|
|
151
|
+
keyExtractor: item => item.id,
|
|
152
|
+
contentContainerStyle: styles.list,
|
|
153
|
+
ListFooterComponent: ListFooter
|
|
154
|
+
})
|
|
155
|
+
})]
|
|
156
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
157
|
+
style: styles.metrics,
|
|
158
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
159
|
+
style: styles.chart,
|
|
160
|
+
children: /*#__PURE__*/_jsx(PracticeProgressPieChart, {
|
|
161
|
+
data: SAMPLE_DATA,
|
|
162
|
+
config: DEFAULT_CONFIG
|
|
163
|
+
})
|
|
164
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
165
|
+
style: styles.stats,
|
|
166
|
+
children: /*#__PURE__*/_jsx(PracticeProgressStats, {})
|
|
167
|
+
})]
|
|
168
|
+
})]
|
|
169
|
+
})]
|
|
170
|
+
});
|
|
171
|
+
const styles = StyleSheet.create({
|
|
172
|
+
container: {
|
|
173
|
+
flex: 1
|
|
174
|
+
},
|
|
175
|
+
content: {
|
|
176
|
+
flex: 1,
|
|
177
|
+
flexDirection: 'row'
|
|
178
|
+
},
|
|
179
|
+
column: {
|
|
180
|
+
flex: 1,
|
|
181
|
+
gap: SPACING[200],
|
|
182
|
+
marginRight: SPACING[400] + SPACING[50]
|
|
183
|
+
},
|
|
184
|
+
recommendations: {
|
|
185
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
186
|
+
padding: SPACING[200],
|
|
187
|
+
borderRadius: BORDER_RADIUS[400],
|
|
188
|
+
overflow: 'visible'
|
|
189
|
+
},
|
|
190
|
+
badgeWrapper: {
|
|
191
|
+
position: 'relative'
|
|
192
|
+
},
|
|
193
|
+
badge: {
|
|
194
|
+
position: 'absolute',
|
|
195
|
+
top: BADGE_OFFSET,
|
|
196
|
+
right: BADGE_OFFSET,
|
|
197
|
+
width: BADGE_SIZE,
|
|
198
|
+
height: BADGE_SIZE,
|
|
199
|
+
backgroundColor: COLORS.PRIMARY_RED,
|
|
200
|
+
alignItems: 'center',
|
|
201
|
+
justifyContent: 'center',
|
|
202
|
+
borderRadius: BADGE_SIZE / 2
|
|
203
|
+
},
|
|
204
|
+
badgeText: {
|
|
205
|
+
fontSize: BADGE_FONT_SIZE,
|
|
206
|
+
fontWeight: '600',
|
|
207
|
+
color: COLORS.NEUTRAL_1,
|
|
208
|
+
textAlign: 'center'
|
|
209
|
+
},
|
|
210
|
+
cards: {
|
|
211
|
+
flex: 1,
|
|
212
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
213
|
+
padding: SPACING[200],
|
|
214
|
+
borderRadius: BORDER_RADIUS[400],
|
|
215
|
+
overflow: 'visible'
|
|
216
|
+
},
|
|
217
|
+
scroll: {
|
|
218
|
+
flex: 1
|
|
219
|
+
},
|
|
220
|
+
list: {
|
|
221
|
+
marginRight: SPACING[400]
|
|
222
|
+
},
|
|
223
|
+
separator: {
|
|
224
|
+
height: 1,
|
|
225
|
+
backgroundColor: COLORS.NEUTRAL_4,
|
|
226
|
+
marginHorizontal: SPACING[100],
|
|
227
|
+
marginVertical: SPACING[200]
|
|
228
|
+
},
|
|
229
|
+
metrics: {
|
|
230
|
+
height: '100%'
|
|
231
|
+
},
|
|
232
|
+
chart: {
|
|
233
|
+
alignItems: 'center',
|
|
234
|
+
justifyContent: 'center',
|
|
235
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
236
|
+
borderRadius: BORDER_RADIUS[250],
|
|
237
|
+
width: CHART_SIZE,
|
|
238
|
+
height: CHART_SIZE,
|
|
239
|
+
marginBottom: SPACING[400],
|
|
240
|
+
marginTop: SPACING[400]
|
|
241
|
+
},
|
|
242
|
+
stats: {
|
|
243
|
+
maxHeight: STATS_MAX_HEIGHT,
|
|
244
|
+
height: '100%',
|
|
245
|
+
padding: SPACING[200],
|
|
246
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
247
|
+
borderRadius: BORDER_RADIUS[300],
|
|
248
|
+
shadowColor: COLORS.NEUTRAL_9,
|
|
249
|
+
shadowOffset: {
|
|
250
|
+
width: 0,
|
|
251
|
+
height: 1
|
|
252
|
+
},
|
|
253
|
+
shadowOpacity: 0.1,
|
|
254
|
+
shadowRadius: 3,
|
|
255
|
+
elevation: 2
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
//# sourceMappingURL=PracticeProgress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","Text","BORDER_RADIUS","COLORS","SPACING","ScrollableList","Button","ButtonSize","ButtonVariant","PracticeProgressPieChart","DEFAULT_CONFIG","SAMPLE_DATA","PracticeProgressHeader","PracticeProgressStats","ListCard","SliceDiamondIcon","PentagonIcon","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","SAMPLE_ITEMS","title","subtitle","skillsLeft","isFinished","LIST_DATA","Array","from","length","_","i","id","color","PRIMARY_INDIGO","icon","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","children","style","styles","separator","isFirst","isLast","PracticeProgress","container","buttonLabel","grade","nextUp","topic","topicColor","content","column","recommendations","badgeWrapper","PRIMARY_YELLOW","rightContent","size","SMALL","variant","SECONDARY","badge","badgeText","cards","scroll","scrollbarWidth","hideShadow","data","renderItem","item","index","keyExtractor","contentContainerStyle","list","ListFooterComponent","metrics","chart","config","stats","create","flex","flexDirection","gap","marginRight","backgroundColor","NEUTRAL_1","padding","borderRadius","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,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,EAAEC,IAAI,QAA4B,cAAc;AACzE,SACEC,aAAa,EACbC,MAAM,EACNC,OAAO,EACPC,cAAc,EACdC,MAAM,EACNC,UAAU,EACVC,aAAa,QACR,4BAA4B;AACnC,SAASC,wBAAwB,QAAQ,gDAA6C;AACtF,SAASC,cAAc,EAAEC,WAAW,QAAQ,WAAQ;AACpD,SAASC,sBAAsB,QAAQ,oCAAiC;AACxE,SAASC,qBAAqB,QAAQ,kCAA+B;AACrE,SAASC,QAAQ,QAAQ,oBAAiB;AAE1C,SAASC,gBAAgB,QAAQ,wCAAqC;AACtE,SAASC,YAAY,QAAQ,oCAAiC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAW9D,MAAMC,YAA4B,GAAG,CACnC;EAAEC,KAAK,EAAE,2BAA2B;EAAEC,QAAQ,EAAE,SAAS;EAAEC,UAAU,EAAE;AAAE,CAAC,EAC1E;EAAEF,KAAK,EAAE,kBAAkB;EAAEC,QAAQ,EAAE,SAAS;EAAEC,UAAU,EAAE,CAAC;EAAEC,UAAU,EAAE;AAAK,CAAC,EACnF;EAA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gB,EAAE/G,OAAO,CAAC,GAAG,CAAC;IAC9BgH,cAAc,EAAEhH,OAAO,CAAC,GAAG;EAC7B,CAAC;EACDsF,OAAO,EAAE;IACPkB,MAAM,EAAE;EACV,CAAC;EACDjB,KAAK,EAAE;IACLkB,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBX,eAAe,EAAEhG,MAAM,CAACiG,SAAS;IACjCE,YAAY,EAAEpG,aAAa,CAAC,GAAG,CAAC;IAChCyG,KAAK,EAAEzD,UAAU;IACjB0D,MAAM,EAAE1D,UAAU;IAClBmE,YAAY,EAAEjH,OAAO,CAAC,GAAG,CAAC;IAC1BkH,SAAS,EAAElH,OAAO,CAAC,GAAG;EACxB,CAAC;EACDyF,KAAK,EAAE;IACL0B,SAAS,EAAEpE,gBAAgB;IAC3ByD,MAAM,EAAE,MAAM;IACdP,OAAO,EAAEjG,OAAO,CAAC,GAAG,CAAC;IACrB+F,eAAe,EAAEhG,MAAM,CAACiG,SAAS;IACjCE,YAAY,EAAEpG,aAAa,CAAC,GAAG,CAAC;IAChCsH,WAAW,EAAErH,MAAM,CAACsH,SAAS;IAC7BC,YAAY,EAAE;MAAEf,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCe,aAAa,EAAE,GAAG;IAClBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const getSliceClipId = index => `slice-clip-${index}`;
|
|
4
|
+
export const getFillClipId = index => `fill-clip-${index}`;
|
|
5
|
+
export const dynamicInnerRadius = sliceCount => {
|
|
6
|
+
if (sliceCount > 5) return 16;
|
|
7
|
+
if (sliceCount > 3) return 20;
|
|
8
|
+
return 30;
|
|
9
|
+
};
|
|
10
|
+
export const dynamicCornerRadius = fillPercent => {
|
|
11
|
+
return 8;
|
|
12
|
+
if (fillPercent >= 75) return 8;
|
|
13
|
+
if (fillPercent >= 40) return 5;
|
|
14
|
+
return 2;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chart.helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getSliceClipId","index","getFillClipId","dynamicInnerRadius","sliceCount","dynamicCornerRadius","fillPercent"],"sourceRoot":"../../../../../src","sources":["features/pmProgress/chart/chart.helpers.ts"],"mappings":";;AAAA,OAAO,MAAMA,cAAc,GAAIC,KAAsB,IAAK,cAAcA,KAAK,EAAE;AAC/E,OAAO,MAAMC,aAAa,GAAID,KAAsB,IAAK,aAAaA,KAAK,EAAE;AAE7E,OAAO,MAAME,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;AAED,OAAO,MAAMC,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","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["features/pmProgress/chart/chart.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { memo, useMemo, useState } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import Svg, { G } from 'react-native-svg';
|
|
6
|
+
import { PieChartManager } from "../model/PieChartManager.js";
|
|
7
|
+
import { SlicesClipPaths } from "./SlicesClipPaths.js";
|
|
8
|
+
import { SlicesPaths } from "./SlicesPaths.js";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
export const PracticeProgressPieChart = /*#__PURE__*/memo(({
|
|
11
|
+
data,
|
|
12
|
+
config
|
|
13
|
+
}) => {
|
|
14
|
+
const [pieChartManager] = useState(() => new PieChartManager(config));
|
|
15
|
+
const center = pieChartManager.getCenter();
|
|
16
|
+
const slices = useMemo(() => {
|
|
17
|
+
return pieChartManager.shape.generateSlices(data);
|
|
18
|
+
}, [data]);
|
|
19
|
+
return /*#__PURE__*/_jsx(View, {
|
|
20
|
+
children: /*#__PURE__*/_jsx(Svg, {
|
|
21
|
+
width: config.size,
|
|
22
|
+
height: config.size,
|
|
23
|
+
children: /*#__PURE__*/_jsxs(G, {
|
|
24
|
+
x: center.x,
|
|
25
|
+
y: center.y,
|
|
26
|
+
children: [/*#__PURE__*/_jsx(SlicesClipPaths, {
|
|
27
|
+
slices: slices,
|
|
28
|
+
pieChartManager: pieChartManager
|
|
29
|
+
}), /*#__PURE__*/_jsx(SlicesPaths, {
|
|
30
|
+
slices: slices,
|
|
31
|
+
pieChartManager: pieChartManager,
|
|
32
|
+
config: config
|
|
33
|
+
})]
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=PracticeProgressPieChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","memo","useMemo","useState","View","Svg","G","PieChartManager","SlicesClipPaths","SlicesPaths","jsx","_jsx","jsxs","_jsxs","PracticeProgressPieChart","data","config","pieChartManager","center","getCenter","slices","shape","generateSlices","children","width","size","height","x","y"],"sourceRoot":"../../../../../../src","sources":["features/pmProgress/chart/components/PracticeProgressPieChart.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACtD,SAAqBC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,GAAG,IAAIC,CAAC,QAAQ,kBAAkB;AACzC,SA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
import { getSliceClipId, getFillClipId } from "../chart.helpers.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export const SlicesClipPaths = ({
|
|
8
|
+
slices,
|
|
9
|
+
pieChartManager
|
|
10
|
+
}) => {
|
|
11
|
+
return /*#__PURE__*/_jsx(Defs, {
|
|
12
|
+
children: slices.map(slice => {
|
|
13
|
+
const isPartiallyFilled = slice.fillPercent > 0 && slice.fillPercent < 100;
|
|
14
|
+
const shapeId = getSliceClipId(slice.index);
|
|
15
|
+
const fillId = getFillClipId(slice.index);
|
|
16
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
17
|
+
children: [/*#__PURE__*/_jsx(ClipPath, {
|
|
18
|
+
id: shapeId,
|
|
19
|
+
children: /*#__PURE__*/_jsx(Path, {
|
|
20
|
+
d: pieChartManager.shape.generateSlicePath(slice)
|
|
21
|
+
})
|
|
22
|
+
}), isPartiallyFilled && /*#__PURE__*/_jsx(ClipPath, {
|
|
23
|
+
id: fillId,
|
|
24
|
+
children: /*#__PURE__*/_jsx(Path, {
|
|
25
|
+
d: pieChartManager.shape.generateFillPath(slice)
|
|
26
|
+
})
|
|
27
|
+
})]
|
|
28
|
+
}, slice.index);
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=SlicesClipPaths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","ClipPath","Defs","Path","getSliceClipId","getFillClipId","jsx","_jsx","jsxs","_jsxs","SlicesClipPaths","slices","pieChartManager","children","map","slice","isPartiallyFilled","fillPercent","shapeId","index","fillId","Fragment","id","d","shape","generateSlicePath","generateFillPath"],"sourceRoot":"../../../../../../src","sources":["features/pmProgress/chart/components/SlicesClipPaths.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,IAAI,EAAEC,IAAI,QAAQ,kBAAkB;AACvD,SAASC,cAAc,EAAEC,aAAa,QAAQ,qBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAShE,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAAEC,MAAM;EAAEC;AAAsC,CAAC,KAAK;EACpF,oBACEL,IAAA,CAACL,IAAI;IAAAW,QAAA,EACFF,MAAM,CAACG,GAAG,CAAEC,KAAK,IAAK;MACrB,MAAMC,iBAAiB,GAAGD,KAAK,CAACE,WAAW,GAAG,CAAC,IAAIF,KAAK,CAACE,WAAW,GAAG,GAAG;MAC1E,MAAMC,OAAO,GAAGd,cAAc,CAACW,KAAK,CAACI,KAAK,CAAC;MAC3C,MAAMC,MAAM,GAAGf,aAAa,CAACU,KAAK,CAACI,KAAK,CAAC;MAEzC,oBACEV,KAAA,CAACT,KAAK,CAACqB,QAAQ;QAAAR,QAAA,gBACbN,IAAA,CAACN,QAAQ;UAACqB,EAAE,EAAEJ,OAAQ;UAAAL,QAAA,eACpBN,IAAA,CAACJ,IAAI;YAACoB,CAAC,EAAEX,eAAe,CAACY,KAAK,CAACC,iBAAiB,CAACV,KAAK;UAAE,CAAE;QAAC,CACnD,CAAC,EAEVC,iBAAiB,iBAChBT,IAAA,CAACN,QAAQ;UAACqB,EAAE,EAAEF,MAAO;UAAAP,QAAA,eACnBN,IAAA,CAACJ,IAAI;YAACoB,CAAC,EAAEX,eAAe,CAACY,KAAK,CAACE,gBAAgB,CAACX,KAAK;UAAE,CAAE;QAAC,CAClD,CACX;MAAA,GATkBA,KAAK,CAACI,KAUX,CAAC;IAErB,CAAC;EAAC,CACE,CAAC;AAEX,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Platform, StyleSheet } from 'react-native';
|
|
5
|
+
import { G } from 'react-native-svg';
|
|
6
|
+
import { useUnit } from 'effector-react';
|
|
7
|
+
import { SliceBackgroundColor } from "./layers/SliceBackgroundColor.js";
|
|
8
|
+
import { SliceFillColor } from "./layers/SliceFillColor.js";
|
|
9
|
+
import { SliceArcPattern } from "./layers/SliceArcPattern.js";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
+
export const SlicesPaths = ({
|
|
12
|
+
slices,
|
|
13
|
+
pieChartManager,
|
|
14
|
+
config
|
|
15
|
+
}) => {
|
|
16
|
+
const highlightedIndex = useUnit(pieChartManager.highlight.$highlightedIndex);
|
|
17
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
18
|
+
children: slices.map(slice => {
|
|
19
|
+
const id = `${slice.index}`;
|
|
20
|
+
const shapeSvg = pieChartManager.shape.generateSlicePath(slice);
|
|
21
|
+
const fillSvg = pieChartManager.shape.generateFillPath(slice);
|
|
22
|
+
const isHighlighted = highlightedIndex === slice.index;
|
|
23
|
+
const translateY = pieChartManager.highlight.getTranslateY(isHighlighted);
|
|
24
|
+
return /*#__PURE__*/_jsxs(G, {
|
|
25
|
+
style: styles.container,
|
|
26
|
+
translateY: translateY,
|
|
27
|
+
onPressIn: () => pieChartManager.highlight.highlightSlice(slice.index),
|
|
28
|
+
onPressOut: () => pieChartManager.highlight.resetHighlight(),
|
|
29
|
+
children: [/*#__PURE__*/_jsx(SliceBackgroundColor, {
|
|
30
|
+
path: shapeSvg,
|
|
31
|
+
color: slice.backgroundColor
|
|
32
|
+
}), /*#__PURE__*/_jsx(SliceFillColor, {
|
|
33
|
+
clipPathId: id,
|
|
34
|
+
shapeSvg: shapeSvg,
|
|
35
|
+
fillSvg: fillSvg,
|
|
36
|
+
color: slice.fillColor,
|
|
37
|
+
percent: slice.fillPercent,
|
|
38
|
+
borderColor: isHighlighted ? slice.borderColor : undefined,
|
|
39
|
+
borderWidth: isHighlighted ? config.borderWidth : undefined
|
|
40
|
+
}), /*#__PURE__*/_jsx(SliceArcPattern, {
|
|
41
|
+
clipPathId: id,
|
|
42
|
+
slice: slice,
|
|
43
|
+
config: config,
|
|
44
|
+
pieChartManager: pieChartManager
|
|
45
|
+
})]
|
|
46
|
+
}, id);
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
const styles = StyleSheet.create({
|
|
51
|
+
container: {
|
|
52
|
+
cursor: 'pointer',
|
|
53
|
+
...(Platform.OS === 'web' ? {
|
|
54
|
+
transition: 'transform 0.1s ease-in-out'
|
|
55
|
+
} : {})
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=SlicesPaths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Platform","StyleSheet","G","useUnit","SliceBackgroundColor","SliceFillColor","SliceArcPattern","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SlicesPaths","slices","pieChartManager","config","highlightedIndex","highlight","$highlightedIndex","children","map","slice","id","index","shapeSvg","shape","generateSlicePath","fillSvg","generateFillPath","isHighlighted","translateY","getTranslateY","style","styles","container","onPressIn","highlightSlice","onPressOut","resetHighlight","path","color","backgroundColor","clipPathId","fillColor","percent","fillPercent","borderColor","undefined","borderWidth","create","cursor","OS","transition"],"sourceRoot":"../../../../../../src","sources":["features/pmProgress/chart/components/SlicesPaths.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AACnD,SAASC,CAAC,QAAQ,kBAAkB;AACpC,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,oBAAoB,QAAQ,kCAA+B;AACpE,SAASC,cAAc,QAAQ,4BAAyB;AACxD,SAASC,eAAe,QAAQ,6BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAU1D,OAAO,MAAMC,WAAW,GAAGA,CAAC;EAAEC,MAAM;EAAEC,eAAe;EAAEC;AAAyB,CAAC,K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CAACiC,WAAW,GAAGD;QAAU,CAC7D,CAAC,eAEFxC,IAAA,CAACF,eAAe;UACdqC,UAAU,EAAEpB,EAAG;UACfD,KAAK,EAAEA,KAAM;UACbN,MAAM,EAAEA,MAAO;UACfD,eAAe,EAAEA;QAAgB,CAClC,CAAC;MAAA,GAvBGQ,EAwBJ,CAAC;IAER,CAAC;EAAC,CACF,CAAC;AAEP,CAAC;AAED,MAAMW,MAAM,GAAGjC,UAAU,CAACiD,MAAM,CAAC;EAC/Bf,SAAS,EAAE;IACTgB,MAAM,EAAE,SAAS;IACjB,IAAInD,QAAQ,CAACoD,EAAE,KAAK,KAAK,GAAG;MAAEC,UAAU,EAAE;IAA6B,CAAC,GAAG,CAAC,CAAC;EAC/E;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { G, Path } from 'react-native-svg';
|
|
5
|
+
import { getSliceClipId } from "../../chart.helpers.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const SliceArcPattern = ({
|
|
8
|
+
clipPathId,
|
|
9
|
+
slice,
|
|
10
|
+
pieChartManager,
|
|
11
|
+
config
|
|
12
|
+
}) => {
|
|
13
|
+
const patternSizes = pieChartManager.pattern.getPatternTrackSizes();
|
|
14
|
+
return /*#__PURE__*/_jsx(G, {
|
|
15
|
+
clipPath: `url(#${getSliceClipId(clipPathId)})`,
|
|
16
|
+
children: patternSizes.map((radius, rowIndex) => {
|
|
17
|
+
const arcPath = pieChartManager.pattern.generateArcPath(slice, radius);
|
|
18
|
+
const dashWidth = pieChartManager.pattern.getDashWidthForRadius(radius);
|
|
19
|
+
const dashOffset = pieChartManager.pattern.getDashOffset(rowIndex, radius);
|
|
20
|
+
return /*#__PURE__*/_jsx(Path, {
|
|
21
|
+
d: arcPath,
|
|
22
|
+
fill: "none",
|
|
23
|
+
stroke: config.outerArc.color,
|
|
24
|
+
strokeWidth: config.outerArc.strokeWidth,
|
|
25
|
+
strokeDasharray: [dashWidth, dashWidth],
|
|
26
|
+
strokeDashoffset: dashOffset,
|
|
27
|
+
strokeLinecap: "butt"
|
|
28
|
+
}, rowIndex);
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=SliceArcPattern.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","G","Path","getSliceClipId","jsx","_jsx","SliceArcPattern","clipPathId","slice","pieChartManager","config","patternSizes","pattern","getPatternTrackSizes","clipPath","children","map","radius","rowIndex","arcPath","generateArcPath","dashWidth","getDashWidthForRadius","dashOffset","getDashOffset","d","fill","stroke","outerArc","color","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap"],"sourceRoot":"../../../../../../../src","sources":["features/pmProgress/chart/components/layers/SliceArcPattern.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,CAAC,EAAEC,IAAI,QAAQ,kBAAkB;AAC1C,SAASC,cAAc,QAAQ,wBAAqB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAWpD,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,UAAU;EACVC,KAAK;EACLC,eAAe;EACfC;AACoB,CAAC,KAAK;EAC1B,MAAMC,YAAY,GAAGF,eAAe,CAACG,OAAO,CAACC,oBAAoB,CAAC,CAAC;EAEnE,oBACER,IAAA,CAACJ,CAAC;IAACa,QAAQ,EAAE,QAAQX,cAAc,CAACI,UAAU,CAAC,GAAI;IAAAQ,QAAA,EAChDJ,YAAY,CAACK,GAAG,CAAC,CAACC,MAAM,EAAEC,QAAQ,KAAK;MACtC,MAAMC,OAAO,GAAGV,eAAe,CAACG,OAAO,CAACQ,eAAe,CAACZ,KAAK,EAAES,MAAM,CAAC;MACtE,MAAMI,SAAS,GAAGZ,eAAe,CAACG,OAAO,CAACU,qBAAqB,CAACL,MAAM,CAAC;MACvE,MAAMM,UAAU,GAAGd,eAAe,CAACG,OAAO,CAACY,aAAa,CAACN,QAAQ,EAAED,MAAM,CAAC;MAE1E,oBACEZ,IAAA,CAACH,IAAI;QAEHuB,CAAC,EAAEN,OAAQ;QACXO,IAAI,EAAC,MAAM;QACXC,MAAM,EAAEjB,MAAM,CAACkB,QAAQ,CAACC,KAAM;QAC9BC,WAAW,EAAEpB,MAAM,CAACkB,QAAQ,CAACE,WAAY;QACzCC,eAAe,EAAE,CAACV,SAAS,EAAEA,SAAS,CAAE;QACxCW,gBAAgB,EAAET,UAAW;QAC7BU,aAAa,EAAC;MAAM,GAPff,QAQN,CAAC;IAEN,CAAC;EAAC,CACD,CAAC;AAER,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Path } from 'react-native-svg';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export const SliceBackgroundColor = ({
|
|
7
|
+
path,
|
|
8
|
+
color
|
|
9
|
+
}) => {
|
|
10
|
+
return /*#__PURE__*/_jsx(Path, {
|
|
11
|
+
d: path,
|
|
12
|
+
fill: color
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=SliceBackgroundColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Path","jsx","_jsx","SliceBackgroundColor","path","color","d","fill"],"sourceRoot":"../../../../../../../src","sources":["features/pmProgress/chart/components/layers/SliceBackgroundColor.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOvC,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EAAEC,IAAI;EAAEC;AAA4B,CAAC,KAAK;EAC7E,oBAAOH,IAAA,CAACF,IAAI;IAACM,CAAC,EAAEF,IAAK;IAACG,IAAI,EAAEF;EAAM,CAAE,CAAC;AACvC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { G, Path } from 'react-native-svg';
|
|
5
|
+
import { getSliceClipId, getFillClipId } from "../../chart.helpers.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const SliceFillColor = ({
|
|
8
|
+
clipPathId,
|
|
9
|
+
shapeSvg,
|
|
10
|
+
fillSvg,
|
|
11
|
+
color,
|
|
12
|
+
percent,
|
|
13
|
+
borderColor,
|
|
14
|
+
borderWidth
|
|
15
|
+
}) => {
|
|
16
|
+
const isFullyFilled = percent >= 100;
|
|
17
|
+
const isPartiallyFilled = percent > 0;
|
|
18
|
+
const hasBorder = borderColor != null && borderWidth != null && borderWidth > 0;
|
|
19
|
+
if (isFullyFilled) {
|
|
20
|
+
return /*#__PURE__*/_jsx(G, {
|
|
21
|
+
clipPath: `url(#${getSliceClipId(clipPathId)})`,
|
|
22
|
+
children: /*#__PURE__*/_jsx(Path, {
|
|
23
|
+
d: shapeSvg,
|
|
24
|
+
fill: color,
|
|
25
|
+
stroke: hasBorder ? borderColor : undefined,
|
|
26
|
+
strokeWidth: hasBorder ? borderWidth * 2 : undefined
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
if (isPartiallyFilled) {
|
|
31
|
+
return /*#__PURE__*/_jsx(G, {
|
|
32
|
+
clipPath: `url(#${getFillClipId(clipPathId)})`,
|
|
33
|
+
children: /*#__PURE__*/_jsx(Path, {
|
|
34
|
+
d: fillSvg,
|
|
35
|
+
fill: color,
|
|
36
|
+
stroke: hasBorder ? borderColor : undefined,
|
|
37
|
+
strokeWidth: hasBorder ? borderWidth * 2 : undefined
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=SliceFillColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","G","Path","getSliceClipId","getFillClipId","jsx","_jsx","SliceFillColor","clipPathId","shapeSvg","fillSvg","color","percent","borderColor","borderWidth","isFullyFilled","isPartiallyFilled","hasBorder","clipPath","children","d","fill","stroke","undefined","strokeWidth"],"sourceRoot":"../../../../../../../src","sources":["features/pmProgress/chart/components/layers/SliceFillColor.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,CAAC,EAAEC,IAAI,QAAQ,kBAAkB;AAC1C,SAASC,cAAc,EAAEC,aAAa,QAAQ,wBAAqB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAYnE,OAAO,MAAMC,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,oBACET,IAAA,CAACL,CAAC;MAACiB,QAAQ,EAAE,QAAQf,cAAc,CAACK,UAAU,CAAC,GAAI;MAAAW,QAAA,eACjDb,IAAA,CAACJ,IAAI;QACHkB,CAAC,EAAEX,QAAS;QACZY,IAAI,EAAEV,KAAM;QACZW,MAAM,EAAEL,SAAS,GAAGJ,WAAW,GAAGU,SAAU;QAC5CC,WAAW,EAAEP,SAAS,GAAGH,WAAW,GAAG,CAAC,GAAGS;MAAU,CACtD;IAAC,CACD,CAAC;EAER;EAEA,IAAIP,iBAAiB,EAAE;IACrB,oBACEV,IAAA,CAACL,CAAC;MAACiB,QAAQ,EAAE,QAAQd,aAAa,CAACI,UAAU,CAAC,GAAI;MAAAW,QAAA,eAChDb,IAAA,CAACJ,IAAI;QACHkB,CAAC,EAAEV,OAAQ;QACXW,IAAI,EAAEV,KAAM;QACZW,MAAM,EAAEL,SAAS,GAAGJ,WAAW,GAAGU,SAAU;QAC5CC,WAAW,EAAEP,SAAS,GAAGH,WAAW,GAAG,CAAC,GAAGS;MAAU,CACtD;IAAC,CACD,CAAC;EAER;EAEA,OAAO,IAAI;AACb,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export class OuterArcPatternGenerator {
|
|
4
|
+
constructor(config) {
|
|
5
|
+
this.config = config;
|
|
6
|
+
}
|
|
7
|
+
generateArcPath(slice, radius) {
|
|
8
|
+
const gapAngle = this.config.gapBetweenSlices / (2 * radius);
|
|
9
|
+
const startAngle = slice.startAngle + gapAngle;
|
|
10
|
+
const endAngle = slice.endAngle - gapAngle;
|
|
11
|
+
const startPoint = this.polarToCartesian(radius, startAngle);
|
|
12
|
+
const endPoint = this.polarToCartesian(radius, endAngle);
|
|
13
|
+
const largeArcFlag = endAngle - startAngle > Math.PI ? 1 : 0;
|
|
14
|
+
return `M ${startPoint.x} ${startPoint.y} A ${radius} ${radius} 0 ${largeArcFlag} 1 ${endPoint.x} ${endPoint.y}`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Returns the sizes of the two rings where the checkerboard dashes are drawn. */
|
|
18
|
+
getPatternTrackSizes() {
|
|
19
|
+
const {
|
|
20
|
+
outerRadius,
|
|
21
|
+
outerArc
|
|
22
|
+
} = this.config;
|
|
23
|
+
return [outerRadius - outerArc.strokeWidth / 2, outerRadius - outerArc.strokeWidth * 1.5];
|
|
24
|
+
}
|
|
25
|
+
getDashWidthForRadius(radius) {
|
|
26
|
+
return this.config.outerArc.dashWidth * (radius / this.config.outerRadius);
|
|
27
|
+
}
|
|
28
|
+
getDashOffset(rowIndex, radius) {
|
|
29
|
+
const dashAngle = this.config.outerArc.dashWidth / this.config.outerRadius;
|
|
30
|
+
const dashWidthAtRadius = dashAngle * radius;
|
|
31
|
+
const baseOffset = dashWidthAtRadius / 2;
|
|
32
|
+
if (rowIndex === 1) {
|
|
33
|
+
return baseOffset - dashWidthAtRadius;
|
|
34
|
+
}
|
|
35
|
+
return baseOffset;
|
|
36
|
+
}
|
|
37
|
+
polarToCartesian(radius, angleInRadians) {
|
|
38
|
+
return {
|
|
39
|
+
x: radius * Math.sin(angleInRadians),
|
|
40
|
+
y: -radius * Math.cos(angleInRadians)
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=ArcPatternGenerator.js.map
|