@cuemath/leap 3.1.21 → 3.1.22-beta-0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,107 +1,116 @@
|
|
1
1
|
import { jsxs as g, jsx as e } from "react/jsx-runtime";
|
2
|
-
import { memo as F, useCallback as
|
2
|
+
import { memo as F, useCallback as _ } from "react";
|
3
3
|
import { ILLUSTRATIONS as O } from "../../../assets/illustrations/illustrations.js";
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import { ContentWrapper as
|
10
|
-
const
|
11
|
-
({ name:
|
4
|
+
import C from "../../ui/layout/flex-view.js";
|
5
|
+
import H from "../../ui/separator/separator.js";
|
6
|
+
import U from "./comps/chapter-banner/chapter-banner.js";
|
7
|
+
import W from "./comps/core-lessons/core-lessons.js";
|
8
|
+
import M from "./comps/supplementary-resources/supplementary-resources.js";
|
9
|
+
import { ContentWrapper as Q, LoaderWrapper as T } from "./styled.js";
|
10
|
+
const X = F(
|
11
|
+
({ name: $, sheets_data: k, user_type: n, loading: a, ...S }) => {
|
12
12
|
const {
|
13
13
|
user_chapter_progress: s,
|
14
14
|
is_defocused: r,
|
15
15
|
image_url: w,
|
16
16
|
image_hue: i,
|
17
17
|
teacherId: x,
|
18
|
-
onCreateExtraPractice:
|
18
|
+
onCreateExtraPractice: o,
|
19
19
|
onStart: p,
|
20
20
|
onResume: m,
|
21
|
-
onReattempt:
|
22
|
-
onPreview:
|
21
|
+
onReattempt: c,
|
22
|
+
onPreview: l,
|
23
23
|
onReview: u,
|
24
24
|
onReset: h,
|
25
25
|
onChangeLocation: d,
|
26
26
|
onMarkAsFamiliar: f,
|
27
|
-
onUnlock:
|
28
|
-
onMarkRelevant:
|
29
|
-
onMarkIrrelevant:
|
30
|
-
onUnAssignSheet:
|
31
|
-
onLearningPlanFAQClick:
|
32
|
-
} =
|
27
|
+
onUnlock: E,
|
28
|
+
onMarkRelevant: I,
|
29
|
+
onMarkIrrelevant: L,
|
30
|
+
onUnAssignSheet: P,
|
31
|
+
onLearningPlanFAQClick: t
|
32
|
+
} = S, {
|
33
33
|
lessons: R,
|
34
|
-
supplementary_sheets_group_sort_order:
|
35
|
-
supplementary_sheets_grouped:
|
36
|
-
} =
|
37
|
-
if (typeof o != "function")
|
38
|
-
throw new Error("onLearningPlanFAQClick must be a function");
|
39
|
-
o();
|
40
|
-
}, [o]), v = C(() => {
|
34
|
+
supplementary_sheets_group_sort_order: b,
|
35
|
+
supplementary_sheets_grouped: y
|
36
|
+
} = k, A = _(() => {
|
41
37
|
if (typeof t != "function")
|
42
|
-
throw new Error("
|
38
|
+
throw new Error("onLearningPlanFAQClick must be a function");
|
43
39
|
t();
|
44
|
-
}, [t])
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
40
|
+
}, [t]), v = _(() => {
|
41
|
+
if (typeof o != "function")
|
42
|
+
throw new Error("onCreateExtraPractice must be a function");
|
43
|
+
o();
|
44
|
+
}, [o]);
|
45
|
+
return /* @__PURE__ */ g(
|
46
|
+
Q,
|
47
|
+
{
|
48
|
+
$disablePointerEvents: a,
|
49
|
+
$alignItems: "center",
|
50
|
+
$width: "100%",
|
51
|
+
$background: "WHITE_4",
|
52
|
+
children: [
|
53
|
+
a && /* @__PURE__ */ e(T, { children: /* @__PURE__ */ e("img", { src: O.LOADER_1, alt: "loader" }) }),
|
54
|
+
/* @__PURE__ */ e(
|
55
|
+
U,
|
56
|
+
{
|
57
|
+
name: $,
|
58
|
+
userChapterProgress: s,
|
59
|
+
isDefocused: r,
|
60
|
+
imageUrl: w,
|
61
|
+
backgroundColor: `${i}_1`
|
62
|
+
}
|
63
|
+
),
|
64
|
+
/* @__PURE__ */ e(C, { $widthX: 47.5, $flexGapX: 2, children: /* @__PURE__ */ e(
|
65
|
+
W,
|
66
|
+
{
|
67
|
+
userType: n,
|
68
|
+
lessons: R,
|
69
|
+
userChapterProgress: s,
|
70
|
+
isDefocused: r,
|
71
|
+
lessonItemColorHue: i,
|
72
|
+
handleOnLearningPlanFAQClick: A,
|
73
|
+
onChangeLocation: d,
|
74
|
+
onPreview: l,
|
75
|
+
onReset: h,
|
76
|
+
onReview: u,
|
77
|
+
onStart: p,
|
78
|
+
onReattempt: c,
|
79
|
+
onResume: m,
|
80
|
+
onMarkAsFamiliar: f,
|
81
|
+
onMarkIrrelevant: L,
|
82
|
+
onMarkRelevant: I
|
83
|
+
}
|
84
|
+
) }),
|
85
|
+
/* @__PURE__ */ g(C, { $width: "100%", $flexGapX: 2, $background: "WHITE_3", $alignItems: "center", children: [
|
86
|
+
/* @__PURE__ */ e(
|
87
|
+
M,
|
88
|
+
{
|
89
|
+
userType: n,
|
90
|
+
teacherId: x,
|
91
|
+
groupedSupplementarySheets: y,
|
92
|
+
groupedSupplementarySheetsSortOrder: b,
|
93
|
+
isDefocused: r,
|
94
|
+
handleOnCreateExtraPractice: v,
|
95
|
+
onChangeLocation: d,
|
96
|
+
onPreview: l,
|
97
|
+
onReset: h,
|
98
|
+
onReview: u,
|
99
|
+
onStart: p,
|
100
|
+
onReattempt: c,
|
101
|
+
onResume: m,
|
102
|
+
onMarkAsFamiliar: f,
|
103
|
+
onUnlock: E,
|
104
|
+
onUnAssignSheet: P
|
105
|
+
}
|
106
|
+
),
|
107
|
+
/* @__PURE__ */ e(H, { height: 1 })
|
108
|
+
] })
|
109
|
+
]
|
110
|
+
}
|
111
|
+
);
|
103
112
|
}
|
104
|
-
), K =
|
113
|
+
), K = X;
|
105
114
|
export {
|
106
115
|
K as default
|
107
116
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapter.js","sources":["../../../../src/features/chapters/chapter/chapter.tsx"],"sourcesContent":["import type { IChapterProps } from './chapter-types';\n\nimport { useCallback, type FC, memo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport ChapterBanner from './comps/chapter-banner/chapter-banner';\nimport CoreLessons from './comps/core-lessons/core-lessons';\nimport SupplementaryResources from './comps/supplementary-resources/supplementary-resources';\nimport * as Styled from './styled';\n\nconst Chapter: FC<IChapterProps> = memo(\n ({ name, sheets_data: sheetData, user_type: userType, loading, ...restChapterProps }) => {\n const {\n user_chapter_progress: userChapterProgress,\n is_defocused: isDefocused,\n image_url: imageUrl,\n image_hue: imageHue,\n teacherId,\n onCreateExtraPractice,\n onStart,\n onResume,\n onReattempt,\n onPreview,\n onReview,\n onReset,\n onChangeLocation,\n onMarkAsFamiliar,\n onUnlock,\n onMarkRelevant,\n onMarkIrrelevant,\n onUnAssignSheet,\n onLearningPlanFAQClick,\n } = restChapterProps;\n\n const {\n lessons,\n supplementary_sheets_group_sort_order: groupedSupplementarySheetsSortOrder,\n supplementary_sheets_grouped: groupedSupplementarySheets,\n } = sheetData;\n\n const handleOnLearningPlanFAQClick = useCallback(() => {\n if (typeof onLearningPlanFAQClick !== 'function') {\n throw new Error('onLearningPlanFAQClick must be a function');\n }\n\n onLearningPlanFAQClick();\n }, [onLearningPlanFAQClick]);\n\n const handleOnCreateExtraPractice = useCallback(() => {\n if (typeof onCreateExtraPractice !== 'function') {\n throw new Error('onCreateExtraPractice must be a function');\n }\n\n onCreateExtraPractice();\n }, [onCreateExtraPractice]);\n\n return (\n <Styled.ContentWrapper
|
1
|
+
{"version":3,"file":"chapter.js","sources":["../../../../src/features/chapters/chapter/chapter.tsx"],"sourcesContent":["import type { IChapterProps } from './chapter-types';\n\nimport { useCallback, type FC, memo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport ChapterBanner from './comps/chapter-banner/chapter-banner';\nimport CoreLessons from './comps/core-lessons/core-lessons';\nimport SupplementaryResources from './comps/supplementary-resources/supplementary-resources';\nimport * as Styled from './styled';\n\nconst Chapter: FC<IChapterProps> = memo(\n ({ name, sheets_data: sheetData, user_type: userType, loading, ...restChapterProps }) => {\n const {\n user_chapter_progress: userChapterProgress,\n is_defocused: isDefocused,\n image_url: imageUrl,\n image_hue: imageHue,\n teacherId,\n onCreateExtraPractice,\n onStart,\n onResume,\n onReattempt,\n onPreview,\n onReview,\n onReset,\n onChangeLocation,\n onMarkAsFamiliar,\n onUnlock,\n onMarkRelevant,\n onMarkIrrelevant,\n onUnAssignSheet,\n onLearningPlanFAQClick,\n } = restChapterProps;\n\n const {\n lessons,\n supplementary_sheets_group_sort_order: groupedSupplementarySheetsSortOrder,\n supplementary_sheets_grouped: groupedSupplementarySheets,\n } = sheetData;\n\n const handleOnLearningPlanFAQClick = useCallback(() => {\n if (typeof onLearningPlanFAQClick !== 'function') {\n throw new Error('onLearningPlanFAQClick must be a function');\n }\n\n onLearningPlanFAQClick();\n }, [onLearningPlanFAQClick]);\n\n const handleOnCreateExtraPractice = useCallback(() => {\n if (typeof onCreateExtraPractice !== 'function') {\n throw new Error('onCreateExtraPractice must be a function');\n }\n\n onCreateExtraPractice();\n }, [onCreateExtraPractice]);\n\n return (\n <Styled.ContentWrapper\n $disablePointerEvents={loading}\n $alignItems=\"center\"\n $width=\"100%\"\n $background=\"WHITE_4\"\n >\n {loading && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loader\" />\n </Styled.LoaderWrapper>\n )}\n\n <ChapterBanner\n name={name}\n userChapterProgress={userChapterProgress}\n isDefocused={isDefocused}\n imageUrl={imageUrl}\n backgroundColor={`${imageHue}_1`}\n />\n <FlexView $widthX={47.5} $flexGapX={2}>\n <CoreLessons\n userType={userType}\n lessons={lessons}\n userChapterProgress={userChapterProgress}\n isDefocused={isDefocused}\n lessonItemColorHue={imageHue}\n handleOnLearningPlanFAQClick={handleOnLearningPlanFAQClick}\n onChangeLocation={onChangeLocation}\n onPreview={onPreview}\n onReset={onReset}\n onReview={onReview}\n onStart={onStart}\n onReattempt={onReattempt}\n onResume={onResume}\n onMarkAsFamiliar={onMarkAsFamiliar}\n onMarkIrrelevant={onMarkIrrelevant}\n onMarkRelevant={onMarkRelevant}\n />\n </FlexView>\n\n <FlexView $width=\"100%\" $flexGapX={2} $background=\"WHITE_3\" $alignItems=\"center\">\n <SupplementaryResources\n userType={userType}\n teacherId={teacherId}\n groupedSupplementarySheets={groupedSupplementarySheets}\n groupedSupplementarySheetsSortOrder={groupedSupplementarySheetsSortOrder}\n isDefocused={isDefocused}\n handleOnCreateExtraPractice={handleOnCreateExtraPractice}\n onChangeLocation={onChangeLocation}\n onPreview={onPreview}\n onReset={onReset}\n onReview={onReview}\n onStart={onStart}\n onReattempt={onReattempt}\n onResume={onResume}\n onMarkAsFamiliar={onMarkAsFamiliar}\n onUnlock={onUnlock}\n onUnAssignSheet={onUnAssignSheet}\n />\n\n <Separator height={1} />\n </FlexView>\n </Styled.ContentWrapper>\n );\n },\n);\n\nexport default Chapter;\n"],"names":["Chapter","memo","name","sheetData","userType","loading","restChapterProps","userChapterProgress","isDefocused","imageUrl","imageHue","teacherId","onCreateExtraPractice","onStart","onResume","onReattempt","onPreview","onReview","onReset","onChangeLocation","onMarkAsFamiliar","onUnlock","onMarkRelevant","onMarkIrrelevant","onUnAssignSheet","onLearningPlanFAQClick","lessons","groupedSupplementarySheetsSortOrder","groupedSupplementarySheets","handleOnLearningPlanFAQClick","useCallback","handleOnCreateExtraPractice","jsxs","Styled.ContentWrapper","jsx","Styled.LoaderWrapper","ILLUSTRATIONS","ChapterBanner","FlexView","CoreLessons","SupplementaryResources","Separator","Chapter$1"],"mappings":";;;;;;;;;AAYA,MAAMA,IAA6BC;AAAA,EACjC,CAAC,EAAE,MAAAC,GAAM,aAAaC,GAAW,WAAWC,GAAU,SAAAC,GAAS,GAAGC,QAAuB;AACjF,UAAA;AAAA,MACJ,uBAAuBC;AAAA,MACvB,cAAcC;AAAA,MACd,WAAWC;AAAA,MACX,WAAWC;AAAA,MACX,WAAAC;AAAA,MACA,uBAAAC;AAAA,MACA,SAAAC;AAAA,MACA,UAAAC;AAAA,MACA,aAAAC;AAAA,MACA,WAAAC;AAAA,MACA,UAAAC;AAAA,MACA,SAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,UAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,wBAAAC;AAAA,IACE,IAAAnB,GAEE;AAAA,MACJ,SAAAoB;AAAA,MACA,uCAAuCC;AAAA,MACvC,8BAA8BC;AAAA,IAC5B,IAAAzB,GAEE0B,IAA+BC,EAAY,MAAM;AACjD,UAAA,OAAOL,KAA2B;AAC9B,cAAA,IAAI,MAAM,2CAA2C;AAGtC,MAAAA;IAAA,GACtB,CAACA,CAAsB,CAAC,GAErBM,IAA8BD,EAAY,MAAM;AAChD,UAAA,OAAOlB,KAA0B;AAC7B,cAAA,IAAI,MAAM,0CAA0C;AAGtC,MAAAA;IAAA,GACrB,CAACA,CAAqB,CAAC;AAGxB,WAAA,gBAAAoB;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,uBAAuB5B;AAAA,QACvB,aAAY;AAAA,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