@cuemath/leap 2.8.51-beta-0.1 → 2.8.51-beta-0.2
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/assets/line-icons/icons/exclamation.js +26 -0
- package/dist/assets/line-icons/icons/exclamation.js.map +1 -0
- package/dist/assets/line-icons/icons/home2.js +25 -0
- package/dist/assets/line-icons/icons/home2.js.map +1 -0
- package/dist/assets/line-icons/icons/important.js +23 -0
- package/dist/assets/line-icons/icons/important.js.map +1 -0
- package/dist/assets/line-icons/icons/recap.js +32 -0
- package/dist/assets/line-icons/icons/recap.js.map +1 -0
- package/dist/features/chapters-v2/api/chapter.js +10 -0
- package/dist/features/chapters-v2/api/chapter.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +116 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +26 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +68 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +90 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +95 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +38 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +89 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +13 -0
- package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +134 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +12 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card.js +12 -0
- package/dist/features/chapters-v2/comps/node-card/node-card.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +32 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +31 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +154 -0
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +178 -0
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -0
- package/dist/features/chapters-v2/comps/tag/tag-styled.js +13 -0
- package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/tag/tag.js +28 -0
- package/dist/features/chapters-v2/comps/tag/tag.js.map +1 -0
- package/dist/features/chapters-v2/constants/block-constants.js +18 -0
- package/dist/features/chapters-v2/constants/block-constants.js.map +1 -0
- package/dist/features/chapters-v2/utils/index.js +11 -0
- package/dist/features/chapters-v2/utils/index.js.map +1 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js +72 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -0
- package/dist/index.d.ts +137 -0
- package/dist/index.js +215 -211
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
@@ -0,0 +1,178 @@
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
2
|
+
import N from "../../../../../assets/line-icons/icons/check2.js";
|
3
|
+
import j from "../../../../../assets/line-icons/icons/eye2.js";
|
4
|
+
import M from "../../../../../assets/line-icons/icons/home2.js";
|
5
|
+
import C from "../../../../../assets/line-icons/icons/more-vertical.js";
|
6
|
+
import P from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
|
7
|
+
import I from "../../../../ui/context-menu/context-menu.js";
|
8
|
+
import R from "../../../../ui/layout/flex-view.js";
|
9
|
+
import X from "../../../../ui/text/text.js";
|
10
|
+
import { getNodeTypeBasedBgImage as K } from "../../../utils/index.js";
|
11
|
+
import { getNodeCardBasedIcon as F } from "../../../utils/node-card-utils.js";
|
12
|
+
import Z from "../border-path-animation.js";
|
13
|
+
import { NodeCardContainer as z, NodeCardInfoWrapper as q, IconWrapper as J, StyledImportantIcon as Q, NodeOptionsMenuWrapper as w, NodeCardContentWrapper as U, NodeCardTitle as Y } from "../node-card-styled.js";
|
14
|
+
import V from "../node-card-tags.js";
|
15
|
+
import _ from "../node-menu-options/node-menu-options.js";
|
16
|
+
const $e = ({
|
17
|
+
nodeData: n,
|
18
|
+
imageHue: b,
|
19
|
+
blockType: x,
|
20
|
+
isSkipped: m,
|
21
|
+
onNodeAttemptLocationChange: a,
|
22
|
+
onNodeMarkAsDone: c,
|
23
|
+
onNodeView: d
|
24
|
+
}) => {
|
25
|
+
const {
|
26
|
+
accuracy: O,
|
27
|
+
attempt_location: T,
|
28
|
+
node_type: s,
|
29
|
+
card_header: y,
|
30
|
+
title: E,
|
31
|
+
state: t,
|
32
|
+
is_optional: p,
|
33
|
+
on_hover_text: h,
|
34
|
+
permissions: k
|
35
|
+
} = n, {
|
36
|
+
can_change_attempt_location: B,
|
37
|
+
can_mark_familiar: W
|
38
|
+
} = k, H = t === "IN_PROGRESS", r = t === "LOCKED", S = t === "NOT_STARTED", v = t === "COMPLETED", A = T === "INCLASS", G = K(s), $ = F(s), i = x === "GOAL", L = !h || !i || r, f = !p && (H || S), l = (u) => {
|
39
|
+
switch (u) {
|
40
|
+
case "node-card-view":
|
41
|
+
d == null || d(n);
|
42
|
+
return;
|
43
|
+
case "node-card-assign-as-hw":
|
44
|
+
a == null || a(n);
|
45
|
+
return;
|
46
|
+
case "node-card-mark-as-done":
|
47
|
+
c == null || c(n);
|
48
|
+
return;
|
49
|
+
default:
|
50
|
+
throw new Error(`No callback function for ${u}`);
|
51
|
+
}
|
52
|
+
}, g = [
|
53
|
+
{
|
54
|
+
id: "node-card-view",
|
55
|
+
label: v ? "Review" : "View",
|
56
|
+
icon: j,
|
57
|
+
disabled: !1,
|
58
|
+
onClick: l
|
59
|
+
},
|
60
|
+
{
|
61
|
+
id: "node-card-assign-as-hw",
|
62
|
+
label: "Assign as HW",
|
63
|
+
icon: M,
|
64
|
+
disabled: !B,
|
65
|
+
onClick: l
|
66
|
+
},
|
67
|
+
{
|
68
|
+
id: "node-card-mark-as-done",
|
69
|
+
label: "Mark as done",
|
70
|
+
icon: N,
|
71
|
+
disabled: !W,
|
72
|
+
onClick: l
|
73
|
+
}
|
74
|
+
];
|
75
|
+
return /* @__PURE__ */ e(
|
76
|
+
z,
|
77
|
+
{
|
78
|
+
$showOutline: !i || !f,
|
79
|
+
$background: `${b}_2`,
|
80
|
+
$disabled: !!m,
|
81
|
+
children: /* @__PURE__ */ o(
|
82
|
+
P,
|
83
|
+
{
|
84
|
+
renderAs: "primary",
|
85
|
+
tooltipItem: h,
|
86
|
+
position: "bottom",
|
87
|
+
zIndex: 5,
|
88
|
+
hidden: L,
|
89
|
+
parentWidth: "100%",
|
90
|
+
widthX: 11.25,
|
91
|
+
children: [
|
92
|
+
/* @__PURE__ */ o(
|
93
|
+
q,
|
94
|
+
{
|
95
|
+
$flexDirection: "row",
|
96
|
+
$alignItems: "center",
|
97
|
+
$width: "100%",
|
98
|
+
$heightX: 3.5,
|
99
|
+
$bgImage: G,
|
100
|
+
$gutterX: 0.78125,
|
101
|
+
$flexGap: 8.5,
|
102
|
+
children: [
|
103
|
+
/* @__PURE__ */ o(
|
104
|
+
J,
|
105
|
+
{
|
106
|
+
$width: 31,
|
107
|
+
$height: 31,
|
108
|
+
$background: "WHITE_1",
|
109
|
+
$position: "relative",
|
110
|
+
$alignItems: "center",
|
111
|
+
$justifyContent: "center",
|
112
|
+
$opacity: r ? 0.5 : 1,
|
113
|
+
children: [
|
114
|
+
$ && /* @__PURE__ */ e($, { width: 20, height: 20 }),
|
115
|
+
!p && /* @__PURE__ */ e(Q, {})
|
116
|
+
]
|
117
|
+
}
|
118
|
+
),
|
119
|
+
/* @__PURE__ */ o(X, { $renderAs: "ac4-black", $color: "BLACK", $opacity: r ? 0.5 : 1, children: [
|
120
|
+
y,
|
121
|
+
" ",
|
122
|
+
A && ". CW"
|
123
|
+
] }),
|
124
|
+
/* @__PURE__ */ e(R, { className: "context-menu", children: i && /* @__PURE__ */ e(
|
125
|
+
I,
|
126
|
+
{
|
127
|
+
targetElement: /* @__PURE__ */ e(
|
128
|
+
w,
|
129
|
+
{
|
130
|
+
$width: 16,
|
131
|
+
$height: 16,
|
132
|
+
$opacity: r ? 0.5 : 1,
|
133
|
+
children: /* @__PURE__ */ e(C, { width: 16, height: 16 })
|
134
|
+
}
|
135
|
+
),
|
136
|
+
menuElement: /* @__PURE__ */ e(_, { options: g }),
|
137
|
+
menuOffset: 5,
|
138
|
+
menuZIndex: 6
|
139
|
+
}
|
140
|
+
) }),
|
141
|
+
f && !m && /* @__PURE__ */ e(Z, {})
|
142
|
+
]
|
143
|
+
}
|
144
|
+
),
|
145
|
+
/* @__PURE__ */ e(V, { nodeType: s, state: t, accuracy: O }),
|
146
|
+
!i && /* @__PURE__ */ o(
|
147
|
+
U,
|
148
|
+
{
|
149
|
+
$flexDirection: "row",
|
150
|
+
$alignItems: "center",
|
151
|
+
$background: "WHITE_1",
|
152
|
+
$flexGap: 8,
|
153
|
+
$heightX: 4,
|
154
|
+
$justifyContent: "space-between",
|
155
|
+
children: [
|
156
|
+
/* @__PURE__ */ e(Y, { $renderAs: "ab3", $color: "BLACK_1", $opacity: r ? 0.5 : 1, children: E }),
|
157
|
+
/* @__PURE__ */ e(
|
158
|
+
I,
|
159
|
+
{
|
160
|
+
targetElement: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(C, { width: 16, height: 16 }) }),
|
161
|
+
menuElement: /* @__PURE__ */ e(_, { options: g }),
|
162
|
+
menuOffset: 5,
|
163
|
+
menuZIndex: 6
|
164
|
+
}
|
165
|
+
)
|
166
|
+
]
|
167
|
+
}
|
168
|
+
)
|
169
|
+
]
|
170
|
+
}
|
171
|
+
)
|
172
|
+
}
|
173
|
+
);
|
174
|
+
};
|
175
|
+
export {
|
176
|
+
$e as default
|
177
|
+
};
|
178
|
+
//# sourceMappingURL=teacher-actions.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"teacher-actions.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { INodeCardProps } from '../node-card-types';\nimport type { INodeMenuOption } from '../node-menu-options/node-menu-options-types';\nimport type { FC } from 'react';\n\nimport Check2Icon from '../../../../../assets/line-icons/icons/check2';\nimport Eye2Icon from '../../../../../assets/line-icons/icons/eye2';\nimport Home2Icon from '../../../../../assets/line-icons/icons/home2';\nimport MoreVerticalIcon from '../../../../../assets/line-icons/icons/more-vertical';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport ContextMenu from '../../../../ui/context-menu/context-menu';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { getNodeTypeBasedBgImage } from '../../../utils';\nimport { getNodeCardBasedIcon } from '../../../utils/node-card-utils';\nimport BorderPathAnimation from '../border-path-animation';\nimport * as Styled from '../node-card-styled';\nimport NodeCardTags from '../node-card-tags';\nimport NodeMenuOptions from '../node-menu-options/node-menu-options';\n\nconst NodeCardTeacherActions: FC<Omit<INodeCardProps, 'userType'>> = ({\n nodeData,\n imageHue,\n blockType,\n isSkipped,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeView,\n}) => {\n const {\n accuracy,\n attempt_location: attemptLocation,\n node_type: nodeType,\n card_header: cardHeader,\n title,\n state,\n is_optional: isOptional,\n on_hover_text: onHoverText,\n permissions,\n } = nodeData;\n\n const {\n can_change_attempt_location: canChangeAttemptLocation,\n can_mark_familiar: canMarkFamiliar,\n } = permissions;\n\n const sheetInProgress = state === 'IN_PROGRESS';\n const sheetLocked = state === 'LOCKED';\n const sheetNotStarted = state === 'NOT_STARTED';\n const sheetCompleted = state === 'COMPLETED';\n const inClassSheet = attemptLocation === 'INCLASS';\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n const NodeCardIcon = getNodeCardBasedIcon(nodeType);\n const isGoalBlock = blockType === 'GOAL';\n const tooltipHidden = !onHoverText || !isGoalBlock || sheetLocked;\n\n const showCardAnimation = !isOptional && (sheetInProgress || sheetNotStarted);\n\n const handleOnMenuOptionClick = (optionId: string) => {\n switch (optionId) {\n case 'node-card-view':\n onNodeView?.(nodeData);\n\n return;\n\n case 'node-card-assign-as-hw':\n onNodeAttemptLocationChange?.(nodeData);\n\n return;\n\n case 'node-card-mark-as-done':\n onNodeMarkAsDone?.(nodeData);\n\n return;\n default:\n throw new Error(`No callback function for ${optionId}`);\n }\n };\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-view',\n label: sheetCompleted ? 'Review' : 'View',\n icon: Eye2Icon,\n disabled: false,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-assign-as-hw',\n label: 'Assign as HW',\n icon: Home2Icon,\n disabled: !canChangeAttemptLocation,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-mark-as-done',\n label: 'Mark as done',\n icon: Check2Icon,\n disabled: !canMarkFamiliar,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n return (\n <Styled.NodeCardContainer\n $showOutline={!isGoalBlock || !showCardAnimation}\n $background={`${imageHue}_2`}\n $disabled={Boolean(isSkipped)}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem={onHoverText}\n position=\"bottom\"\n zIndex={5}\n hidden={tooltipHidden}\n parentWidth=\"100%\"\n widthX={11.25}\n >\n <Styled.NodeCardInfoWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $width=\"100%\"\n $heightX={3.5}\n $bgImage={nodeBgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n {NodeCardIcon && <NodeCardIcon width={20} height={20} />}\n {!isOptional && <Styled.StyledImportantIcon />}\n </Styled.IconWrapper>\n\n <Text $renderAs=\"ac4-black\" $color=\"BLACK\" $opacity={sheetLocked ? 0.5 : 1}>\n {cardHeader} {inClassSheet && `. CW`}\n </Text>\n\n <FlexView className=\"context-menu\">\n {isGoalBlock && (\n <ContextMenu\n targetElement={\n <Styled.NodeOptionsMenuWrapper\n $width={16}\n $height={16}\n $opacity={sheetLocked ? 0.5 : 1}\n >\n <MoreVerticalIcon width={16} height={16} />\n </Styled.NodeOptionsMenuWrapper>\n }\n menuElement={<NodeMenuOptions options={menuOptions} />}\n menuOffset={5}\n menuZIndex={6}\n />\n )}\n </FlexView>\n\n {showCardAnimation && !isSkipped && <BorderPathAnimation />}\n </Styled.NodeCardInfoWrapper>\n\n <NodeCardTags nodeType={nodeType} state={state} accuracy={accuracy} />\n\n {!isGoalBlock && (\n <Styled.NodeCardContentWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $background=\"WHITE_1\"\n $flexGap={8}\n $heightX={4}\n $justifyContent=\"space-between\"\n >\n <Styled.NodeCardTitle $renderAs=\"ab3\" $color=\"BLACK_1\" $opacity={sheetLocked ? 0.5 : 1}>\n {title}\n </Styled.NodeCardTitle>\n\n <ContextMenu\n targetElement={\n <Styled.NodeOptionsMenuWrapper>\n <MoreVerticalIcon width={16} height={16} />\n </Styled.NodeOptionsMenuWrapper>\n }\n menuElement={<NodeMenuOptions options={menuOptions} />}\n menuOffset={5}\n menuZIndex={6}\n />\n </Styled.NodeCardContentWrapper>\n )}\n </ArrowTooltip>\n </Styled.NodeCardContainer>\n );\n};\n\nexport default NodeCardTeacherActions;\n"],"names":["NodeCardTeacherActions","nodeData","imageHue","blockType","isSkipped","onNodeAttemptLocationChange","onNodeMarkAsDone","onNodeView","accuracy","attemptLocation","nodeType","cardHeader","title","state","isOptional","onHoverText","permissions","canChangeAttemptLocation","canMarkFamiliar","sheetInProgress","sheetLocked","sheetNotStarted","sheetCompleted","inClassSheet","nodeBgImage","getNodeTypeBasedBgImage","NodeCardIcon","getNodeCardBasedIcon","isGoalBlock","tooltipHidden","showCardAnimation","handleOnMenuOptionClick","optionId","menuOptions","Eye2Icon","Home2Icon","Check2Icon","jsx","Styled.NodeCardContainer","jsxs","ArrowTooltip","Styled.NodeCardInfoWrapper","Styled.IconWrapper","Styled.StyledImportantIcon","Text","FlexView","ContextMenu","Styled.NodeOptionsMenuWrapper","MoreVerticalIcon","NodeMenuOptions","BorderPathAnimation","NodeCardTags","Styled.NodeCardContentWrapper","Styled.NodeCardTitle"],"mappings":"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"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import e from "styled-components";
|
2
|
+
import i from "../../../ui/layout/flex-view.js";
|
3
|
+
const p = e(i)(({ $onlyIcon: t, theme: o }) => `
|
4
|
+
${!t && "padding-left: 2px;"}
|
5
|
+
|
6
|
+
max-height: 20px;
|
7
|
+
height: fit-content;
|
8
|
+
outline: 1px solid ${o.colors.BLACK_1};
|
9
|
+
`);
|
10
|
+
export {
|
11
|
+
p as TagContainer
|
12
|
+
};
|
13
|
+
//# sourceMappingURL=tag-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tag-styled.js","sources":["../../../../../src/features/chapters-v2/comps/tag/tag-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\ninterface ITagContainer {\n $onlyIcon?: boolean;\n}\n\nconst TagContainer = styled(FlexView)<ITagContainer>(({ $onlyIcon, theme }) => {\n return `\n ${!$onlyIcon && 'padding-left: 2px;'}\n\n max-height: 20px;\n height: fit-content;\n outline: 1px solid ${theme.colors.BLACK_1};\n `;\n});\n\nexport { TagContainer };\n"],"names":["TagContainer","styled","FlexView","$onlyIcon","theme"],"mappings":";;AAQM,MAAAA,IAAeC,EAAOC,CAAQ,EAAiB,CAAC,EAAE,WAAAC,GAAW,OAAAC,QAC1D;AAAA,MACH,CAACD,KAAa,oBAAoB;AAAA;AAAA;AAAA;AAAA,yBAIfC,EAAM,OAAO,OAAO;AAAA,GAE5C;"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
2
|
+
import { memo as i } from "react";
|
3
|
+
import s from "../../../ui/text/text.js";
|
4
|
+
import { TagContainer as c } from "./tag-styled.js";
|
5
|
+
const f = i(({ label: r, Icon: e }) => {
|
6
|
+
const t = !r;
|
7
|
+
return /* @__PURE__ */ n(
|
8
|
+
c,
|
9
|
+
{
|
10
|
+
$flexDirection: "row",
|
11
|
+
$alignItems: "center",
|
12
|
+
$justifyContent: "center",
|
13
|
+
$borderRadius: 50,
|
14
|
+
$gap: t ? 0 : 6,
|
15
|
+
$gutter: t ? 0 : 6,
|
16
|
+
$background: "WHITE_1",
|
17
|
+
$onlyIcon: t,
|
18
|
+
children: [
|
19
|
+
e ? /* @__PURE__ */ o(e, { width: 20, height: 20 }) : void 0,
|
20
|
+
r && /* @__PURE__ */ o(s, { $renderAs: "ac4-black", children: r })
|
21
|
+
]
|
22
|
+
}
|
23
|
+
);
|
24
|
+
});
|
25
|
+
export {
|
26
|
+
f as default
|
27
|
+
};
|
28
|
+
//# sourceMappingURL=tag.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tag.js","sources":["../../../../../src/features/chapters-v2/comps/tag/tag.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nimport React, { memo } from 'react';\n\nimport Text from '../../../ui/text/text';\nimport * as Styled from './tag-styled';\n\ninterface ITagProps {\n label?: string;\n Icon?: FC<React.SVGProps<SVGSVGElement>>;\n}\n\nconst Tag: FC<ITagProps> = memo(({ label, Icon }) => {\n const isOnlyIconPresent = !label;\n\n return (\n <Styled.TagContainer\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderRadius={50}\n $gap={isOnlyIconPresent ? 0 : 6}\n $gutter={isOnlyIconPresent ? 0 : 6}\n $background=\"WHITE_1\"\n $onlyIcon={isOnlyIconPresent}\n >\n {Icon ? <Icon width={20} height={20} /> : undefined}\n\n {label && <Text $renderAs=\"ac4-black\">{label}</Text>}\n </Styled.TagContainer>\n );\n});\n\nexport default Tag;\n"],"names":["Tag","memo","label","Icon","isOnlyIconPresent","jsxs","Styled.TagContainer","jsx","Text"],"mappings":";;;;AAYA,MAAMA,IAAqBC,EAAK,CAAC,EAAE,OAAAC,GAAO,MAAAC,QAAW;AACnD,QAAMC,IAAoB,CAACF;AAGzB,SAAA,gBAAAG;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,eAAe;AAAA,MACf,MAAMF,IAAoB,IAAI;AAAA,MAC9B,SAASA,IAAoB,IAAI;AAAA,MACjC,aAAY;AAAA,MACZ,WAAWA;AAAA,MAEV,UAAA;AAAA,QAAAD,sBAAQA,GAAK,EAAA,OAAO,IAAI,QAAQ,IAAI,IAAK;AAAA,QAEzCD,KAAS,gBAAAK,EAACC,GAAK,EAAA,WAAU,aAAa,UAAMN,GAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGnD,CAAC;"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
const S = {
|
2
|
+
DEFAULT: "Default",
|
3
|
+
PREREQ: "Prerequisite",
|
4
|
+
RECAP: "Recap",
|
5
|
+
GOAL: "Lesson",
|
6
|
+
TESTS: "Tests",
|
7
|
+
PLAYLIST: "Playlist",
|
8
|
+
SOLUTIONS: "Solutions",
|
9
|
+
NOTES: "Notes",
|
10
|
+
FLASHCARDS: "Flashcards",
|
11
|
+
SUBJECTIVES: "Subjective Questions",
|
12
|
+
PUZZLE_CARDS: "Puzzles",
|
13
|
+
SAT_MOCK_TEST: "SAT Mock Test"
|
14
|
+
};
|
15
|
+
export {
|
16
|
+
S as BLOCK_NAME
|
17
|
+
};
|
18
|
+
//# sourceMappingURL=block-constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"block-constants.js","sources":["../../../../src/features/chapters-v2/constants/block-constants.ts"],"sourcesContent":["export enum BLOCK_TYPE {\n DEFAULT = 'DEFAULT',\n PREREQ = 'PREREQ',\n RECAP = 'RECAP',\n GOAL = 'GOAL',\n TESTS = 'TESTS',\n PLAYLIST = 'PLAYLIST',\n SOLUTIONS = 'SOLUTIONS',\n NOTES = 'NOTES',\n FLASHCARDS = 'FLASHCARDS',\n SUBJECTIVES = 'SUBJECTIVES',\n PUZZLE_CARDS = 'PUZZLE_CARDS',\n SAT_MOCK_TEST = 'SAT_MOCK_TEST',\n}\n\nexport enum SECTION_CODE {\n READINESS = 'READINESS',\n GOALS = 'GOALS',\n TESTS = 'TESTS',\n ENRICHMENT = 'ENRICHMENT',\n SUBJECTIVE = 'SUBJECTIVE',\n VIDEOS = 'VIDEOS',\n NOTES = 'NOTES',\n FLASHCARDS = 'FLASHCARDS',\n PUZZLE_CARDS = 'PUZZLE_CARDS',\n}\n\nexport const BLOCK_NAME: Record<BLOCK_TYPE, string> = {\n [BLOCK_TYPE.DEFAULT]: 'Default',\n [BLOCK_TYPE.PREREQ]: 'Prerequisite',\n [BLOCK_TYPE.RECAP]: 'Recap',\n [BLOCK_TYPE.GOAL]: 'Lesson',\n [BLOCK_TYPE.TESTS]: 'Tests',\n [BLOCK_TYPE.PLAYLIST]: 'Playlist',\n [BLOCK_TYPE.SOLUTIONS]: 'Solutions',\n [BLOCK_TYPE.NOTES]: 'Notes',\n [BLOCK_TYPE.FLASHCARDS]: 'Flashcards',\n [BLOCK_TYPE.SUBJECTIVES]: 'Subjective Questions',\n [BLOCK_TYPE.PUZZLE_CARDS]: 'Puzzles',\n [BLOCK_TYPE.SAT_MOCK_TEST]: 'SAT Mock Test',\n};\n"],"names":["BLOCK_NAME"],"mappings":"AA2BO,MAAMA,IAAyC;AAAA,EACnD,SAAqB;AAAA,EACrB,QAAoB;AAAA,EACpB,OAAmB;AAAA,EACnB,MAAkB;AAAA,EAClB,OAAmB;AAAA,EACnB,UAAsB;AAAA,EACtB,WAAuB;AAAA,EACvB,OAAmB;AAAA,EACnB,YAAwB;AAAA,EACxB,aAAyB;AAAA,EACzB,cAA0B;AAAA,EAC1B,eAA2B;AAC9B;"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { ILLUSTRATIONS as r } from "../../../assets/illustrations/illustrations.js";
|
2
|
+
const C = (t) => {
|
3
|
+
if (!t) return 0;
|
4
|
+
const { mandatory: E } = t, { completed: _, total: e } = E;
|
5
|
+
return Math.floor(_ / e * 100);
|
6
|
+
}, A = (t) => t === "LEARNING" ? r.NODE_LEARN_BG : t === "RECAP" ? r.NODE_RECAP_BG : t === "DYNAMIC" ? r.NODE_CUSTOM_TEST_BG : t === "PRACTICE" ? r.NODE_PRACTICE_BG : t === "PUZZLE_EASY" || t === "PUZZLE_MEDIUM" || t === "PUZZLE_HARD" ? r.NODE_PUZZLE_BG : r.NODE_CUSTOM_TEST_BG;
|
7
|
+
export {
|
8
|
+
C as getChapterCompletionPercentage,
|
9
|
+
A as getNodeTypeBasedBgImage
|
10
|
+
};
|
11
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/features/chapters-v2/utils/index.ts"],"sourcesContent":["import type { IChapterProgressStats } from '../chapter-details/chapter-details-types';\nimport type { INodeDataProps } from '../comps/node-card/node-card-types';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\n\n// This function calculates the completion percentage of a chapter based on progress stats.\n// If no progress stats are provided, it returns 0.\n// It uses the `mandatory` field from the progress stats to determine the completed and total items.\n// It returns an integer representing the percentage of completion, rounded down to the nearest whole number.\nconst getChapterCompletionPercentage = (progressStats: IChapterProgressStats | null) => {\n if (!progressStats) return 0;\n\n const { mandatory } = progressStats;\n const { completed, total } = mandatory;\n\n const percentage = Math.floor((completed / total) * 100);\n\n return percentage;\n};\n\nconst getNodeTypeBasedBgImage = (nodeType: INodeDataProps['node_type']) => {\n if (nodeType === 'LEARNING') return ILLUSTRATIONS.NODE_LEARN_BG;\n\n if (nodeType === 'RECAP') return ILLUSTRATIONS.NODE_RECAP_BG;\n\n if (nodeType === 'DYNAMIC') return ILLUSTRATIONS.NODE_CUSTOM_TEST_BG;\n\n if (nodeType === 'PRACTICE') return ILLUSTRATIONS.NODE_PRACTICE_BG;\n\n if (nodeType === 'PUZZLE_EASY' || nodeType === 'PUZZLE_MEDIUM' || nodeType === 'PUZZLE_HARD')\n return ILLUSTRATIONS.NODE_PUZZLE_BG;\n\n return ILLUSTRATIONS.NODE_CUSTOM_TEST_BG;\n};\n\nexport { getChapterCompletionPercentage, getNodeTypeBasedBgImage };\n"],"names":["getChapterCompletionPercentage","progressStats","mandatory","completed","total","getNodeTypeBasedBgImage","nodeType","ILLUSTRATIONS"],"mappings":";AASM,MAAAA,IAAiC,CAACC,MAAgD;AAClF,MAAA,CAACA,EAAsB,QAAA;AAErB,QAAA,EAAE,WAAAC,EAAc,IAAAD,GAChB,EAAE,WAAAE,GAAW,OAAAC,EAAU,IAAAF;AAItB,SAFY,KAAK,MAAOC,IAAYC,IAAS,GAAG;AAGzD,GAEMC,IAA0B,CAACC,MAC3BA,MAAa,aAAmBC,EAAc,gBAE9CD,MAAa,UAAgBC,EAAc,gBAE3CD,MAAa,YAAkBC,EAAc,sBAE7CD,MAAa,aAAmBC,EAAc,mBAE9CD,MAAa,iBAAiBA,MAAa,mBAAmBA,MAAa,gBACtEC,EAAc,iBAEhBA,EAAc;"}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
2
|
+
import c from "../../../assets/line-icons/icons/alarm.js";
|
3
|
+
import n from "../../../assets/line-icons/icons/bulb2.js";
|
4
|
+
import i from "../../../assets/line-icons/icons/check2.js";
|
5
|
+
import m from "../../../assets/line-icons/icons/dart.js";
|
6
|
+
import a from "../../../assets/line-icons/icons/exclamation.js";
|
7
|
+
import I from "../../../assets/line-icons/icons/lock2.js";
|
8
|
+
import s from "../../../assets/line-icons/icons/puzzle.js";
|
9
|
+
import p from "../../../assets/line-icons/icons/recap.js";
|
10
|
+
import E from "../../../assets/line-icons/icons/status.js";
|
11
|
+
import { InProgressIconWrapper as f } from "../comps/node-card/node-card-styled.js";
|
12
|
+
import e from "../comps/tag/tag.js";
|
13
|
+
const D = (o, t) => {
|
14
|
+
switch (o) {
|
15
|
+
case "LOCKED":
|
16
|
+
return {
|
17
|
+
icon: /* @__PURE__ */ r(I, { width: 32, height: 32 }),
|
18
|
+
top: -12,
|
19
|
+
right: -12
|
20
|
+
};
|
21
|
+
case "IN_PROGRESS":
|
22
|
+
return {
|
23
|
+
icon: /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(E, {}) })
|
24
|
+
};
|
25
|
+
case "COMPLETED":
|
26
|
+
return {
|
27
|
+
icon: /* @__PURE__ */ r(
|
28
|
+
e,
|
29
|
+
{
|
30
|
+
Icon: i,
|
31
|
+
label: typeof t == "number" ? `${t}%` : void 0
|
32
|
+
}
|
33
|
+
),
|
34
|
+
top: -10,
|
35
|
+
right: -10
|
36
|
+
};
|
37
|
+
case "WAIT_FOR_REVIEW":
|
38
|
+
return {
|
39
|
+
icon: /* @__PURE__ */ r(e, { Icon: a }),
|
40
|
+
//<AlertIcon width={32} height={32} fill="white" />,
|
41
|
+
top: -10,
|
42
|
+
right: -10
|
43
|
+
};
|
44
|
+
default:
|
45
|
+
return {
|
46
|
+
icon: void 0
|
47
|
+
};
|
48
|
+
}
|
49
|
+
}, N = (o) => {
|
50
|
+
switch (o) {
|
51
|
+
case "LEARNING":
|
52
|
+
return n;
|
53
|
+
case "RECAP":
|
54
|
+
return p;
|
55
|
+
case "DYNAMIC":
|
56
|
+
return c;
|
57
|
+
case "PRACTICE":
|
58
|
+
case "EXTRA_PRACTICE":
|
59
|
+
return m;
|
60
|
+
case "PUZZLE_EASY":
|
61
|
+
case "PUZZLE_MEDIUM":
|
62
|
+
case "PUZZLE_HARD":
|
63
|
+
return s;
|
64
|
+
default:
|
65
|
+
return "";
|
66
|
+
}
|
67
|
+
};
|
68
|
+
export {
|
69
|
+
N as getNodeCardBasedIcon,
|
70
|
+
D as getNodeStateBasedTagInfo
|
71
|
+
};
|
72
|
+
//# sourceMappingURL=node-card-utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"node-card-utils.js","sources":["../../../../src/features/chapters-v2/utils/node-card-utils.tsx"],"sourcesContent":["import type { INodeDataProps } from '../comps/node-card/node-card-types';\n\nimport AlarmIcon from '../../../assets/line-icons/icons/alarm';\nimport Bulb2Icon from '../../../assets/line-icons/icons/bulb2';\nimport Check2Icon from '../../../assets/line-icons/icons/check2';\nimport DartIcon from '../../../assets/line-icons/icons/dart';\nimport ExclamationIcon from '../../../assets/line-icons/icons/exclamation';\nimport Lock2Icon from '../../../assets/line-icons/icons/lock2';\nimport PuzzleIcon from '../../../assets/line-icons/icons/puzzle';\nimport RecapIcon from '../../../assets/line-icons/icons/recap';\nimport StatusIcon from '../../../assets/line-icons/icons/status';\nimport { InProgressIconWrapper } from '../comps/node-card/node-card-styled';\nimport Tag from '../comps/tag/tag';\n\nconst getNodeStateBasedTagInfo = (nodeState: INodeDataProps['state'], accuracy?: number | null) => {\n switch (nodeState) {\n case 'LOCKED':\n return {\n icon: <Lock2Icon width={32} height={32} />,\n top: -12,\n right: -12,\n };\n case 'IN_PROGRESS':\n return {\n icon: (\n <InProgressIconWrapper>\n <StatusIcon />\n </InProgressIconWrapper>\n ),\n };\n case 'COMPLETED':\n return {\n icon: (\n <Tag\n Icon={Check2Icon}\n label={typeof accuracy === 'number' ? `${accuracy}%` : undefined}\n />\n ),\n top: -10,\n right: -10,\n };\n case 'WAIT_FOR_REVIEW':\n return {\n icon: <Tag Icon={ExclamationIcon} />, //<AlertIcon width={32} height={32} fill=\"white\" />,\n top: -10,\n right: -10,\n };\n\n default:\n return {\n icon: undefined,\n };\n }\n};\n\nconst getNodeCardBasedIcon = (nodeType: INodeDataProps['node_type']) => {\n switch (nodeType) {\n case 'LEARNING':\n return Bulb2Icon;\n case 'RECAP':\n return RecapIcon;\n case 'DYNAMIC':\n return AlarmIcon;\n case 'PRACTICE':\n case 'EXTRA_PRACTICE':\n return DartIcon;\n case 'PUZZLE_EASY':\n case 'PUZZLE_MEDIUM':\n case 'PUZZLE_HARD':\n return PuzzleIcon;\n\n default:\n return '';\n }\n};\n\nexport { getNodeStateBasedTagInfo, getNodeCardBasedIcon };\n"],"names":["getNodeStateBasedTagInfo","nodeState","accuracy","jsx","Lock2Icon","InProgressIconWrapper","StatusIcon","Tag","Check2Icon","ExclamationIcon","getNodeCardBasedIcon","nodeType","Bulb2Icon","RecapIcon","AlarmIcon","DartIcon","PuzzleIcon"],"mappings":";;;;;;;;;;;;AAcM,MAAAA,IAA2B,CAACC,GAAoCC,MAA6B;AACjG,UAAQD,GAAW;AAAA,IACjB,KAAK;AACI,aAAA;AAAA,QACL,MAAO,gBAAAE,EAAAC,GAAA,EAAU,OAAO,IAAI,QAAQ,IAAI;AAAA,QACxC,KAAK;AAAA,QACL,OAAO;AAAA,MAAA;AAAA,IAEX,KAAK;AACI,aAAA;AAAA,QACL,MACE,gBAAAD,EAACE,GACC,EAAA,UAAA,gBAAAF,EAACG,IAAW,CAAA,GACd;AAAA,MAAA;AAAA,IAGN,KAAK;AACI,aAAA;AAAA,QACL,MACE,gBAAAH;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,MAAMC;AAAA,YACN,OAAO,OAAON,KAAa,WAAW,GAAGA,CAAQ,MAAM;AAAA,UAAA;AAAA,QACzD;AAAA,QAEF,KAAK;AAAA,QACL,OAAO;AAAA,MAAA;AAAA,IAEX,KAAK;AACI,aAAA;AAAA,QACL,MAAM,gBAAAC,EAACI,GAAI,EAAA,MAAME,EAAiB,CAAA;AAAA;AAAA,QAClC,KAAK;AAAA,QACL,OAAO;AAAA,MAAA;AAAA,IAGX;AACS,aAAA;AAAA,QACL,MAAM;AAAA,MAAA;AAAA,EAEZ;AACF,GAEMC,IAAuB,CAACC,MAA0C;AACtE,UAAQA,GAAU;AAAA,IAChB,KAAK;AACI,aAAAC;AAAA,IACT,KAAK;AACI,aAAAC;AAAA,IACT,KAAK;AACI,aAAAC;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACI,aAAAC;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACI,aAAAC;AAAA,IAET;AACS,aAAA;AAAA,EACX;AACF;"}
|
package/dist/index.d.ts
CHANGED
@@ -109,6 +109,21 @@ declare const BLOCK_TYPE: {
|
|
109
109
|
readonly SAT_MOCK_TEST: "SAT_MOCK_TEST";
|
110
110
|
};
|
111
111
|
|
112
|
+
declare enum BLOCK_TYPE_2 {
|
113
|
+
DEFAULT = "DEFAULT",
|
114
|
+
PREREQ = "PREREQ",
|
115
|
+
RECAP = "RECAP",
|
116
|
+
GOAL = "GOAL",
|
117
|
+
TESTS = "TESTS",
|
118
|
+
PLAYLIST = "PLAYLIST",
|
119
|
+
SOLUTIONS = "SOLUTIONS",
|
120
|
+
NOTES = "NOTES",
|
121
|
+
FLASHCARDS = "FLASHCARDS",
|
122
|
+
SUBJECTIVES = "SUBJECTIVES",
|
123
|
+
PUZZLE_CARDS = "PUZZLE_CARDS",
|
124
|
+
SAT_MOCK_TEST = "SAT_MOCK_TEST"
|
125
|
+
}
|
126
|
+
|
112
127
|
export declare const Book2Icon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
113
128
|
|
114
129
|
export declare const BookClosedIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
@@ -148,6 +163,8 @@ declare const CHAPTER_PERMISSION_CODES: {
|
|
148
163
|
|
149
164
|
export declare const ChapterClearanceConfirmationModal: FC<IChapterClearanceConfirmationModal>;
|
150
165
|
|
166
|
+
export declare const ChapterDetails: FC<IChapterDetails>;
|
167
|
+
|
151
168
|
export declare const ChaptersList: FC<IChaptersListProps>;
|
152
169
|
|
153
170
|
export declare const ChatIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
@@ -632,6 +649,10 @@ declare interface IBaseWorksheetProps {
|
|
632
649
|
canShowActionBar?: boolean;
|
633
650
|
}
|
634
651
|
|
652
|
+
declare interface IBlockSectionsCallbacks extends INodeCardCallbacks {
|
653
|
+
onBlockSkipUnskip?: (blockId: string, skipBlock?: boolean) => void;
|
654
|
+
}
|
655
|
+
|
635
656
|
declare interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, IClickableAnalyticsProps {
|
636
657
|
label: string;
|
637
658
|
renderAs: TButtonVariants;
|
@@ -706,6 +727,25 @@ declare interface IChapter extends IChapterState, Pick<IChapterModel, 'code' | '
|
|
706
727
|
learning_sheet_data: ILearningSheetData[];
|
707
728
|
}
|
708
729
|
|
730
|
+
declare interface IChapterBlockData {
|
731
|
+
block_type: keyof typeof BLOCK_TYPE_2;
|
732
|
+
chapter_code: string;
|
733
|
+
code: string;
|
734
|
+
block_id: string;
|
735
|
+
is_skipped: boolean;
|
736
|
+
name: string;
|
737
|
+
permissions: IChapterBlockPermission;
|
738
|
+
program_id: string;
|
739
|
+
section_code: keyof typeof SECTION_CODE;
|
740
|
+
sheets: INodeDataProps[];
|
741
|
+
user_block_id: string | null;
|
742
|
+
}
|
743
|
+
|
744
|
+
declare interface IChapterBlockPermission {
|
745
|
+
can_skip: boolean;
|
746
|
+
can_unskip: boolean;
|
747
|
+
}
|
748
|
+
|
709
749
|
export declare interface IChapterBlockV3 {
|
710
750
|
completed_on: number | null;
|
711
751
|
sheets: IWorksheetModelV3[];
|
@@ -742,6 +782,13 @@ export declare interface IChapterDataProps {
|
|
742
782
|
};
|
743
783
|
}
|
744
784
|
|
785
|
+
declare interface IChapterDetails extends IBlockSectionsCallbacks {
|
786
|
+
userType: TUserTypes;
|
787
|
+
userChapterId: string;
|
788
|
+
studentId: string;
|
789
|
+
onExit: () => void;
|
790
|
+
}
|
791
|
+
|
745
792
|
declare interface IChapterModel {
|
746
793
|
code: string;
|
747
794
|
description: string;
|
@@ -766,6 +813,17 @@ declare interface IChapterModel {
|
|
766
813
|
is_puzzle_chapter?: boolean;
|
767
814
|
}
|
768
815
|
|
816
|
+
declare interface IChapterProgressInfo {
|
817
|
+
completed: number;
|
818
|
+
total: number;
|
819
|
+
}
|
820
|
+
|
821
|
+
declare interface IChapterProgressStats {
|
822
|
+
mandatory: IChapterProgressInfo;
|
823
|
+
class_work: IChapterProgressInfo;
|
824
|
+
optional: IChapterProgressInfo;
|
825
|
+
}
|
826
|
+
|
769
827
|
declare interface IChapterProps extends IChapterDataProps, IChapterCallbackProps {
|
770
828
|
user_type: TUserTypes;
|
771
829
|
is_defocused?: boolean;
|
@@ -2054,6 +2112,53 @@ export declare const Info2Icon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
2054
2112
|
|
2055
2113
|
export declare const InfoIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
2056
2114
|
|
2115
|
+
declare interface INodeCardCallbacks {
|
2116
|
+
onNodeAttempt?: (nodeData: INodeDataProps) => void;
|
2117
|
+
onNodeView?: (nodeData: INodeDataProps) => void;
|
2118
|
+
onNodeReview?: (nodeData: INodeDataProps) => void;
|
2119
|
+
onNodeReattempt?: (nodeData: INodeDataProps) => void;
|
2120
|
+
onNodeAttemptLocationChange?: (nodeData: INodeDataProps) => void;
|
2121
|
+
onNodeMarkAsDone?: (nodeData: INodeDataProps) => void;
|
2122
|
+
}
|
2123
|
+
|
2124
|
+
declare interface INodeDataProps {
|
2125
|
+
accuracy: number | null;
|
2126
|
+
attempt_location: TSheetAttemptLocation_2;
|
2127
|
+
block_id: string;
|
2128
|
+
card_header: string;
|
2129
|
+
chapter_id: string;
|
2130
|
+
complete_status: boolean;
|
2131
|
+
desmos_calculator_enabled: boolean;
|
2132
|
+
due_date_ts: number | null;
|
2133
|
+
is_lesson_v3_enabled: boolean;
|
2134
|
+
is_optional: boolean;
|
2135
|
+
is_timed: boolean;
|
2136
|
+
is_worksheet_v3: boolean | null;
|
2137
|
+
learnosity_activity_ref: string;
|
2138
|
+
marked_as_completed: boolean;
|
2139
|
+
node_id: string;
|
2140
|
+
node_type: TNodeTypes;
|
2141
|
+
on_hover_text: string;
|
2142
|
+
permissions: INodePermissions;
|
2143
|
+
sheet_time: number | null;
|
2144
|
+
state: TSheetStates;
|
2145
|
+
title: string;
|
2146
|
+
user_chapter_id: string | null;
|
2147
|
+
user_node_id: string | null;
|
2148
|
+
}
|
2149
|
+
|
2150
|
+
declare interface INodePermissions {
|
2151
|
+
can_change_attempt_location: boolean;
|
2152
|
+
can_mark_familiar: boolean;
|
2153
|
+
can_reattempt: boolean;
|
2154
|
+
can_reset: boolean;
|
2155
|
+
can_resume: boolean;
|
2156
|
+
can_review: boolean;
|
2157
|
+
can_start: boolean;
|
2158
|
+
can_teacher_review: boolean;
|
2159
|
+
can_unassign: boolean;
|
2160
|
+
}
|
2161
|
+
|
2057
2162
|
export declare interface INudgeProps {
|
2058
2163
|
nudge: 'click';
|
2059
2164
|
content: ReactNode;
|
@@ -2062,6 +2167,8 @@ export declare interface INudgeProps {
|
|
2062
2167
|
zIndex?: number;
|
2063
2168
|
}
|
2064
2169
|
|
2170
|
+
export declare const invalidateGetChapterDetails: (id: string, query?: void | undefined, allIdsInvalid?: boolean) => void;
|
2171
|
+
|
2065
2172
|
export declare const invalidateMilestoneResources: (id: string, query?: void | undefined, allIdsInvalid?: boolean) => void;
|
2066
2173
|
|
2067
2174
|
export declare const invalidateMilestonesData: (query?: TQuery | undefined) => void;
|
@@ -3094,6 +3201,20 @@ declare interface IusePointerSyncProps {
|
|
3094
3201
|
targetUserId?: string;
|
3095
3202
|
}
|
3096
3203
|
|
3204
|
+
export declare interface IUserChapterData {
|
3205
|
+
chapter_code: string;
|
3206
|
+
chapter_id: string;
|
3207
|
+
chapter_tags: string[];
|
3208
|
+
id: string;
|
3209
|
+
image_hue: THueNames;
|
3210
|
+
image_url: string;
|
3211
|
+
item_bank_enabled: boolean;
|
3212
|
+
name: string;
|
3213
|
+
program_id: string;
|
3214
|
+
progress_stats: IChapterProgressStats | null;
|
3215
|
+
blocks: IChapterBlockData[];
|
3216
|
+
}
|
3217
|
+
|
3097
3218
|
declare interface IUserChapterProgressProps {
|
3098
3219
|
familiar_sheets: number;
|
3099
3220
|
mastered_sheets: number;
|
@@ -3856,6 +3977,18 @@ export declare const SearchableSelectInput: <IDType extends string | number>(pro
|
|
3856
3977
|
|
3857
3978
|
export declare const SearchIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
3858
3979
|
|
3980
|
+
declare enum SECTION_CODE {
|
3981
|
+
READINESS = "READINESS",
|
3982
|
+
GOALS = "GOALS",
|
3983
|
+
TESTS = "TESTS",
|
3984
|
+
ENRICHMENT = "ENRICHMENT",
|
3985
|
+
SUBJECTIVE = "SUBJECTIVE",
|
3986
|
+
VIDEOS = "VIDEOS",
|
3987
|
+
NOTES = "NOTES",
|
3988
|
+
FLASHCARDS = "FLASHCARDS",
|
3989
|
+
PUZZLE_CARDS = "PUZZLE_CARDS"
|
3990
|
+
}
|
3991
|
+
|
3859
3992
|
export declare const SectionList: <Section extends string | number | TDefaultSection>(props: ISectionList<Section>) => JSX.Element;
|
3860
3993
|
|
3861
3994
|
export declare const SelectInput: <IDType extends string | number>(props: ISelectInputProps<IDType>) => JSX.Element;
|
@@ -4806,6 +4939,8 @@ declare type TSectionSummary = {
|
|
4806
4939
|
|
4807
4940
|
declare type TSheetAttemptLocation = keyof typeof SHEET_ATTEMPT_LOCATION;
|
4808
4941
|
|
4942
|
+
declare type TSheetAttemptLocation_2 = keyof typeof SHEET_ATTEMPT_LOCATION;
|
4943
|
+
|
4809
4944
|
declare type TSheetAttemptStateProps = keyof typeof SHEET_ATTEMPT_STATE;
|
4810
4945
|
|
4811
4946
|
declare type TSheetBlockData = {
|
@@ -4867,6 +5002,8 @@ export declare type TSheetsSection = 'core_lessons' | 'supplementary_sheets' | '
|
|
4867
5002
|
|
4868
5003
|
declare type TSheetStateProps = 'LOCKED' | 'NOT_STARTED' | 'IN_PROGRESS' | 'FAMILIAR' | 'PROFICIENT' | 'MASTERED' | 'COMPLETED' | 'RE_ATTEMPT';
|
4869
5004
|
|
5005
|
+
declare type TSheetStates = 'LOCKED' | 'NOT_STARTED' | 'IN_PROGRESS' | 'COMPLETED' | 'WAIT_FOR_REVIEW';
|
5006
|
+
|
4870
5007
|
export declare type TSkillStatus = 'pending' | 'completed';
|
4871
5008
|
|
4872
5009
|
declare type TStickerData = {
|