@cuemath/leap 2.8.63-akm-5 → 2.9.0-aa1
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/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions.js +45 -46
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/teacher-actions/teacher-actions.js +25 -26
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +50 -58
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas-provider.js +9 -8
- package/dist/features/cue-canvas/cue-canvas-provider.js.map +1 -1
- package/dist/features/sheets/lessons-list/lesson-item/lesson-item-cta-info.js +59 -60
- package/dist/features/sheets/lessons-list/lesson-item/lesson-item-cta-info.js.map +1 -1
- package/dist/features/sheets/resources-list/resource-item/resource-item.js +89 -90
- package/dist/features/sheets/resources-list/resource-item/resource-item.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.js +60 -61
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.js +63 -64
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/sheets/utils/is-v3-worksheet.js +4 -14
- package/dist/features/sheets/utils/is-v3-worksheet.js.map +1 -1
- package/dist/index.d.ts +10 -13
- package/dist/index.js +425 -425
- package/dist/index.js.map +1 -1
- package/dist/library/polypad.js +24965 -0
- package/dist/library/polypad.js.map +1 -0
- package/package.json +4 -2
@@ -1,111 +1,110 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { useMemo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import { useUIContext as
|
6
|
-
import { NODE_TYPE as
|
7
|
-
import
|
8
|
-
import Y from "../context-menu-helper/
|
9
|
-
import
|
10
|
-
|
11
|
-
|
12
|
-
sheet: t,
|
1
|
+
import { jsxs as q, Fragment as A, jsx as s } from "react/jsx-runtime";
|
2
|
+
import { useMemo as y, useCallback as I } from "react";
|
3
|
+
import g from "../../../../../ui/buttons/button/button.js";
|
4
|
+
import j from "../../../../../ui/context-menu/context-menu.js";
|
5
|
+
import { useUIContext as U } from "../../../../../ui/context/context.js";
|
6
|
+
import { NODE_TYPE as V } from "../../../../constants/sheet.js";
|
7
|
+
import W from "../context-menu-helper/menu-element/menu-element.js";
|
8
|
+
import Y from "../context-menu-helper/target-element/target-element.js";
|
9
|
+
import { MENU_OPTIONS as E } from "./student-actions-constant.js";
|
10
|
+
const K = ({
|
11
|
+
sheet: v,
|
13
12
|
isDefocused: o,
|
14
|
-
isLastSheet:
|
15
|
-
...
|
13
|
+
isLastSheet: C,
|
14
|
+
...N
|
16
15
|
}) => {
|
17
|
-
const { teacherId:
|
18
|
-
can_start:
|
19
|
-
can_resume:
|
16
|
+
const { teacherId: _, milestoneId: a, section: m, onStart: d, onResume: c, onReattempt: u, onReview: p } = N, { permissions: x, node_id: l, user_node_id: e, node_type: M } = v, {
|
17
|
+
can_start: r,
|
18
|
+
can_resume: f,
|
20
19
|
can_review: h,
|
21
|
-
can_reattempt:
|
22
|
-
is_review_disabled:
|
23
|
-
} =
|
24
|
-
const
|
25
|
-
teacher_id:
|
26
|
-
node_id:
|
20
|
+
can_reattempt: w,
|
21
|
+
is_review_disabled: R
|
22
|
+
} = x, t = M === V.DYNAMIC ? e : l, { onEvent: b } = U(), i = y(() => {
|
23
|
+
const n = {
|
24
|
+
teacher_id: _,
|
25
|
+
node_id: l,
|
27
26
|
user_node_id: e
|
28
27
|
};
|
29
|
-
return
|
30
|
-
}, [
|
31
|
-
if (!
|
28
|
+
return a && (n.milestone_id = a), m && (n.section = m), n;
|
29
|
+
}, [a, l, m, _, e]), T = I(() => {
|
30
|
+
if (!t)
|
32
31
|
throw new Error("No required id is present to open the sheet.");
|
33
|
-
if (
|
34
|
-
|
32
|
+
if (r && typeof d == "function") {
|
33
|
+
d(t, e);
|
35
34
|
return;
|
36
35
|
}
|
37
|
-
if (
|
38
|
-
|
36
|
+
if (f && typeof c == "function") {
|
37
|
+
c(t, e);
|
39
38
|
return;
|
40
39
|
}
|
41
40
|
throw new Error("No callback provided. If provided it must be a function");
|
42
|
-
}, [
|
43
|
-
(
|
44
|
-
if (
|
45
|
-
...
|
46
|
-
cta:
|
47
|
-
}),
|
41
|
+
}, [f, r, t, c, d, e]), S = I(
|
42
|
+
(n) => {
|
43
|
+
if (b("clicked", {
|
44
|
+
...i,
|
45
|
+
cta: n
|
46
|
+
}), n === E.REVIEW) {
|
48
47
|
if (!e)
|
49
48
|
throw new Error("No required id is present to open the sheet.");
|
50
|
-
if (typeof
|
49
|
+
if (typeof p != "function")
|
51
50
|
throw new Error("onReview must be a function");
|
52
|
-
|
51
|
+
p(e);
|
53
52
|
return;
|
54
53
|
}
|
55
|
-
if (!
|
54
|
+
if (!t)
|
56
55
|
throw new Error("No required id is present to open the sheet.");
|
57
|
-
if (typeof
|
56
|
+
if (typeof u != "function")
|
58
57
|
throw new Error("onReattempt must be a function");
|
59
|
-
|
58
|
+
u(t, e);
|
60
59
|
},
|
61
|
-
[
|
62
|
-
),
|
60
|
+
[i, t, u, p, b, e]
|
61
|
+
), k = r || f, O = !o && w || h, P = y(
|
63
62
|
() => [
|
64
63
|
{
|
65
64
|
show: h,
|
66
|
-
label:
|
67
|
-
disable:
|
65
|
+
label: E.REVIEW,
|
66
|
+
disable: R
|
68
67
|
},
|
69
68
|
{
|
70
|
-
show: !o &&
|
71
|
-
label:
|
69
|
+
show: !o && w,
|
70
|
+
label: E.REATTEMPT
|
72
71
|
}
|
73
72
|
],
|
74
|
-
[
|
73
|
+
[w, h, o, R]
|
75
74
|
);
|
76
|
-
return /* @__PURE__ */ A
|
77
|
-
|
78
|
-
|
75
|
+
return /* @__PURE__ */ q(A, { children: [
|
76
|
+
k && /* @__PURE__ */ s(
|
77
|
+
g,
|
79
78
|
{
|
80
|
-
label:
|
79
|
+
label: r ? "Start" : "Resume",
|
81
80
|
widthX: 7,
|
82
81
|
renderAs: "primary",
|
83
82
|
size: "xsmall",
|
84
|
-
onClick:
|
83
|
+
onClick: T,
|
85
84
|
disabled: o,
|
86
|
-
analyticsProps:
|
85
|
+
analyticsProps: i,
|
87
86
|
shape: "square"
|
88
87
|
}
|
89
88
|
),
|
90
|
-
|
91
|
-
|
89
|
+
O && /* @__PURE__ */ s(
|
90
|
+
j,
|
92
91
|
{
|
93
|
-
targetElement: /* @__PURE__ */ s(
|
92
|
+
targetElement: /* @__PURE__ */ s(Y, { analyticsLabel: "Sheet menu", analyticsProps: i }),
|
94
93
|
menuElement: /* @__PURE__ */ s(
|
95
|
-
|
94
|
+
W,
|
96
95
|
{
|
97
|
-
options:
|
96
|
+
options: P,
|
98
97
|
handleOnMenuOptionSelection: S
|
99
98
|
}
|
100
99
|
),
|
101
100
|
menuOffset: 10,
|
102
101
|
menuZIndex: 1,
|
103
|
-
placeTop:
|
102
|
+
placeTop: C
|
104
103
|
}
|
105
104
|
)
|
106
105
|
] });
|
107
106
|
};
|
108
107
|
export {
|
109
|
-
|
108
|
+
K as default
|
110
109
|
};
|
111
110
|
//# sourceMappingURL=student-actions.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"student-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Button from '../../../../../ui/buttons/button/button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport { NODE_TYPE } from '../../../../constants/sheet';\nimport
|
1
|
+
{"version":3,"file":"student-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Button from '../../../../../ui/buttons/button/button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport { NODE_TYPE } from '../../../../constants/sheet';\nimport MenuElement from '../context-menu-helper/menu-element/menu-element';\nimport TargetElement from '../context-menu-helper/target-element/target-element';\nimport { MENU_OPTIONS } from './student-actions-constant';\n\nconst StudentActions: FC<IRewardNActionsProps> = ({\n sheet,\n isDefocused,\n isLastSheet,\n ...restStudentActionProps\n}) => {\n const { teacherId, milestoneId, section, onStart, onResume, onReattempt, onReview } =\n restStudentActionProps;\n const { permissions, node_id: nodeId, user_node_id: userNodeId, node_type: nodeType } = sheet;\n\n const {\n can_start: canStart,\n can_resume: canResume,\n can_review: canReview,\n can_reattempt: canReattempt,\n is_review_disabled: isReviewHidden,\n } = permissions;\n\n const id = nodeType === NODE_TYPE.DYNAMIC ? userNodeId : nodeId;\n\n const { onEvent: trackEvent } = useUIContext();\n\n const analyticsProps = useMemo(() => {\n const payload: TTrackEventPayloadProps = {\n teacher_id: teacherId,\n node_id: nodeId,\n user_node_id: userNodeId,\n };\n\n if (milestoneId) {\n payload.milestone_id = milestoneId;\n }\n\n if (section) {\n payload.section = section;\n }\n\n return payload;\n }, [milestoneId, nodeId, section, teacherId, userNodeId]);\n\n const handleOnPrimaryCtaClick = useCallback(() => {\n if (!id) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n if (canStart && typeof onStart === 'function') {\n onStart(id, userNodeId);\n\n return;\n }\n\n if (canResume && typeof onResume === 'function') {\n onResume(id, userNodeId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canResume, canStart, id, onResume, onStart, userNodeId]);\n\n const handleOnMenuOptionSelection = useCallback(\n (selectedOption: string) => {\n trackEvent('clicked', {\n ...analyticsProps,\n cta: selectedOption,\n });\n if (selectedOption === MENU_OPTIONS.REVIEW) {\n if (!userNodeId) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n if (typeof onReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n onReview(userNodeId);\n\n return;\n }\n\n if (!id) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n if (typeof onReattempt !== 'function') {\n throw new Error('onReattempt must be a function');\n }\n\n onReattempt(id, userNodeId);\n\n return;\n },\n [analyticsProps, id, onReattempt, onReview, trackEvent, userNodeId],\n );\n\n const renderPrimaryCta = canStart || canResume;\n const renderContextMenu = (!isDefocused && canReattempt) || canReview;\n\n const options = useMemo(\n () => [\n {\n show: canReview,\n label: MENU_OPTIONS.REVIEW,\n disable: isReviewHidden,\n },\n {\n show: !isDefocused && canReattempt,\n label: MENU_OPTIONS.REATTEMPT,\n },\n ],\n [canReattempt, canReview, isDefocused, isReviewHidden],\n );\n\n return (\n <>\n {renderPrimaryCta && (\n <Button\n label={canStart ? 'Start' : 'Resume'}\n widthX={7}\n renderAs=\"primary\"\n size=\"xsmall\"\n onClick={handleOnPrimaryCtaClick}\n disabled={isDefocused}\n analyticsProps={analyticsProps}\n shape=\"square\"\n />\n )}\n\n {renderContextMenu && (\n <ContextMenu\n targetElement={\n <TargetElement analyticsLabel=\"Sheet menu\" analyticsProps={analyticsProps} />\n }\n menuElement={\n <MenuElement\n options={options}\n handleOnMenuOptionSelection={handleOnMenuOptionSelection}\n />\n }\n menuOffset={10}\n menuZIndex={1}\n placeTop={isLastSheet}\n />\n )}\n </>\n );\n};\n\nexport default StudentActions;\n"],"names":["StudentActions","sheet","isDefocused","isLastSheet","restStudentActionProps","teacherId","milestoneId","section","onStart","onResume","onReattempt","onReview","permissions","nodeId","userNodeId","nodeType","canStart","canResume","canReview","canReattempt","isReviewHidden","id","NODE_TYPE","trackEvent","useUIContext","analyticsProps","useMemo","payload","handleOnPrimaryCtaClick","useCallback","handleOnMenuOptionSelection","selectedOption","MENU_OPTIONS","renderPrimaryCta","renderContextMenu","options","jsxs","Fragment","jsx","Button","ContextMenu","TargetElement","MenuElement"],"mappings":";;;;;;;;;AAaA,MAAMA,IAA2C,CAAC;AAAA,EAChD,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA,EAAE,WAAAC,GAAW,aAAAC,GAAa,SAAAC,GAAS,SAAAC,GAAS,UAAAC,GAAU,aAAAC,GAAa,UAAAC,EACvE,IAAAP,GACI,EAAE,aAAAQ,GAAa,SAASC,GAAQ,cAAcC,GAAY,WAAWC,EAAa,IAAAd,GAElF;AAAA,IACJ,WAAWe;AAAA,IACX,YAAYC;AAAA,IACZ,YAAYC;AAAA,IACZ,eAAeC;AAAA,IACf,oBAAoBC;AAAA,EAClB,IAAAR,GAEES,IAAKN,MAAaO,EAAU,UAAUR,IAAaD,GAEnD,EAAE,SAASU,EAAW,IAAIC,EAAa,GAEvCC,IAAiBC,EAAQ,MAAM;AACnC,UAAMC,IAAmC;AAAA,MACvC,YAAYtB;AAAA,MACZ,SAASQ;AAAA,MACT,cAAcC;AAAA,IAAA;AAGhB,WAAIR,MACFqB,EAAQ,eAAerB,IAGrBC,MACFoB,EAAQ,UAAUpB,IAGboB;AAAA,EAAA,GACN,CAACrB,GAAaO,GAAQN,GAASF,GAAWS,CAAU,CAAC,GAElDc,IAA0BC,EAAY,MAAM;AAChD,QAAI,CAACR;AACG,YAAA,IAAI,MAAM,8CAA8C;AAG5D,QAAAL,KAAY,OAAOR,KAAY,YAAY;AAC7C,MAAAA,EAAQa,GAAIP,CAAU;AAEtB;AAAA,IACF;AAEI,QAAAG,KAAa,OA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AAAA,QACL,SAASY;AAAA,QACT,UAAU1B;AAAA,QACV,gBAAAuB;AAAA,QACA,OAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAGDS,KACC,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,eACE,gBAAAF,EAACG,GAAc,EAAA,gBAAe,cAAa,gBAAAhB,GAAgC;AAAA,QAE7E,aACE,gBAAAa;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,SAAAP;AAAA,YACA,6BAAAL;AAAA,UAAA;AAAA,QACF;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU3B;AAAA,MAAA;AAAA,IACZ;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
@@ -1,157 +1,156 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as P, Fragment as G, jsx as r } from "react/jsx-runtime";
|
2
2
|
import { useMemo as S, useCallback as C } from "react";
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import { useUIContext as
|
8
|
-
import { isV3Worksheet as N } from "../../../../utils/is-v3-worksheet.js";
|
3
|
+
import H from "../../../../../../assets/line-icons/icons/eye2.js";
|
4
|
+
import j from "../../../../../ui/buttons/button/button.js";
|
5
|
+
import q from "../../../../../ui/buttons/icon-button/icon-button.js";
|
6
|
+
import B from "../../../../../ui/context-menu/context-menu.js";
|
7
|
+
import { useUIContext as K } from "../../../../../ui/context/context.js";
|
9
8
|
import z from "../context-menu-helper/menu-element/menu-element.js";
|
10
|
-
import
|
11
|
-
import { TEACHER_MENU_OPTIONS as
|
12
|
-
const
|
13
|
-
sheet:
|
9
|
+
import V from "../context-menu-helper/target-element/target-element.js";
|
10
|
+
import { TEACHER_MENU_OPTIONS as e } from "./teacher-actions-constant.js";
|
11
|
+
const on = ({
|
12
|
+
sheet: o,
|
14
13
|
isDefocused: c,
|
15
|
-
isLastSheet:
|
16
|
-
...
|
14
|
+
isLastSheet: N,
|
15
|
+
...R
|
17
16
|
}) => {
|
18
17
|
const {
|
19
18
|
teacherId: w,
|
20
19
|
milestoneId: s,
|
21
20
|
section: l,
|
22
|
-
onReview:
|
23
|
-
onPreview:
|
21
|
+
onReview: u,
|
22
|
+
onPreview: m,
|
24
23
|
onReset: _,
|
25
24
|
onChangeLocation: A,
|
26
25
|
onMarkAsFamiliar: E,
|
27
26
|
onUnlock: I,
|
28
27
|
onUnAssignSheet: k
|
29
|
-
} =
|
28
|
+
} = R, { permissions: g, user_node_id: t, node_id: a } = o, {
|
30
29
|
can_teacher_review: y,
|
31
30
|
can_reset: f,
|
32
31
|
can_change_attempt_location: d,
|
33
32
|
can_mark_familiar: p,
|
34
|
-
can_unlock:
|
33
|
+
can_unlock: M,
|
35
34
|
can_unassign: h
|
36
|
-
} =
|
37
|
-
const
|
35
|
+
} = g, { onEvent: b } = K(), i = S(() => {
|
36
|
+
const n = {
|
38
37
|
teacher_id: w,
|
39
|
-
node_id:
|
38
|
+
node_id: a,
|
40
39
|
user_node_id: t
|
41
40
|
};
|
42
|
-
return l && (
|
43
|
-
}, [s,
|
44
|
-
(
|
45
|
-
const
|
46
|
-
...
|
47
|
-
cta:
|
41
|
+
return l && (n.section = l), s && (n.milestone_id = s), n;
|
42
|
+
}, [s, a, l, w, t]), v = C(
|
43
|
+
(n) => {
|
44
|
+
const F = {
|
45
|
+
...i,
|
46
|
+
cta: n
|
48
47
|
};
|
49
|
-
b("clicked",
|
48
|
+
b("clicked", F);
|
50
49
|
},
|
51
|
-
[b,
|
52
|
-
),
|
53
|
-
if (y && typeof
|
50
|
+
[b, i]
|
51
|
+
), O = C(() => {
|
52
|
+
if (y && typeof u == "function") {
|
54
53
|
if (!t)
|
55
54
|
throw new Error("No required id is present to open the sheet.");
|
56
|
-
|
55
|
+
u(t);
|
57
56
|
return;
|
58
57
|
}
|
59
|
-
if (typeof
|
60
|
-
|
58
|
+
if (typeof m == "function") {
|
59
|
+
m(o);
|
61
60
|
return;
|
62
61
|
}
|
63
62
|
throw new Error("No callback provided. If provided it must be a function");
|
64
|
-
}, [y,
|
65
|
-
switch (
|
66
|
-
case
|
63
|
+
}, [y, m, u, o, t]), U = (n) => {
|
64
|
+
switch (v(n), n) {
|
65
|
+
case e.CHANGE_LOCATION:
|
67
66
|
if (typeof A != "function")
|
68
67
|
throw new Error("onChangeLocation must be a function");
|
69
|
-
A(
|
68
|
+
A(o);
|
70
69
|
return;
|
71
|
-
case
|
70
|
+
case e.UNASSIGN:
|
72
71
|
if (typeof k != "function")
|
73
72
|
throw new Error("onUnAssignSheet must be a function");
|
74
73
|
if (!t)
|
75
74
|
throw new Error("No user node id is present to unassign the sheet.");
|
76
|
-
k(
|
75
|
+
k(o);
|
77
76
|
return;
|
78
|
-
case
|
77
|
+
case e.MARK_AS_FAMILIAR:
|
79
78
|
if (typeof E != "function")
|
80
79
|
throw new Error("onMarkAsFamiliar must be a function");
|
81
|
-
E(
|
80
|
+
E(a);
|
82
81
|
return;
|
83
82
|
default:
|
84
83
|
if (typeof _ != "function")
|
85
84
|
throw new Error("onReset must be a function");
|
86
|
-
_(
|
85
|
+
_(o);
|
87
86
|
return;
|
88
87
|
}
|
89
|
-
},
|
88
|
+
}, T = () => {
|
90
89
|
if (typeof I != "function")
|
91
90
|
throw new Error("onUnlock must be a function");
|
92
|
-
I(
|
93
|
-
},
|
91
|
+
I(a);
|
92
|
+
}, L = f || !c && d || p || h, x = S(
|
94
93
|
() => [
|
95
94
|
{
|
96
95
|
show: !c && d,
|
97
|
-
label:
|
96
|
+
label: e.CHANGE_LOCATION
|
98
97
|
},
|
99
98
|
{
|
100
99
|
show: f,
|
101
|
-
label:
|
100
|
+
label: e.RESET_PROGRESS
|
102
101
|
},
|
103
102
|
{
|
104
103
|
show: p,
|
105
|
-
label:
|
104
|
+
label: e.MARK_AS_FAMILIAR
|
106
105
|
},
|
107
106
|
{
|
108
107
|
show: h,
|
109
|
-
label:
|
108
|
+
label: e.UNASSIGN
|
110
109
|
}
|
111
110
|
],
|
112
111
|
[c, d, f, p, h]
|
113
112
|
);
|
114
|
-
return /* @__PURE__ */ G
|
115
|
-
|
116
|
-
|
113
|
+
return /* @__PURE__ */ P(G, { children: [
|
114
|
+
M && /* @__PURE__ */ r(
|
115
|
+
j,
|
117
116
|
{
|
118
117
|
renderAs: "primary",
|
119
118
|
label: "Assign",
|
120
119
|
size: "xsmall",
|
121
120
|
widthX: 7,
|
122
|
-
onClick:
|
123
|
-
analyticsProps:
|
121
|
+
onClick: T,
|
122
|
+
analyticsProps: i,
|
124
123
|
shape: "square"
|
125
124
|
}
|
126
125
|
),
|
127
126
|
/* @__PURE__ */ r(
|
128
|
-
|
127
|
+
q,
|
129
128
|
{
|
130
|
-
Icon:
|
129
|
+
Icon: H,
|
131
130
|
renderAs: "secondary",
|
132
131
|
analyticsLabel: "Review",
|
133
|
-
onClick:
|
132
|
+
onClick: O
|
134
133
|
}
|
135
134
|
),
|
136
|
-
|
137
|
-
|
135
|
+
L && /* @__PURE__ */ r(
|
136
|
+
B,
|
138
137
|
{
|
139
|
-
targetElement: /* @__PURE__ */ r(
|
138
|
+
targetElement: /* @__PURE__ */ r(V, { analyticsLabel: "Sheet menu", analyticsProps: i }),
|
140
139
|
menuElement: /* @__PURE__ */ r(
|
141
140
|
z,
|
142
141
|
{
|
143
|
-
options:
|
144
|
-
handleOnMenuOptionSelection:
|
142
|
+
options: x,
|
143
|
+
handleOnMenuOptionSelection: U
|
145
144
|
}
|
146
145
|
),
|
147
146
|
menuOffset: 10,
|
148
147
|
menuZIndex: 1,
|
149
|
-
placeTop:
|
148
|
+
placeTop: N
|
150
149
|
}
|
151
150
|
)
|
152
151
|
] });
|
153
152
|
};
|
154
153
|
export {
|
155
|
-
|
154
|
+
on as default
|
156
155
|
};
|
157
156
|
//# sourceMappingURL=teacher-actions.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"teacher-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Eye2Icon from '../../../../../../assets/line-icons/icons/eye2';\nimport Button from '../../../../../ui/buttons/button/button';\nimport IconButton from '../../../../../ui/buttons/icon-button/icon-button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport
|
1
|
+
{"version":3,"file":"teacher-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Eye2Icon from '../../../../../../assets/line-icons/icons/eye2';\nimport Button from '../../../../../ui/buttons/button/button';\nimport IconButton from '../../../../../ui/buttons/icon-button/icon-button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport MenuElement from '../context-menu-helper/menu-element/menu-element';\nimport TargetElement from '../context-menu-helper/target-element/target-element';\nimport { TEACHER_MENU_OPTIONS } from './teacher-actions-constant';\n\nconst TeacherActions: FC<IRewardNActionsProps> = ({\n sheet,\n isDefocused,\n isLastSheet,\n ...restTeacherActions\n}) => {\n const {\n teacherId,\n milestoneId,\n section,\n onReview,\n onPreview,\n onReset,\n onChangeLocation,\n onMarkAsFamiliar,\n onUnlock,\n onUnAssignSheet,\n } = restTeacherActions;\n const { permissions, user_node_id: userNodeId, node_id: nodeId } = sheet;\n const {\n can_teacher_review: canTeacherReview,\n can_reset: canReset,\n can_change_attempt_location: canChangeAttemptLocation,\n can_mark_familiar: canMarkFamiliar,\n can_unlock: canUnlock,\n can_unassign: canUnAssign,\n } = permissions;\n\n const { onEvent: trackEvent } = useUIContext();\n\n const trackEventPayload = useMemo(() => {\n const payload: TTrackEventPayloadProps = {\n teacher_id: teacherId,\n node_id: nodeId,\n user_node_id: userNodeId,\n };\n\n if (section) {\n payload.section = section;\n }\n\n if (milestoneId) {\n payload.milestone_id = milestoneId;\n }\n\n return payload;\n }, [milestoneId, nodeId, section, teacherId, userNodeId]);\n\n const handleTrackEvent = useCallback(\n (cta: string) => {\n const payload: TTrackEventPayloadProps = {\n ...trackEventPayload,\n cta,\n };\n\n trackEvent('clicked', payload);\n },\n [trackEvent, trackEventPayload],\n );\n\n const handleOnSheetView = useCallback(() => {\n if (canTeacherReview && typeof onReview === 'function') {\n if (!userNodeId) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n onReview(userNodeId);\n\n return;\n }\n\n if (typeof onPreview === 'function') {\n onPreview(sheet);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canTeacherReview, onPreview, onReview, sheet, userNodeId]);\n\n const handleOnMenuOptionSelection = (selectedOption: string) => {\n handleTrackEvent(selectedOption);\n switch (selectedOption) {\n case TEACHER_MENU_OPTIONS.CHANGE_LOCATION:\n if (typeof onChangeLocation !== 'function') {\n throw new Error('onChangeLocation must be a function');\n }\n\n onChangeLocation(sheet);\n\n return;\n\n case TEACHER_MENU_OPTIONS.UNASSIGN:\n if (typeof onUnAssignSheet !== 'function') {\n throw new Error('onUnAssignSheet must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('No user node id is present to unassign the sheet.');\n }\n onUnAssignSheet(sheet);\n\n return;\n\n case TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR:\n if (typeof onMarkAsFamiliar !== 'function') {\n throw new Error('onMarkAsFamiliar must be a function');\n }\n\n onMarkAsFamiliar(nodeId);\n\n return;\n\n default:\n if (typeof onReset !== 'function') {\n throw new Error('onReset must be a function');\n }\n\n onReset(sheet);\n\n return;\n }\n };\n\n const handleOnUnlock = () => {\n if (typeof onUnlock !== 'function') {\n throw new Error('onUnlock must be a function');\n }\n\n onUnlock(nodeId);\n };\n\n const renderContextMenu =\n canReset || (!isDefocused && canChangeAttemptLocation) || canMarkFamiliar || canUnAssign;\n\n const options = useMemo(\n () => [\n {\n show: !isDefocused && canChangeAttemptLocation,\n label: TEACHER_MENU_OPTIONS.CHANGE_LOCATION,\n },\n {\n show: canReset,\n label: TEACHER_MENU_OPTIONS.RESET_PROGRESS,\n },\n {\n show: canMarkFamiliar,\n label: TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR,\n },\n {\n show: canUnAssign,\n label: TEACHER_MENU_OPTIONS.UNASSIGN,\n },\n ],\n [isDefocused, canChangeAttemptLocation, canReset, canMarkFamiliar, canUnAssign],\n );\n\n return (\n <>\n {canUnlock && (\n <Button\n renderAs=\"primary\"\n label=\"Assign\"\n size=\"xsmall\"\n widthX={7}\n onClick={handleOnUnlock}\n analyticsProps={trackEventPayload}\n shape=\"square\"\n />\n )}\n\n <IconButton\n Icon={Eye2Icon}\n renderAs=\"secondary\"\n analyticsLabel={'Review'}\n onClick={handleOnSheetView}\n />\n\n {renderContextMenu && (\n <ContextMenu\n targetElement={\n <TargetElement analyticsLabel=\"Sheet menu\" analyticsProps={trackEventPayload} />\n }\n menuElement={\n <MenuElement\n options={options}\n handleOnMenuOptionSelection={handleOnMenuOptionSelection}\n />\n }\n menuOffset={10}\n menuZIndex={1}\n placeTop={isLastSheet}\n />\n )}\n </>\n );\n};\n\nexport default TeacherActions;\n"],"names":["TeacherActions","sheet","isDefocused","isLastSheet","restTeacherActions","teacherId","milestoneId","section","onReview","onPreview","onReset","onChangeLocation","onMarkAsFamiliar","onUnlock","onUnAssignSheet","permissions","userNodeId","nodeId","canTeacherReview","canReset","canChangeAttemptLocation","canMarkFamiliar","canUnlock","canUnAssign","trackEvent","useUIContext","trackEventPayload","useMemo","payload","handleTrackEvent","useCallback","cta","handleOnSheetView","handleOnMenuOptionSelection","selectedOption","TEACHER_MENU_OPTIONS","handleOnUnlock","renderContextMenu","options","jsxs","Fragment","jsx","Button","IconButton","Eye2Icon","ContextMenu","TargetElement","MenuEl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Z;AAAA,QACN,OAAOY,EAAqB;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,CAACjC,GAAakB,GAA0BD,GAAUE,GAAiBE,CAAW;AAAA,EAAA;AAGhF,SAEK,gBAAAgB,EAAAC,GAAA,EAAA,UAAA;AAAA,IACClB,KAAA,gBAAAmB;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,OAAM;AAAA,QACN,MAAK;AAAA,QACL,QAAQ;AAAA,QACR,SAASN;AAAA,QACT,gBAAgBV;AAAA,QAChB,OAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAGF,gBAAAe;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAMC;AAAA,QACN,UAAS;AAAA,QACT,gBAAgB;AAAA,QAChB,SAASZ;AAAA,MAAA;AAAA,IACX;AAAA,IAECK,KACC,gBAAAI;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,eACG,gBAAAJ,EAAAK,GAAA,EAAc,gBAAe,cAAa,gBAAgBpB,GAAmB;AAAA,QAEhF,aACE,gBAAAe;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,SAAAT;AAAA,YACA,6BAAAL;AAAA,UAAA;AAAA,QACF;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU9B;AAAA,MAAA;AAAA,IACZ;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { NODE_TYPE as E } from "../constants/sheet.js";
|
2
|
-
const
|
2
|
+
const S = [
|
3
3
|
"SAT_MATH_ASSESSMENT",
|
4
4
|
"SAT_ENGLISH_ASSESSMENT",
|
5
5
|
"SAT_MATH_RECAP",
|
6
6
|
"SAT_MATH_LEARNING",
|
7
7
|
"SAT_ENGLISH_LEARNING"
|
8
8
|
], T = [
|
9
|
-
...
|
9
|
+
...S,
|
10
10
|
E.REMEDIAL,
|
11
11
|
E.LEGACY,
|
12
12
|
E.RECAP,
|
@@ -31,18 +31,8 @@ const A = [
|
|
31
31
|
E.DIAGNOSTIC,
|
32
32
|
E.SUBJECTIVE,
|
33
33
|
E.TURING_SUBJECTIVE
|
34
|
-
]
|
35
|
-
const { node_type: n, is_worksheet_v3: S, is_lesson_v3_enabled: e } = _;
|
36
|
-
if (t === "review")
|
37
|
-
return T.includes(n);
|
38
|
-
const r = "can_start" in _ ? _.can_start : _.permissions.can_start, s = "can_reattempt" in _ ? _.can_reattempt : _.permissions.can_reattempt, o = "can_redo" in _ ? _.can_redo : !1;
|
39
|
-
return S || e ? !0 : r || s || o ? T.includes(n) : !!A.includes(n);
|
40
|
-
}, N = (_) => {
|
41
|
-
const { node_type: t, is_worksheet_v3: n, is_lesson_v3_enabled: S } = _;
|
42
|
-
return n || S || A.includes(t);
|
43
|
-
};
|
34
|
+
];
|
44
35
|
export {
|
45
|
-
|
46
|
-
N as isV3WorksheetAttempt
|
36
|
+
T as WORKSHEET_V3_NODE_TYPES
|
47
37
|
};
|
48
38
|
//# sourceMappingURL=is-v3-worksheet.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"is-v3-worksheet.js","sources":["../../../../src/features/sheets/utils/is-v3-worksheet.ts"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"file":"is-v3-worksheet.js","sources":["../../../../src/features/sheets/utils/is-v3-worksheet.ts"],"sourcesContent":["import type { TNodeTypeProps } from '../sheets-list/sheet-item/sheet-item-types';\n\nimport { NODE_TYPE } from '../constants/sheet';\n\nconst SAT_V3_NODE_TYPES: TNodeTypeProps[] = [\n 'SAT_MATH_ASSESSMENT',\n 'SAT_ENGLISH_ASSESSMENT',\n 'SAT_MATH_RECAP',\n 'SAT_MATH_LEARNING',\n 'SAT_ENGLISH_LEARNING',\n];\nconst WORKSHEET_V3_NODE_TYPES: TNodeTypeProps[] = [\n ...SAT_V3_NODE_TYPES,\n NODE_TYPE.REMEDIAL,\n NODE_TYPE.LEGACY,\n NODE_TYPE.RECAP,\n NODE_TYPE.GENERAL,\n NODE_TYPE.LEVEL3,\n NODE_TYPE.LEVEL2,\n NODE_TYPE.REVISION,\n NODE_TYPE.TARGET_PRACTICE,\n NODE_TYPE.EXTRA_PRACTICE,\n NODE_TYPE.PRACTICE,\n NODE_TYPE.LEARNING,\n NODE_TYPE.PUZZLE_EASY,\n NODE_TYPE.PUZZLE_MEDIUM,\n NODE_TYPE.PUZZLE_HARD,\n NODE_TYPE.CHAPTER_ASSESSMENT,\n NODE_TYPE.ASSESSMENT,\n NODE_TYPE.MASTERY,\n NODE_TYPE.TRIAL_DIAGNOSTIC,\n NODE_TYPE.DYNAMIC,\n NODE_TYPE.TURING_ASSESSMENT,\n NODE_TYPE.TURING_PRACTICE,\n NODE_TYPE.DIAGNOSTIC,\n NODE_TYPE.SUBJECTIVE,\n NODE_TYPE.TURING_SUBJECTIVE,\n];\n\nexport { WORKSHEET_V3_NODE_TYPES };\n"],"names":["SAT_V3_NODE_TYPES","WORKSHEET_V3_NODE_TYPES","NODE_TYPE"],"mappings":";AAIA,MAAMA,IAAsC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACMC,IAA4C;AAAA,EAChD,GAAGD;AAAA,EACHE,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AACZ;"}
|
package/dist/index.d.ts
CHANGED
@@ -1728,9 +1728,9 @@ declare interface ILPARMilestoneSheetItemCallbacks {
|
|
1728
1728
|
|
1729
1729
|
declare interface ILPARSheetCallbacks extends ISATSheetItemCallbacks {
|
1730
1730
|
onMenuActionAttempt?: (userAction: string, sheet: TLPARSheetData) => void;
|
1731
|
-
onView?: (sheet: TLPARSheetData
|
1732
|
-
onStartOrResume?: (sheet: TLPARSheetData
|
1733
|
-
onReview?: (sheet: TLPARSheetData
|
1731
|
+
onView?: (sheet: TLPARSheetData) => void;
|
1732
|
+
onStartOrResume?: (sheet: TLPARSheetData) => void;
|
1733
|
+
onReview?: (sheet: TLPARSheetData) => void;
|
1734
1734
|
}
|
1735
1735
|
|
1736
1736
|
export declare const ImageIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
@@ -2526,11 +2526,11 @@ export declare interface ISheetDataProps {
|
|
2526
2526
|
}
|
2527
2527
|
|
2528
2528
|
declare interface ISheetItemCallbackProps {
|
2529
|
-
onStart?: (nodeId: string,
|
2530
|
-
onResume?: (nodeId: string,
|
2531
|
-
onReattempt?: (nodeId: string,
|
2532
|
-
onPreview?: (sheetData: ISheetDataProps
|
2533
|
-
onReview?: (nodeId: string,
|
2529
|
+
onStart?: (nodeId: string, userNodeId?: string | null) => void;
|
2530
|
+
onResume?: (nodeId: string, userNodeId?: string | null) => void;
|
2531
|
+
onReattempt?: (nodeId: string, userNodeId?: string | null) => void;
|
2532
|
+
onPreview?: (sheetData: ISheetDataProps) => void;
|
2533
|
+
onReview?: (nodeId: string, userMilestoneId?: string) => void;
|
2534
2534
|
onChangeLocation?: (sheetData: ISheetDataProps, sheetDataType?: (typeof SHEET_DATA_TYPE)[keyof typeof SHEET_DATA_TYPE]) => void;
|
2535
2535
|
onReset?: (sheetData: ISheetDataProps, userMilestoneId?: string) => void;
|
2536
2536
|
onMarkAsFamiliar?: (nodeId: string) => void;
|
@@ -2675,10 +2675,6 @@ declare interface ISubmitModalProps_2 {
|
|
2675
2675
|
courseStream: TCourseStream;
|
2676
2676
|
}
|
2677
2677
|
|
2678
|
-
export declare const isV3Worksheet: (sheet: ISheetDataProps | TLPARSheetData, mode?: "resume" | "review") => boolean;
|
2679
|
-
|
2680
|
-
export declare const isV3WorksheetAttempt: (attempt: IWorksheetAttemptModel) => boolean;
|
2681
|
-
|
2682
2678
|
declare interface ISyncableWebGameProps {
|
2683
2679
|
joinByRoomId?: string;
|
2684
2680
|
enableSync?: boolean;
|
@@ -4981,7 +4977,6 @@ export declare const useCircleSounds: () => {
|
|
4981
4977
|
play: (key: CircleSoundKey, immediately?: boolean, loop?: boolean) => HTMLAudioElement | undefined;
|
4982
4978
|
stop: (key: CircleSoundKey, immediately?: boolean) => void;
|
4983
4979
|
playButtonSound: () => Promise<void> | undefined;
|
4984
|
-
handleVisibilityChange: () => void;
|
4985
4980
|
};
|
4986
4981
|
|
4987
4982
|
export declare const useClassTimeAlerts: ({ alertLevel, classStartedOn, classDuration, onUpdateClassTimeAlertConfig, }: IUseClassTimeAlerts) => {
|
@@ -5159,6 +5154,8 @@ export declare const WORKSHEET_QUESTIONS_GAP = 16;
|
|
5159
5154
|
|
5160
5155
|
export declare const WORKSHEET_TOP_NAVIGATION_HEIGHT = 48;
|
5161
5156
|
|
5157
|
+
export declare const WORKSHEET_V3_NODE_TYPES: TNodeTypeProps[];
|
5158
|
+
|
5162
5159
|
declare const ZINDEX: {
|
5163
5160
|
readonly CHAPTER_CROWN_ICON: 4;
|
5164
5161
|
readonly CHAPTER_PLUS_ICON: 2;
|