@cuemath/leap 2.8.60-ag3 → 2.8.60-as1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/constants/api.js +2 -3
  2. package/dist/constants/api.js.map +1 -1
  3. package/dist/features/analytics-events/whitelist-events.js +7 -9
  4. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  5. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +4 -5
  6. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
  7. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +1 -2
  8. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
  9. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +7 -7
  10. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -1
  11. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +6 -6
  12. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -1
  13. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +2 -2
  14. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -1
  15. package/dist/features/chapters-v2/utils/node-card-utils.js +18 -18
  16. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
  17. package/dist/features/homework/card-menu-options.js +22 -44
  18. package/dist/features/homework/card-menu-options.js.map +1 -1
  19. package/dist/features/homework/homework-card.js +157 -211
  20. package/dist/features/homework/homework-card.js.map +1 -1
  21. package/dist/features/homework/styles.js +30 -37
  22. package/dist/features/homework/styles.js.map +1 -1
  23. package/dist/features/milestone/create/api/goal-submit.js +1 -1
  24. package/dist/features/milestone/create/api/goal-submit.js.map +1 -1
  25. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js +1 -1
  26. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js.map +1 -1
  27. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js +1 -1
  28. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
  29. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js +1 -1
  30. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
  31. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +81 -127
  32. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -1
  33. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-item.js +41 -0
  34. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-item.js.map +1 -0
  35. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +10 -16
  36. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +1 -1
  37. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +46 -77
  38. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -1
  39. package/dist/features/recent-chapters/recent-chapters.js +31 -28
  40. package/dist/features/recent-chapters/recent-chapters.js.map +1 -1
  41. package/dist/features/sheet-v2/resource-list/resource-item.js +51 -0
  42. package/dist/features/sheet-v2/resource-list/resource-item.js.map +1 -0
  43. package/dist/features/sheet-v2/resource-list/resource-list.js +21 -40
  44. package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -1
  45. package/dist/features/sheets/resources-list/resource-item/resource-item.js.map +1 -1
  46. package/dist/features/sheets/resources-list/resource-item/styled.js +0 -1
  47. package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
  48. package/dist/features/sheets/sheets-analytics-events.js +2 -6
  49. package/dist/features/sheets/sheets-analytics-events.js.map +1 -1
  50. package/dist/index.d.ts +9 -12
  51. package/dist/index.js +326 -328
  52. package/dist/index.js.map +1 -1
  53. package/package.json +1 -1
  54. package/dist/features/homework/hw-card-list/hw-card-list.js +0 -444
  55. package/dist/features/homework/hw-card-list/hw-card-list.js.map +0 -1
  56. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +0 -10
  57. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +0 -1
@@ -1,82 +1,51 @@
1
- import { jsxs as E, jsx as t } from "react/jsx-runtime";
2
- import { h as $ } from "../../../../node_modules/humanize-plus/dist/humanize.js";
3
- import { memo as C } from "react";
4
- import S from "../../../../assets/line-icons/icons/plus2.js";
5
- import A from "../../../homework/homework-card.js";
6
- import N from "../../../ui/buttons/icon-button/icon-button.js";
7
- import w from "../../../ui/layout/flex-view.js";
8
- import { MILESTONE_WIDGET_MIN_HEIGHT as x } from "../../constants.js";
9
- import { TESTS_CREATION_ANALYTICS_EVENTS as y } from "../tests-creation/tests-creation-analytics-events.js";
10
- import { TestSheetItemWrapper as b, IconContainer as j, IconButtonCover as H } from "./test-list-view-styled.js";
11
- const M = (e) => {
12
- const o = /* @__PURE__ */ new Set();
13
- return e == null || e.forEach((r) => {
14
- o.add(r.chapter_name);
15
- }), Array.from(o).join(", ");
16
- }, G = C(
1
+ import { jsxs as _, Fragment as l, jsx as o } from "react/jsx-runtime";
2
+ import { memo as I } from "react";
3
+ import E from "../../../../assets/line-icons/icons/plus2.js";
4
+ import S from "../../../ui/buttons/icon-button/icon-button.js";
5
+ import { TESTS_CREATION_ANALYTICS_EVENTS as f } from "../tests-creation/tests-creation-analytics-events.js";
6
+ import A from "./test-list-item.js";
7
+ import { TestSheetItemWrapper as C, IconContainer as h } from "./test-list-view-styled.js";
8
+ const $ = I(
17
9
  ({
18
- milestoneId: e,
19
- studentId: o,
20
- sheets: r,
21
- userType: i,
22
- onCreateNewTest: a,
23
- isMilestoneActive: m,
24
- canUpdatedPlan: c,
25
- ...d
26
- }) => /* @__PURE__ */ E(
27
- w,
28
- {
29
- $height: x,
30
- $position: "relative",
31
- $justifyContent: "space-between",
32
- children: [
33
- /* @__PURE__ */ t(b, { children: r.map((s, p) => {
34
- const {
35
- items: l,
36
- node_id: h,
37
- sheet_time: T,
38
- total_questions: n,
39
- worksheet_id: f
40
- } = s, u = Math.ceil((T || 0) / 60), I = M(l), _ = `${typeof n == "number" ? `${n} ${$.pluralize(n, "Question")}, ` : ""}${u} Mins`;
41
- return /* @__PURE__ */ t(
42
- A,
43
- {
44
- userType: i,
45
- header: I,
46
- subHeader: _,
47
- nodeData: s,
48
- ...d
49
- },
50
- `${f}_${h}_${p}`
51
- );
52
- }) }),
53
- i === "TEACHER" && c && /* @__PURE__ */ t(
54
- j,
55
- {
56
- $flexDirection: "row",
57
- $justifyContent: "flex-end",
58
- $gapX: 1,
59
- $gutterX: 1,
60
- children: /* @__PURE__ */ t(H, { children: /* @__PURE__ */ t(
61
- N,
62
- {
63
- Icon: S,
64
- renderAs: "secondary",
65
- analyticsLabel: y.CUSTOM_TEST_CREATION_STARTED,
66
- onClick: a,
67
- disabled: !m,
68
- analyticsProps: {
69
- milestone_id: e
70
- }
71
- }
72
- ) })
73
- }
74
- )
75
- ]
76
- }
77
- )
10
+ milestoneId: r,
11
+ studentId: n,
12
+ sheets: i,
13
+ userType: t,
14
+ onCreateNewTest: m,
15
+ isMilestoneActive: s,
16
+ canUpdatedPlan: d,
17
+ ...T
18
+ }) => /* @__PURE__ */ _(l, { children: [
19
+ /* @__PURE__ */ o(C, { children: i.map((e, a) => {
20
+ const { worksheet_id: c, node_id: p } = e;
21
+ return /* @__PURE__ */ o(
22
+ A,
23
+ {
24
+ userType: t,
25
+ sheet: e,
26
+ milestoneId: r,
27
+ studentId: n,
28
+ ...T
29
+ },
30
+ `${c}_${p}_${a}`
31
+ );
32
+ }) }),
33
+ t === "TEACHER" && d && /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(
34
+ S,
35
+ {
36
+ Icon: E,
37
+ renderAs: "secondary",
38
+ analyticsLabel: f.CUSTOM_TEST_CREATION_STARTED,
39
+ onClick: m,
40
+ disabled: !s,
41
+ analyticsProps: {
42
+ milestone_id: r
43
+ }
44
+ }
45
+ ) })
46
+ ] })
78
47
  );
79
48
  export {
80
- G as default
49
+ $ as default
81
50
  };
82
51
  //# sourceMappingURL=test-list-view.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-list-view.js","sources":["../../../../../src/features/milestone/milestone-tests/test-list-v2/test-list-view.tsx"],"sourcesContent":["import type { TNodeDataTestItemsDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\nimport type { ITestSheetsList } from './types';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport { memo } from 'react';\n\nimport Plus2Icon from '../../../../assets/line-icons/icons/plus2';\nimport HomeworkCard from '../../../homework/homework-card';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { MILESTONE_WIDGET_MIN_HEIGHT } from '../../constants';\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../tests-creation/tests-creation-analytics-events';\nimport * as Styled from './test-list-view-styled';\n\nconst getTopicNameFromItems = (items?: TNodeDataTestItemsDataProps[]) => {\n const topics = new Set<string>();\n\n items?.forEach(item => {\n topics.add(item.chapter_name);\n });\n\n return Array.from(topics).join(', ');\n};\n\nconst TestSheetsList: FC<ITestSheetsList> = memo(\n ({\n milestoneId,\n studentId,\n sheets,\n userType,\n onCreateNewTest,\n isMilestoneActive,\n canUpdatedPlan,\n ...sheetCallbacks\n }) => {\n return (\n <FlexView\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n $position=\"relative\"\n $justifyContent=\"space-between\"\n >\n <Styled.TestSheetItemWrapper>\n {sheets.map((sheet, idx) => {\n const {\n items,\n node_id: nodeId,\n sheet_time: sheetTime,\n total_questions: totalQuestions,\n worksheet_id: worksheetId,\n } = sheet;\n const totalSheetTime = Math.ceil((sheetTime || 0) / 60);\n const testChapterName = getTopicNameFromItems(items);\n const subHeader = `${\n typeof totalQuestions === 'number'\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}, `\n : ''\n }${totalSheetTime} Mins`;\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n userType={userType}\n header={testChapterName}\n subHeader={subHeader}\n nodeData={sheet}\n {...sheetCallbacks}\n />\n );\n })}\n </Styled.TestSheetItemWrapper>\n\n {userType === 'TEACHER' && canUpdatedPlan && (\n <Styled.IconContainer\n $flexDirection=\"row\"\n $justifyContent=\"flex-end\"\n $gapX={1}\n $gutterX={1}\n >\n <Styled.IconButtonCover>\n <IconButton\n Icon={Plus2Icon}\n renderAs=\"secondary\"\n analyticsLabel={TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_CREATION_STARTED}\n onClick={onCreateNewTest}\n disabled={!isMilestoneActive}\n analyticsProps={{\n milestone_id: milestoneId,\n }}\n />\n </Styled.IconButtonCover>\n </Styled.IconContainer>\n )}\n </FlexView>\n );\n },\n);\n\nexport default TestSheetsList;\n"],"names":["getTopicNameFromItems","items","topics","item","TestSheetsList","memo","milestoneId","studentId","sheets","userType","onCreateNewTest","isMilestoneActive","canUpdatedPlan","sheetCallbacks","jsxs","FlexView","MILESTONE_WIDGET_MIN_HEIGHT","jsx","Styled.TestSheetItemWrapper","sheet","idx","nodeId","sheetTime","totalQuestions","worksheetId","totalSheetTime","testChapterName","subHeader","pluralize","HomeworkCard","Styled.IconContainer","Styled.IconButtonCover","IconButton","Plus2Icon","TESTS_CREATION_ANALYTICS_EVENTS"],"mappings":";;;;;;;;;;AAeA,MAAMA,IAAwB,CAACC,MAA0C;AACjE,QAAAC,wBAAa;AAEnB,SAAAD,KAAA,QAAAA,EAAO,QAAQ,CAAQE,MAAA;AACd,IAAAD,EAAA,IAAIC,EAAK,YAAY;AAAA,EAAA,IAGvB,MAAM,KAAKD,CAAM,EAAE,KAAK,IAAI;AACrC,GAEME,IAAsCC;AAAA,EAC1C,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA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AAA;AAAA,IAAA;AAAA,EAAA;AAKV;"}
1
+ {"version":3,"file":"test-list-view.js","sources":["../../../../../src/features/milestone/milestone-tests/test-list-v2/test-list-view.tsx"],"sourcesContent":["import type { ITestSheetsList } from './types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport Plus2Icon from '../../../../assets/line-icons/icons/plus2';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../tests-creation/tests-creation-analytics-events';\nimport TestListItem from './test-list-item';\nimport * as Styled from './test-list-view-styled';\n\nconst TestSheetsList: FC<ITestSheetsList> = memo(\n ({\n milestoneId,\n studentId,\n sheets,\n userType,\n onCreateNewTest,\n isMilestoneActive,\n canUpdatedPlan,\n ...sheetCallbacks\n }) => {\n return (\n <>\n <Styled.TestSheetItemWrapper>\n {sheets.map((sheet, idx) => {\n const { worksheet_id: worksheetId, node_id: nodeId } = sheet;\n\n return (\n <TestListItem\n key={`${worksheetId}_${nodeId}_${idx}`}\n userType={userType}\n sheet={sheet}\n milestoneId={milestoneId}\n studentId={studentId}\n {...sheetCallbacks}\n />\n );\n })}\n </Styled.TestSheetItemWrapper>\n\n {userType === 'TEACHER' && canUpdatedPlan && (\n <Styled.IconContainer>\n <IconButton\n Icon={Plus2Icon}\n renderAs=\"secondary\"\n analyticsLabel={TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_CREATION_STARTED}\n onClick={onCreateNewTest}\n disabled={!isMilestoneActive}\n analyticsProps={{\n milestone_id: milestoneId,\n }}\n />\n </Styled.IconContainer>\n )}\n </>\n );\n },\n);\n\nexport default TestSheetsList;\n"],"names":["TestSheetsList","memo","milestoneId","studentId","sheets","userType","onCreateNewTest","isMilestoneActive","canUpdatedPlan","sheetCallbacks","jsxs","Fragment","jsx","Styled.TestSheetItemWrapper","sheet","idx","worksheetId","nodeId","TestListItem","Styled.IconContainer","IconButton","Plus2Icon","TESTS_CREATION_ANALYTICS_EVENTS"],"mappings":";;;;;;;AAWA,MAAMA,IAAsCC;AAAA,EAC1C,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,MAIC,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EACE,YAAO,IAAI,CAACC,GAAOC,MAAQ;AAC1B,YAAM,EAAE,cAAcC,GAAa,SAASC,MAAWH;AAGrD,aAAA,gBAAAF;AAAA,QAACM;AAAA,QAAA;AAAA,UAEC,UAAAb;AAAA,UACA,OAAAS;AAAA,UACA,aAAAZ;AAAA,UACA,WAAAC;AAAA,UACC,GAAGM;AAAA,QAAA;AAAA,QALC,GAAGO,CAAW,IAAIC,CAAM,IAAIF,CAAG;AAAA,MAAA;AAAA,IAQzC,CAAA,GACH;AAAA,IAECV,MAAa,aAAaG,KACxB,gBAAAI,EAAAO,GAAA,EACC,UAAA,gBAAAP;AAAA,MAACQ;AAAA,MAAA;AAAA,QACC,MAAMC;AAAA,QACN,UAAS;AAAA,QACT,gBAAgBC,EAAgC;AAAA,QAChD,SAAShB;AAAA,QACT,UAAU,CAACC;AAAA,QACX,gBAAgB;AAAA,UACd,cAAcL;AAAA,QAChB;AAAA,MAAA;AAAA,IAAA,GAEJ;AAAA,EAEJ,EAAA,CAAA;AAGN;"}
@@ -1,40 +1,43 @@
1
- import { jsxs as s, jsx as l } from "react/jsx-runtime";
2
- import { useCallback as f, useEffect as h } from "react";
3
- import C from "../chapters/chapters-list/chapter-item/chapter-item.js";
4
- import d from "../ui/layout/flex-view.js";
5
- import u from "../ui/text/text.js";
6
- import { useGetRecentChapters as x } from "./api/get-recent-chapters.js";
7
- import { ChaptersWrapper as g } from "./recent-chapters-styled.js";
8
- const R = ({
1
+ import { jsxs as i, jsx as l } from "react/jsx-runtime";
2
+ import { useCallback as h, useEffect as d } from "react";
3
+ import u from "../chapters/chapters-list/chapter-item/chapter-item.js";
4
+ import x from "../ui/layout/flex-view.js";
5
+ import g from "../ui/text/text.js";
6
+ import { useGetRecentChapters as R } from "./api/get-recent-chapters.js";
7
+ import { ChaptersWrapper as $ } from "./recent-chapters-styled.js";
8
+ const a = ({
9
9
  studentId: r,
10
10
  courseStream: t,
11
- userType: p,
12
- onChapterClick: a
11
+ userType: m,
12
+ onChapterClick: f
13
13
  }) => {
14
- const { get: o, data: e, isProcessingFailed: m } = x(), i = f(() => {
14
+ const { get: o, data: e, isProcessingFailed: p } = R(), n = h(() => {
15
15
  o(r, void 0, { courseStream: t });
16
16
  }, [t, o, r]);
17
- return h(() => {
18
- i();
19
- }, [i]), m ? null : e && e.length > 0 ? /* @__PURE__ */ s(d, { $flexRowGapX: 1, children: [
20
- /* @__PURE__ */ s(u, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
21
- "Recent Chapters (",
17
+ return d(() => {
18
+ n();
19
+ }, [n]), p || (e == null ? void 0 : e.length) === 0 ? null : e && e.length > 0 ? /* @__PURE__ */ i(x, { $flexRowGapX: 1, children: [
20
+ /* @__PURE__ */ i(g, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
21
+ "Recent Chapters ($",
22
22
  e == null ? void 0 : e.length,
23
23
  ")"
24
24
  ] }),
25
- /* @__PURE__ */ l(g, { children: e.map((n, c) => /* @__PURE__ */ l(
26
- C,
27
- {
28
- userType: p,
29
- chapter: n,
30
- onChapterClick: a,
31
- itemIndex: c
32
- },
33
- n.id
34
- )) })
25
+ /* @__PURE__ */ l($, { children: e == null ? void 0 : e.map((s, c) => {
26
+ const { id: C } = s;
27
+ return /* @__PURE__ */ l(
28
+ u,
29
+ {
30
+ userType: m,
31
+ chapter: s,
32
+ onChapterClick: f,
33
+ itemIndex: c
34
+ },
35
+ C
36
+ );
37
+ }) })
35
38
  ] }) : null;
36
- }, G = R;
39
+ }, T = a;
37
40
  export {
38
- G as default
41
+ T as default
39
42
  };
40
43
  //# sourceMappingURL=recent-chapters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recent-chapters.js","sources":["../../../src/features/recent-chapters/recent-chapters.tsx"],"sourcesContent":["import type { IChaptersListProps } from '../chapters/chapters-list/chapters-list-types';\nimport type { TCourseStream } from '../milestone/create/milestone-create-types';\nimport type { TUserTypes } from '../ui/types';\nimport type { FC } from 'react';\n\nimport { useCallback, useEffect } from 'react';\n\nimport ChapterItem from '../chapters/chapters-list/chapter-item/chapter-item';\nimport FlexView from '../ui/layout/flex-view';\nimport Text from '../ui/text/text';\nimport { useGetRecentChapters } from './api/get-recent-chapters';\nimport * as Styled from './recent-chapters-styled';\n\ninterface RecentChaptersProps {\n studentId: string;\n courseStream: TCourseStream;\n userType: TUserTypes;\n onChapterClick: IChaptersListProps['onChapterClick'];\n}\n\nconst RecentChapters: FC<RecentChaptersProps> = ({\n studentId,\n courseStream,\n userType,\n onChapterClick,\n}) => {\n const { get: getChapters, data: chapterData, isProcessingFailed } = useGetRecentChapters();\n\n const fetchChapterDetails = useCallback(() => {\n getChapters(studentId, undefined, { courseStream });\n }, [courseStream, getChapters, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n if (isProcessingFailed) {\n return null;\n }\n\n if (chapterData && chapterData.length > 0) {\n return (\n <FlexView $flexRowGapX={1}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Recent Chapters ({chapterData?.length})\n </Text>\n <Styled.ChaptersWrapper>\n {chapterData.map((chapter, idx) => (\n <ChapterItem\n key={chapter.id}\n userType={userType as 'TEACHER' | 'STUDENT'}\n chapter={chapter}\n onChapterClick={onChapterClick}\n itemIndex={idx}\n />\n ))}\n </Styled.ChaptersWrapper>\n </FlexView>\n );\n }\n\n return null;\n};\n\nexport default RecentChapters;\n"],"names":["RecentChapters","studentId","courseStream","userType","onChapterClick","getChapters","chapterData","isProcessingFailed","useGetRecentChapters","fetchChapterDetails","useCallback","useEffect","jsxs","FlexView","Text","jsx","Styled.ChaptersWrapper","chapter","idx","ChapterItem","RecentChapters$1"],"mappings":";;;;;;;AAoBA,MAAMA,IAA0C,CAAC;AAAA,EAC/C,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AACF,MAAM;AACJ,QAAM,EAAE,KAAKC,GAAa,MAAMC,GAAa,oBAAAC,EAAA,IAAuBC,KAE9DC,IAAsBC,EAAY,MAAM;AAC5C,IAAAL,EAAYJ,GAAW,QAAW,EAAE,cAAAC,EAAc,CAAA;AAAA,EACjD,GAAA,CAACA,GAAcG,GAAaJ,CAAS,CAAC;AAMzC,SAJAU,EAAU,MAAM;AACM,IAAAF;EAAA,GACnB,CAACA,CAAmB,CAAC,GAEpBF,IACK,OAGLD,KAAeA,EAAY,SAAS,IAEpC,gBAAAM,EAACC,GAAS,EAAA,cAAc,GACtB,UAAA;AAAA,IAAA,gBAAAD,EAACE,GAAK,EAAA,WAAU,aAAY,QAAO,cAAa,UAAA;AAAA,MAAA;AAAA,MAC5BR,KAAA,gBAAAA,EAAa;AAAA,MAAO;AAAA,IAAA,GACxC;AAAA,IACA,gBAAAS,EAACC,GAAA,EACE,YAAY,IAAI,CAACC,GAASC,MACzB,gBAAAH;AAAA,MAACI;AAAA,MAAA;AAAA,QAEC,UAAAhB;AAAA,QACA,SAAAc;AAAA,QACA,gBAAAb;AAAA,QACA,WAAWc;AAAA,MAAA;AAAA,MAJND,EAAQ;AAAA,IAMhB,CAAA,GACH;AAAA,EACF,EAAA,CAAA,IAIG;AACT,GAEAG,IAAepB;"}
1
+ {"version":3,"file":"recent-chapters.js","sources":["../../../src/features/recent-chapters/recent-chapters.tsx"],"sourcesContent":["import type { IChaptersListProps } from '../chapters/chapters-list/chapters-list-types';\nimport type { TCourseStream } from '../milestone/create/milestone-create-types';\nimport type { TUserTypes } from '../ui/types';\nimport type { FC } from 'react';\n\nimport { useCallback, useEffect } from 'react';\n\nimport ChapterItem from '../chapters/chapters-list/chapter-item/chapter-item';\nimport FlexView from '../ui/layout/flex-view';\nimport Text from '../ui/text/text';\nimport { useGetRecentChapters } from './api/get-recent-chapters';\nimport * as Styled from './recent-chapters-styled';\n// IChaptersListProps['onChapterClick']\n\ninterface RecentChaptersProps {\n studentId: string;\n courseStream: TCourseStream;\n userType: TUserTypes;\n onChapterClick: IChaptersListProps['onChapterClick'];\n}\n\nconst RecentChapters: FC<RecentChaptersProps> = ({\n studentId,\n courseStream,\n userType,\n onChapterClick,\n}) => {\n const { get: getChapters, data: chapterData, isProcessingFailed } = useGetRecentChapters();\n\n const fetchChapterDetails = useCallback(() => {\n getChapters(studentId, undefined, { courseStream });\n }, [courseStream, getChapters, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n if (isProcessingFailed || chapterData?.length === 0) {\n return null;\n }\n\n if (chapterData && chapterData.length > 0) {\n return (\n <FlexView $flexRowGapX={1}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Recent Chapters (${chapterData?.length})\n </Text>\n <Styled.ChaptersWrapper>\n {chapterData?.map((chapter, idx) => {\n const { id } = chapter;\n\n return (\n <ChapterItem\n key={id}\n userType={userType as 'TEACHER' | 'STUDENT'}\n chapter={chapter}\n onChapterClick={onChapterClick}\n itemIndex={idx}\n />\n );\n })}\n </Styled.ChaptersWrapper>\n </FlexView>\n );\n }\n\n return null;\n};\n\nexport default RecentChapters;\n"],"names":["RecentChapters","studentId","courseStream","userType","onChapterClick","getChapters","chapterData","isProcessingFailed","useGetRecentChapters","fetchChapterDetails","useCallback","useEffect","jsxs","FlexView","Text","jsx","Styled.ChaptersWrapper","chapter","idx","id","ChapterItem","RecentChapters$1"],"mappings":";;;;;;;AAqBA,MAAMA,IAA0C,CAAC;AAAA,EAC/C,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AACF,MAAM;AACJ,QAAM,EAAE,KAAKC,GAAa,MAAMC,GAAa,oBAAAC,EAAA,IAAuBC,KAE9DC,IAAsBC,EAAY,MAAM;AAC5C,IAAAL,EAAYJ,GAAW,QAAW,EAAE,cAAAC,EAAc,CAAA;AAAA,EACjD,GAAA,CAACA,GAAcG,GAAaJ,CAAS,CAAC;AAMrC,SAJJU,EAAU,MAAM;AACM,IAAAF;EAAA,GACnB,CAACA,CAAmB,CAAC,GAEpBF,MAAsBD,KAAA,gBAAAA,EAAa,YAAW,IACzC,OAGLA,KAAeA,EAAY,SAAS,IAEpC,gBAAAM,EAACC,GAAS,EAAA,cAAc,GACtB,UAAA;AAAA,IAAA,gBAAAD,EAACE,GAAK,EAAA,WAAU,aAAY,QAAO,cAAa,UAAA;AAAA,MAAA;AAAA,MAC3BR,KAAA,gBAAAA,EAAa;AAAA,MAAO;AAAA,IAAA,GACzC;AAAA,IACA,gBAAAS,EAACC,GAAA,EACE,iCAAa,IAAI,CAACC,GAASC,MAAQ;AAC5B,YAAA,EAAE,IAAAC,EAAO,IAAAF;AAGb,aAAA,gBAAAF;AAAA,QAACK;AAAA,QAAA;AAAA,UAEC,UAAAjB;AAAA,UACA,SAAAc;AAAA,UACA,gBAAAb;AAAA,UACA,WAAWc;AAAA,QAAA;AAAA,QAJNC;AAAA,MAAA;AAAA,IAOV,IACH;AAAA,EACF,EAAA,CAAA,IAIG;AACT,GAEAE,IAAerB;"}
@@ -0,0 +1,51 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { h as m } from "../../../node_modules/humanize-plus/dist/humanize.js";
3
+ import { memo as n, useMemo as u } from "react";
4
+ import c from "../../homework/homework-card.js";
5
+ const i = (e) => {
6
+ const {
7
+ sheet_time: o,
8
+ node_type: r,
9
+ total_questions: t
10
+ } = e || {};
11
+ switch (r) {
12
+ case "ASSESSMENT":
13
+ case "MASTERY":
14
+ case "DYNAMIC":
15
+ return `${typeof t == "number" ? `${t} ${m.pluralize(t, "Question")}` : ""}${o ? `, ${o / 60} min` : ""}`;
16
+ case "PUZZLE_EASY":
17
+ case "PUZZLE_HARD":
18
+ case "PUZZLE_MEDIUM":
19
+ case "PUZZLE":
20
+ return "";
21
+ default:
22
+ return "";
23
+ }
24
+ }, f = n(({ sheet: e, userType: o, ...r }) => {
25
+ const {
26
+ // accuracy,
27
+ // permissions,
28
+ title: t
29
+ // state: sheetState,
30
+ // user_node_id: userNodeId,
31
+ // node_type: nodeType,
32
+ // image_url: imageUrl,
33
+ // image_hue: imageHue,
34
+ // due_date_ts: dueDateTs,
35
+ // card_header: cardHeader = '',
36
+ } = e, s = u(() => i(e), [e]);
37
+ return /* @__PURE__ */ a(
38
+ c,
39
+ {
40
+ header: t,
41
+ subHeader: s,
42
+ userType: o,
43
+ nodeData: e,
44
+ ...r
45
+ }
46
+ );
47
+ });
48
+ export {
49
+ f as default
50
+ };
51
+ //# sourceMappingURL=resource-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-item.js","sources":["../../../../src/features/sheet-v2/resource-list/resource-item.tsx"],"sourcesContent":["import type { INodeDataProps } from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { IResourceItemProps } from './types';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport { memo, useMemo } from 'react';\n\nimport HomeworkCard from '../../homework/homework-card';\n// import Clickable from '../../ui/buttons/clickable/clickable';\n\nconst getSubHeader = (sheet: INodeDataProps) => {\n const {\n sheet_time: sheetTime,\n node_type: nodeType,\n total_questions: totalQuestions,\n } = sheet || {};\n\n switch (nodeType) {\n case 'ASSESSMENT':\n case 'MASTERY':\n case 'DYNAMIC':\n return `${\n typeof totalQuestions === 'number'\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}`\n : ''\n }${sheetTime ? `, ${sheetTime / 60} min` : ''}`;\n case 'PUZZLE_EASY':\n case 'PUZZLE_HARD':\n case 'PUZZLE_MEDIUM':\n case 'PUZZLE':\n return '';\n default:\n return '';\n }\n};\n\nconst ResourceItem: FC<IResourceItemProps> = memo(({ sheet, userType, ...resProps }) => {\n const {\n // accuracy,\n // permissions,\n title,\n // state: sheetState,\n // user_node_id: userNodeId,\n // node_type: nodeType,\n // image_url: imageUrl,\n // image_hue: imageHue,\n // due_date_ts: dueDateTs,\n // card_header: cardHeader = '',\n } = sheet;\n // const {\n // can_start: canStart,\n // can_resume: canResume,\n // can_review: canReview,\n // can_teacher_review: canTeacherReview,\n // } = permissions;\n // const isStudent = userType === 'STUDENT';\n // const canReviewSheet = isStudent ? canReview : canTeacherReview;\n const subHeader = useMemo(() => getSubHeader(sheet), [sheet]);\n\n // const handleOnClick = useCallback(() => {\n // if (isStudent && (canStart || canResume)) {\n // if (typeof onNodeAttempt === 'function') {\n // onNodeAttempt(sheet);\n\n // return;\n // }\n\n // throw new Error('No callback is available');\n // }\n\n // if (canReviewSheet) {\n // if (typeof onNodeReview !== 'function') {\n // throw new Error('onReview must be a function');\n // }\n\n // if (!userNodeId) {\n // throw new Error('user node id must be present to review the sheet');\n // }\n\n // onNodeReview(sheet);\n\n // return;\n // }\n\n // if (typeof onNodeView !== 'function') {\n // throw new Error('onPreview must be a function');\n // }\n\n // onNodeView(sheet);\n // }, [\n // canResume,\n // canReviewSheet,\n // canStart,\n // isStudent,\n // onNodeAttempt,\n // onNodeReview,\n // onNodeView,\n // sheet,\n // userNodeId,\n // ]);\n\n return (\n <HomeworkCard\n header={title}\n subHeader={subHeader}\n userType={userType}\n nodeData={sheet}\n {...resProps}\n />\n );\n});\n\nexport default ResourceItem;\n"],"names":["getSubHeader","sheet","sheetTime","nodeType","totalQuestions","pluralize","ResourceItem","memo","userType","resProps","title","subHeader","useMemo","jsx","HomeworkCard"],"mappings":";;;;AAUA,MAAMA,IAAe,CAACC,MAA0B;AACxC,QAAA;AAAA,IACJ,YAAYC;AAAA,IACZ,WAAWC;AAAA,IACX,iBAAiBC;AAAA,EAAA,IACfH,KAAS,CAAA;AAEb,UAAQE,GAAU;AAAA,IAChB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO,GACL,OAAOC,KAAmB,WACtB,GAAGA,CAAc,IAAIC,YAAUD,GAAgB,UAAU,CAAC,KAC1D,EACN,GAAGF,IAAY,KAAKA,IAAY,EAAE,SAAS,EAAE;AAAA,IAC/C,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACI,aAAA;AAAA,IACT;AACS,aAAA;AAAA,EACX;AACF,GAEMI,IAAuCC,EAAK,CAAC,EAAE,OAAAN,GAAO,UAAAO,GAAU,GAAGC,QAAe;AAChF,QAAA;AAAA;AAAA;AAAA,IAGJ,OAAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQE,IAAAT,GASEU,IAAYC,EAAQ,MAAMZ,EAAaC,CAAK,GAAG,CAACA,CAAK,CAAC;AA6C1D,SAAA,gBAAAY;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,QAAQJ;AAAA,MACR,WAAAC;AAAA,MACA,UAAAH;AAAA,MACA,UAAUP;AAAA,MACT,GAAGQ;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC;"}
@@ -1,49 +1,30 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { h as c } from "../../../node_modules/humanize-plus/dist/humanize.js";
3
- import { memo as p } from "react";
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { memo as p, useRef as c } from "react";
4
3
  import u from "styled-components";
5
- import l from "../../homework/homework-card.js";
6
- import f from "../../ui/layout/flex-view.js";
7
- const E = u.div`
4
+ import a from "../../ui/layout/flex-view.js";
5
+ import f from "./resource-item.js";
6
+ const l = u.div`
8
7
  display: grid;
9
8
  grid-template-columns: repeat(3, 200px);
10
9
  grid-gap: 32px;
11
10
  justify-content: center;
12
11
  padding: 32px 0;
13
- `, _ = (r) => {
14
- const {
15
- sheet_time: t,
16
- node_type: o,
17
- total_questions: e
18
- } = r || {};
19
- switch (o) {
20
- case "ASSESSMENT":
21
- case "MASTERY":
22
- case "DYNAMIC":
23
- return `${typeof e == "number" ? `${e} ${c.pluralize(e, "Question")}, ${t ? `${t / 60} min` : ""}` : ""}`;
24
- case "PUZZLE_EASY":
25
- case "PUZZLE_HARD":
26
- case "PUZZLE_MEDIUM":
27
- case "PUZZLE":
28
- return "";
29
- default:
30
- return "";
31
- }
32
- }, $ = ({ sheets: r, userType: t, ...o }) => /* @__PURE__ */ s(f, { children: /* @__PURE__ */ s(E, { children: r.map((e, i) => {
33
- const { title: n, node_id: a, worksheet_id: d } = e, m = _(e);
34
- return /* @__PURE__ */ s(
35
- l,
36
- {
37
- header: n,
38
- subHeader: m,
39
- userType: t,
40
- nodeData: e,
41
- ...o
42
- },
43
- `${d}_${a}_${i}`
44
- );
45
- }) }) }), y = p($);
12
+ `, h = p(({ sheets: t, userType: o, ...i }) => {
13
+ const s = c(null);
14
+ return /* @__PURE__ */ e(a, { ref: s, children: /* @__PURE__ */ e(l, { children: t.map((r, n) => {
15
+ const { worksheet_id: d, node_id: m } = r;
16
+ return /* @__PURE__ */ e(
17
+ f,
18
+ {
19
+ sheet: r,
20
+ userType: o,
21
+ ...i
22
+ },
23
+ `${d}_${m}_${n}`
24
+ );
25
+ }) }) });
26
+ });
46
27
  export {
47
- y as default
28
+ h as default
48
29
  };
49
30
  //# sourceMappingURL=resource-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resource-list.js","sources":["../../../../src/features/sheet-v2/resource-list/resource-list.tsx"],"sourcesContent":["import type { INodeDataProps } from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { IResourcesListProps } from './types';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport { memo } from 'react';\nimport styled from 'styled-components';\n\nimport HomeworkCard from '../../homework/homework-card';\nimport FlexView from '../../ui/layout/flex-view';\n\nconst ResourceItemListWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(3, 200px);\n grid-gap: 32px;\n justify-content: center;\n padding: 32px 0;\n`;\n\nconst getSubHeader = (sheet: INodeDataProps) => {\n const {\n sheet_time: sheetTime,\n node_type: nodeType,\n total_questions: totalQuestions,\n } = sheet || {};\n\n switch (nodeType) {\n case 'ASSESSMENT':\n case 'MASTERY':\n case 'DYNAMIC':\n return `${\n typeof totalQuestions === 'number'\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}, ${\n sheetTime ? `${sheetTime / 60} min` : ''\n }`\n : ''\n }`;\n case 'PUZZLE_EASY':\n case 'PUZZLE_HARD':\n case 'PUZZLE_MEDIUM':\n case 'PUZZLE':\n return '';\n default:\n return '';\n }\n};\n\nconst ResourcesList: FC<IResourcesListProps> = ({ sheets, userType, ...sheetCallBacks }) => (\n <FlexView>\n <ResourceItemListWrapper>\n {sheets.map((sheet, idx) => {\n const { title, node_id: nodeId, worksheet_id: worksheetId } = sheet;\n const subHeader = getSubHeader(sheet);\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n header={title}\n subHeader={subHeader}\n userType={userType}\n nodeData={sheet}\n {...sheetCallBacks}\n />\n );\n })}\n </ResourceItemListWrapper>\n </FlexView>\n);\n\nexport default memo(ResourcesList);\n"],"names":["ResourceItemListWrapper","styled","getSubHeader","sheet","sheetTime","nodeType","totalQuestions","pluralize","ResourcesList","sheets","userType","sheetCallBacks","jsx","FlexView","idx","title","nodeId","worksheetId","subHeader","HomeworkCard","ResourcesList$1","memo"],"mappings":";;;;;;AAWA,MAAMA,IAA0BC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAe,CAACC,MAA0B;AACxC,QAAA;AAAA,IACJ,YAAYC;AAAA,IACZ,WAAWC;AAAA,IACX,iBAAiBC;AAAA,EAAA,IACfH,KAAS,CAAA;AAEb,UAAQE,GAAU;AAAA,IAChB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO,GACL,OAAOC,KAAmB,WACtB,GAAGA,CAAc,IAAIC,YAAUD,GAAgB,UAAU,CAAC,KACxDF,IAAY,GAAGA,IAAY,EAAE,SAAS,EACxC,KACA,EACN;AAAA,IACF,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACI,aAAA;AAAA,IACT;AACS,aAAA;AAAA,EACX;AACF,GAEMI,IAAyC,CAAC,EAAE,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,EAAe,MACnF,gBAAAC,EAAAC,GAAA,EACC,4BAACb,GACE,EAAA,UAAAS,EAAO,IAAI,CAACN,GAAOW,MAAQ;AAC1B,QAAM,EAAE,OAAAC,GAAO,SAASC,GAAQ,cAAcC,EAAgB,IAAAd,GACxDe,IAAYhB,EAAaC,CAAK;AAGlC,SAAA,gBAAAS;AAAA,IAACO;AAAA,IAAA;AAAA,MAEC,QAAQJ;AAAA,MACR,WAAAG;AAAA,MACA,UAAAR;AAAA,MACA,UAAUP;AAAA,MACT,GAAGQ;AAAA,IAAA;AAAA,IALC,GAAGM,CAAW,IAAID,CAAM,IAAIF,CAAG;AAAA,EAAA;AAQ1C,CAAC,GACH,EACF,CAAA,GAGaM,IAAAC,EAAKb,CAAa;"}
1
+ {"version":3,"file":"resource-list.js","sources":["../../../../src/features/sheet-v2/resource-list/resource-list.tsx"],"sourcesContent":["import type { IResourcesListProps } from './types';\nimport type { FC } from 'react';\n\nimport { useRef, memo } from 'react';\nimport styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport ResourceItem from './resource-item';\n\nconst ResourceItemListWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(3, 200px);\n grid-gap: 32px;\n justify-content: center;\n padding: 32px 0;\n`;\n\nconst ResourcesList: FC<IResourcesListProps> = memo(({ sheets, userType, ...sheetCallBacks }) => {\n const resourceListContainerRef = useRef<HTMLDivElement>(null);\n\n return (\n <FlexView ref={resourceListContainerRef}>\n <ResourceItemListWrapper>\n {sheets.map((sheet, idx) => {\n const { worksheet_id: worksheetId, node_id: nodeId } = sheet;\n\n return (\n <ResourceItem\n key={`${worksheetId}_${nodeId}_${idx}`}\n sheet={sheet}\n userType={userType}\n {...sheetCallBacks}\n />\n );\n })}\n </ResourceItemListWrapper>\n </FlexView>\n );\n});\n\nexport default ResourcesList;\n"],"names":["ResourceItemListWrapper","styled","ResourcesList","memo","sheets","userType","sheetCallBacks","resourceListContainerRef","useRef","jsx","FlexView","sheet","idx","worksheetId","nodeId","ResourceItem"],"mappings":";;;;;AASA,MAAMA,IAA0BC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAyCC,EAAK,CAAC,EAAE,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,QAAqB;AACzF,QAAAC,IAA2BC,EAAuB,IAAI;AAG1D,SAAA,gBAAAC,EAACC,GAAS,EAAA,KAAKH,GACb,UAAA,gBAAAE,EAACT,KACE,UAAOI,EAAA,IAAI,CAACO,GAAOC,MAAQ;AAC1B,UAAM,EAAE,cAAcC,GAAa,SAASC,MAAWH;AAGrD,WAAA,gBAAAF;AAAA,MAACM;AAAA,MAAA;AAAA,QAEC,OAAAJ;AAAA,QACA,UAAAN;AAAA,QACC,GAAGC;AAAA,MAAA;AAAA,MAHC,GAAGO,CAAW,IAAIC,CAAM,IAAIF,CAAG;AAAA,IAAA;AAAA,EAItC,CAEH,GACH,EACF,CAAA;AAEJ,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"resource-item.js","sources":["../../../../../src/features/sheets/resources-list/resource-item/resource-item.tsx"],"sourcesContent":["import type { IMenuOptionsProps } from './context-menu-helper/menu-element-types';\nimport type { IResourceItemProps } from './types';\nimport type { FC } from 'react';\n\nimport { useCallback, useLayoutEffect, useRef, memo, useState, useMemo } from 'react';\n\nimport Minus2Icon from '../../../../assets/line-icons/icons/minus2';\nimport Plus2Icon from '../../../../assets/line-icons/icons/plus2';\nimport RedoIcon from '../../../../assets/line-icons/icons/redo';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport ContextMenu from '../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../ui/context/context';\nimport FlexView from '../../../ui/layout/flex-view';\nimport SheetButton from '../../comps/sheet-button';\nimport ContextMenuTargetElement from '../../lessons-list/lesson-item/context-menu-helper/target-element';\nimport { SHEETS_ANALYTICS_EVENTS } from '../../sheets-analytics-events';\nimport { TEACHER_MENU_OPTIONS } from '../../sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant';\nimport { isV3Worksheet } from '../../utils/is-v3-worksheet';\nimport ContextMenuElement from './context-menu-helper/menu-element';\nimport * as Styled from './styled';\nimport {\n getResourceItemBackgroundColor,\n getResourceItemCtaInfo,\n getResourceItemCtaState,\n} from './utils';\n\nconst { UNASSIGN, REDO } = TEACHER_MENU_OPTIONS;\n\nconst ResourceItem: FC<IResourceItemProps> = memo(\n ({\n sheet,\n userType,\n isMilestoneWidget,\n userMilestoneId,\n onUnlock,\n onUnAssignSheet,\n onReset,\n onPreview,\n onReview,\n onStart,\n }) => {\n const { onClick: trackClick } = useUIContext();\n const titleTextRef = useRef<HTMLDivElement>(null);\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n\n const {\n accuracy,\n permissions,\n title,\n sheet_statement: sheetStatement,\n state: sheetState,\n node_id: nodeId,\n user_node_id: userNodeId,\n node_sub_group: nodeSubGroup,\n node_type: nodeType,\n } = sheet;\n const {\n can_start: canStart,\n can_resume: canResume,\n can_unlock: canUnlock,\n can_review: canReview,\n can_teacher_review: canTeacherReview,\n can_unassign: canUnassign,\n can_reset: canReset,\n } = permissions;\n\n const sheetAccuracy = typeof accuracy === 'number' ? `${accuracy}%` : undefined;\n const isStudent = userType === 'STUDENT';\n const canReviewSheet = isStudent ? canReview : canTeacherReview;\n\n const ctaState = getResourceItemCtaState(sheetState);\n const { label, Icon } = getResourceItemCtaInfo(nodeSubGroup) || {};\n\n const analyticsProps = useMemo(\n () => ({\n node_id: nodeId,\n node_type: nodeType,\n }),\n [nodeId, nodeType],\n );\n\n const handleAssignSheet = useCallback(() => {\n trackClick({\n analyticsLabel: SHEETS_ANALYTICS_EVENTS.RESOURCE_ASSIGNED,\n props: analyticsProps,\n });\n\n onUnlock?.(nodeId);\n }, [onUnlock, nodeId, trackClick, analyticsProps]);\n\n const handleOnClick = useCallback(() => {\n if (isStudent && (canStart || canResume)) {\n if (typeof onStart === 'function') {\n onStart(nodeId, isV3Worksheet(sheet), userNodeId);\n\n return;\n }\n\n throw new Error('No callback is available');\n }\n\n if (canReviewSheet) {\n if (typeof onReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('user node id must be present to review the sheet');\n }\n\n onReview(userNodeId, isV3Worksheet(sheet, 'review'), userMilestoneId);\n\n return;\n }\n\n if (typeof onPreview !== 'function') {\n throw new Error('onPreview must be a function');\n }\n\n onPreview(sheet, isV3Worksheet(sheet));\n }, [\n canResume,\n canReviewSheet,\n canStart,\n isStudent,\n nodeId,\n sheet,\n userMilestoneId,\n userNodeId,\n onStart,\n onReview,\n onPreview,\n ]);\n\n const handleMenuOptionClick = useCallback(\n (selectedOption: string) => {\n switch (selectedOption) {\n case UNASSIGN:\n if (typeof onUnAssignSheet !== 'function') {\n throw new Error('onUnassignSheet must be a function');\n }\n\n trackClick({\n analyticsLabel: SHEETS_ANALYTICS_EVENTS.RESOURCE_UNASSIGNED,\n props: analyticsProps,\n });\n\n onUnAssignSheet(sheet);\n\n return;\n\n case REDO:\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 [sheet, onUnAssignSheet, onReset, analyticsProps, trackClick],\n );\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, [titleTextRef]);\n\n const menuOptions: IMenuOptionsProps[] = [\n {\n id: 'supplementary_resources_unassign',\n label: 'Unassign',\n icon: <Minus2Icon width={20} height={20} />,\n option: UNASSIGN,\n visible: canUnassign,\n onClick: handleMenuOptionClick,\n },\n {\n id: 'supplementary_resources_redo',\n label: 'Redo',\n icon: <RedoIcon />,\n option: REDO,\n visible: canReset,\n onClick: handleMenuOptionClick,\n },\n ];\n\n const backgroundColor = getResourceItemBackgroundColor(\n sheetState,\n isStudent,\n canUnlock,\n !!isMilestoneWidget,\n );\n\n return (\n <Styled.ResourceItemCard\n $gapX={1}\n $gutterX={1}\n $flexGapX={1.25}\n $background={backgroundColor}\n $justifyContent=\"space-between\"\n $heightX={8}\n $isMilestoneWidget={isMilestoneWidget}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={title}\n hidden={!showTitleTooltip}\n widthX={21.75}\n >\n <Styled.ResourceItemTitle ref={titleTextRef} $renderAs=\"ab2\" $color=\"BLACK_T_87\">\n {title}\n </Styled.ResourceItemTitle>\n </ArrowTooltip>\n\n <FlexView $flexDirection=\"row\" $justifyContent=\"space-between\" $alignItems=\"center\">\n <ArrowTooltip position=\"bottom\" tooltipItem={sheetStatement} renderAs=\"secondary\">\n <SheetButton\n renderAs=\"primary\"\n label={label ?? ''}\n Icon={Icon}\n backgroundColor={backgroundColor}\n state={ctaState}\n hoverActive={false}\n onClick={handleOnClick}\n accuracy={sheetAccuracy}\n widthX={8.5}\n />\n </ArrowTooltip>\n\n {!isStudent &&\n (canUnlock ? (\n <Styled.IconButtonWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n onClick={handleAssignSheet}\n >\n <Plus2Icon />\n </Styled.IconButtonWrapper>\n ) : (\n <ContextMenu\n targetElement={<ContextMenuTargetElement invertHover />}\n menuElement={<ContextMenuElement menuOptions={menuOptions} />}\n />\n ))}\n </FlexView>\n </Styled.ResourceItemCard>\n );\n },\n);\n\nexport default ResourceItem;\n"],"names":["UNASSIGN","REDO","TEACHER_MENU_OPTIONS","ResourceItem","memo","sheet","userType","isMilestoneWidget","userMilestoneId","onUnlock","onUnAssignSheet","onReset","onPreview","onReview","onStart","trackClick","useUIContext","titleTextRef","useRef","showTitleTooltip","setShowTitleTooltip","useState","accuracy","permissions","title","sheetStatement","sheetState","nodeId","userNodeId","nodeSubGroup","nodeType","canStart","canResume","canUnlock","canReview","canTeacherReview","canUnassign","canReset","sheetAccuracy","isStudent","canReviewSheet","ctaState","getResourceItemCtaState","label","Icon","getResourceItemCtaInfo","analyticsProps","useMemo","handleAssignSheet","useCallback","SHEETS_ANALYTICS_EVENTS","handleOnClick","isV3Worksheet","handleMenuOptionClick","selectedOption","useLayoutEffect","menuOptions","jsx","Minus2Icon","RedoIcon","backgroundColor","getResourceItemBackgroundColor","jsxs","Styled.ResourceItemCard","ArrowTooltip","Styled.ResourceItemTitle","FlexView","SheetButton","Styled.IconButtonWrapper","Plus2Icon","ContextMenu","ContextMenuTargetElement","ContextMenuElement"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,MAAM,EAAE,UAAAA,GAAU,MAAAC,EAAS,IAAAC,IAErBC,KAAuCC;AAAA,EAC3C,CAAC;AAAA,IACC,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,EAAA,MACI;AACJ,UAAM,EAAE,SAASC,EAAW,IAAIC,GAAa,GACvCC,IAAeC,EAAuB,IAAI,GAC1C,CAACC,GAAkBC,CAAmB,IAAIC,EAAS,EAAK,GAExD;AAAA,MACJ,UAAAC;AAAA,MACA,aAAAC;AAAA,MACA,OAAAC;AAAA,MACA,iBAAiBC;AAAA,MACjB,OAAOC;AAAA,MACP,SAASC;AAAA,MACT,cAAcC;AAAA,MACd,gBAAgBC;AAAA,MAChB,WAAWC;AAAA,IACT,IAAAzB,GACE;AAAA,MACJ,WAAW0B;AAAA,MACX,YAAYC;AAAA,MACZ,YAAYC;AAAA,MACZ,YAAYC;AAAA,MACZ,oBAAo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AA,EAGN;AACF;"}
1
+ {"version":3,"file":"resource-item.js","sources":["../../../../../src/features/sheets/resources-list/resource-item/resource-item.tsx"],"sourcesContent":["import type { IMenuOptionsProps } from './context-menu-helper/menu-element-types';\nimport type { IResourceItemProps } from './types';\nimport type { FC } from 'react';\n\nimport { useCallback, useLayoutEffect, useRef, memo, useState, useMemo } from 'react';\n\nimport Minus2Icon from '../../../../assets/line-icons/icons/minus2';\nimport Plus2Icon from '../../../../assets/line-icons/icons/plus2';\nimport RedoIcon from '../../../../assets/line-icons/icons/redo';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport ContextMenu from '../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../ui/context/context';\nimport FlexView from '../../../ui/layout/flex-view';\nimport SheetButton from '../../comps/sheet-button';\nimport ContextMenuTargetElement from '../../lessons-list/lesson-item/context-menu-helper/target-element';\nimport { SHEETS_ANALYTICS_EVENTS } from '../../sheets-analytics-events';\nimport { TEACHER_MENU_OPTIONS } from '../../sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant';\nimport { isV3Worksheet } from '../../utils/is-v3-worksheet';\nimport ContextMenuElement from './context-menu-helper/menu-element';\nimport * as Styled from './styled';\nimport {\n getResourceItemBackgroundColor,\n getResourceItemCtaInfo,\n getResourceItemCtaState,\n} from './utils';\n\nconst { UNASSIGN, REDO } = TEACHER_MENU_OPTIONS;\n\nconst ResourceItem: FC<IResourceItemProps> = memo(\n ({\n sheet,\n userType,\n isMilestoneWidget,\n userMilestoneId,\n onUnlock,\n onUnAssignSheet,\n onReset,\n onPreview,\n onReview,\n onStart,\n }) => {\n const { onClick: trackClick } = useUIContext();\n const titleTextRef = useRef<HTMLDivElement>(null);\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n\n const {\n accuracy,\n permissions,\n title,\n sheet_statement: sheetStatement,\n state: sheetState,\n node_id: nodeId,\n user_node_id: userNodeId,\n node_sub_group: nodeSubGroup,\n node_type: nodeType,\n } = sheet;\n const {\n can_start: canStart,\n can_resume: canResume,\n can_unlock: canUnlock,\n can_review: canReview,\n can_teacher_review: canTeacherReview,\n can_unassign: canUnassign,\n can_reset: canReset,\n } = permissions;\n\n const sheetAccuracy = typeof accuracy === 'number' ? `${accuracy}%` : undefined;\n const isStudent = userType === 'STUDENT';\n const canReviewSheet = isStudent ? canReview : canTeacherReview;\n\n const ctaState = getResourceItemCtaState(sheetState);\n const { label, Icon } = getResourceItemCtaInfo(nodeSubGroup) || {};\n\n const analyticsProps = useMemo(\n () => ({\n node_id: nodeId,\n node_type: nodeType,\n }),\n [nodeId, nodeType],\n );\n\n const handleAssignSheet = useCallback(() => {\n trackClick({\n analyticsLabel: SHEETS_ANALYTICS_EVENTS.RESOURCE_ASSIGNED,\n props: analyticsProps,\n });\n\n onUnlock?.(nodeId);\n }, [onUnlock, nodeId, trackClick, analyticsProps]);\n\n const handleOnClick = useCallback(() => {\n if (isStudent && (canStart || canResume)) {\n if (typeof onStart === 'function') {\n onStart(nodeId, isV3Worksheet(sheet), userNodeId);\n\n return;\n }\n throw new Error('No callback is available');\n }\n\n if (canReviewSheet) {\n if (typeof onReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('user node id must be present to review the sheet');\n }\n onReview(userNodeId, isV3Worksheet(sheet, 'review'), userMilestoneId);\n\n return;\n }\n\n if (typeof onPreview !== 'function') {\n throw new Error('onPreview must be a function');\n }\n onPreview(sheet, isV3Worksheet(sheet));\n }, [\n canResume,\n canReviewSheet,\n canStart,\n isStudent,\n nodeId,\n sheet,\n userMilestoneId,\n userNodeId,\n onStart,\n onReview,\n onPreview,\n ]);\n\n const handleMenuOptionClick = useCallback(\n (selectedOption: string) => {\n switch (selectedOption) {\n case UNASSIGN:\n if (typeof onUnAssignSheet !== 'function') {\n throw new Error('onUnassignSheet must be a function');\n }\n\n trackClick({\n analyticsLabel: SHEETS_ANALYTICS_EVENTS.RESOURCE_UNASSIGNED,\n props: analyticsProps,\n });\n\n onUnAssignSheet(sheet);\n\n return;\n\n case REDO:\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 [sheet, onUnAssignSheet, onReset, analyticsProps, trackClick],\n );\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, [titleTextRef]);\n\n const menuOptions: IMenuOptionsProps[] = [\n {\n id: 'supplementary_resources_unassign',\n label: 'Unassign',\n icon: <Minus2Icon width={20} height={20} />,\n option: UNASSIGN,\n visible: canUnassign,\n onClick: handleMenuOptionClick,\n },\n {\n id: 'supplementary_resources_redo',\n label: 'Redo',\n icon: <RedoIcon />,\n option: REDO,\n visible: canReset,\n onClick: handleMenuOptionClick,\n },\n ];\n\n const backgroundColor = getResourceItemBackgroundColor(\n sheetState,\n isStudent,\n canUnlock,\n !!isMilestoneWidget,\n );\n\n return (\n <Styled.ResourceItemCard\n $gapX={1}\n $gutterX={1}\n $flexGapX={1.25}\n $background={backgroundColor}\n $justifyContent=\"space-between\"\n $heightX={8}\n $isMilestoneWidget={isMilestoneWidget}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={title}\n hidden={!showTitleTooltip}\n widthX={21.75}\n >\n <Styled.ResourceItemTitle ref={titleTextRef} $renderAs=\"ab2\" $color=\"BLACK_T_87\">\n {title}\n </Styled.ResourceItemTitle>\n </ArrowTooltip>\n\n <FlexView $flexDirection=\"row\" $justifyContent=\"space-between\" $alignItems=\"center\">\n <ArrowTooltip position=\"bottom\" tooltipItem={sheetStatement} renderAs=\"secondary\">\n <SheetButton\n renderAs=\"primary\"\n label={label ?? ''}\n Icon={Icon}\n backgroundColor={backgroundColor}\n state={ctaState}\n hoverActive={false}\n onClick={handleOnClick}\n accuracy={sheetAccuracy}\n widthX={8.5}\n />\n </ArrowTooltip>\n\n {!isStudent &&\n (canUnlock ? (\n <Styled.IconButtonWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n onClick={handleAssignSheet}\n >\n <Plus2Icon />\n </Styled.IconButtonWrapper>\n ) : (\n <ContextMenu\n targetElement={<ContextMenuTargetElement invertHover />}\n menuElement={<ContextMenuElement menuOptions={menuOptions} />}\n />\n ))}\n </FlexView>\n </Styled.ResourceItemCard>\n );\n },\n);\n\nexport default ResourceItem;\n"],"names":["UNASSIGN","REDO","TEACHER_MENU_OPTIONS","ResourceItem","memo","sheet","userType","isMilestoneWidget","userMilestoneId","onUnlock","onUnAssignSheet","onReset","onPreview","onReview","onStart","trackClick","useUIContext","titleTextRef","useRef","showTitleTooltip","setShowTitleTooltip","useState","accuracy","permissions","title","sheetStatement","sheetState","nodeId","userNodeId","nodeSubGroup","nodeType","canStart","canResume","canUnlock","canReview","canTeacherReview","canUnassign","canReset","sheetAccuracy","isStudent","canReviewSheet","ctaState","getResourceItemCtaState","label","Icon","getResourceItemCtaInfo","analyticsProps","useMemo","handleAssignSheet","useCallback","SHEETS_ANALYTICS_EVENTS","handleOnClick","isV3Worksheet","handleMenuOptionClick","selectedOption","useLayoutEffect","menuOptions","jsx","Minus2Icon","RedoIcon","backgroundColor","getResourceItemBackgroundColor","jsxs","Styled.ResourceItemCard","ArrowTooltip","Styled.ResourceItemTitle","FlexView","SheetButton","Styled.IconButtonWrapper","Plus2Icon","ContextMenu","ContextMenuTargetElement","ContextMenuElement"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,MAAM,EAAE,UAAAA,GAAU,MAAAC,EAAS,IAAAC,IAErBC,KAAuCC;AAAA,EAC3C,CAAC;AAAA,IACC,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,EAA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wB;AAAA,cAACW;AAAAA,cAAA;AAAA,gBACC,gBAAe;AAAA,gBACf,aAAY;AAAA,gBACZ,iBAAgB;AAAA,gBAChB,SAASpB;AAAA,gBAET,4BAACqB,IAAU,EAAA;AAAA,cAAA;AAAA,YAAA,IAGb,gBAAAZ;AAAA,cAACa;AAAA,cAAA;AAAA,gBACC,eAAe,gBAAAb,EAACc,IAAyB,EAAA,aAAW,GAAC,CAAA;AAAA,gBACrD,aAAc,gBAAAd,EAAAe,IAAA,EAAmB,aAAAhB,EAA0B,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAC7D,GAEN;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
@@ -8,7 +8,6 @@ const c = e(i)(({ theme: r, $isMilestoneWidget: o }) => {
8
8
  ${o && `
9
9
  border-top-width: 0;
10
10
  border-left-width: 0;
11
-
12
11
  &:nth-child(even) {
13
12
  border-right-width: 0;
14
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../../src/features/sheets/resources-list/resource-item/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface IResourceItemCard {\n $isMilestoneWidget?: boolean;\n}\n\nconst ResourceItemCard = styled(FlexView)<IResourceItemCard>(({ theme, $isMilestoneWidget }) => {\n const { WHITE_5 } = theme.colors;\n\n return `\n border: 1px solid ${WHITE_5};\n ${\n $isMilestoneWidget &&\n `\n border-top-width: 0;\n border-left-width: 0;\n \n &:nth-child(even) {\n border-right-width: 0;\n }\n `\n }\n `;\n});\n\nconst ResourceItemTitle = styled(Text)(() => {\n return `\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n `;\n});\n\nconst IconButtonWrapper = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n const { BLACK_T_87 } = theme.colors;\n\n return `\n width: ${gutter * 2}px;\n height: ${gutter * 2}px;\n border: 1px solid ${BLACK_T_87};\n border-radius: 50%;\n cursor: pointer;\n `;\n});\n\nexport { ResourceItemCard, ResourceItemTitle, IconButtonWrapper };\n"],"names":["ResourceItemCard","styled","FlexView","theme","$isMilestoneWidget","WHITE_5","ResourceItemTitle","Text","IconButtonWrapper","gutter","BLACK_T_87"],"mappings":";;;AASM,MAAAA,IAAmBC,EAAOC,CAAQ,EAAqB,CAAC,EAAE,OAAAC,GAAO,oBAAAC,QAAyB;AACxF,QAAA,EAAE,SAAAC,EAAQ,IAAIF,EAAM;AAEnB,SAAA;AAAA,0BACiBE,CAAO;AAAA,QAEzBD,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAQF;AAAA;AAEN,CAAC,GAEKE,IAAoBL,EAAOM,CAAI,EAAE,MAC9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOR,GAEKC,IAAoBP,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAAY;AAClD,QAAA,EAAE,QAAAM,EAAO,IAAIN,EAAM,QACnB,EAAE,YAAAO,EAAW,IAAIP,EAAM;AAEtB,SAAA;AAAA,eACMM,IAAS,CAAC;AAAA,gBACTA,IAAS,CAAC;AAAA,0BACAC,CAAU;AAAA;AAAA;AAAA;AAIpC,CAAC;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../../src/features/sheets/resources-list/resource-item/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface IResourceItemCard {\n $isMilestoneWidget?: boolean;\n}\n\nconst ResourceItemCard = styled(FlexView)<IResourceItemCard>(({ theme, $isMilestoneWidget }) => {\n const { WHITE_5 } = theme.colors;\n\n return `\n border: 1px solid ${WHITE_5};\n ${\n $isMilestoneWidget &&\n `\n border-top-width: 0;\n border-left-width: 0;\n &:nth-child(even) {\n border-right-width: 0;\n }\n `\n }\n `;\n});\n\nconst ResourceItemTitle = styled(Text)(() => {\n return `\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n `;\n});\n\nconst IconButtonWrapper = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n const { BLACK_T_87 } = theme.colors;\n\n return `\n width: ${gutter * 2}px;\n height: ${gutter * 2}px;\n border: 1px solid ${BLACK_T_87};\n border-radius: 50%;\n cursor: pointer;\n `;\n});\n\nexport { ResourceItemCard, ResourceItemTitle, IconButtonWrapper };\n"],"names":["ResourceItemCard","styled","FlexView","theme","$isMilestoneWidget","WHITE_5","ResourceItemTitle","Text","IconButtonWrapper","gutter","BLACK_T_87"],"mappings":";;;AASM,MAAAA,IAAmBC,EAAOC,CAAQ,EAAqB,CAAC,EAAE,OAAAC,GAAO,oBAAAC,QAAyB;AACxF,QAAA,EAAE,SAAAC,EAAQ,IAAIF,EAAM;AAEnB,SAAA;AAAA,0BACiBE,CAAO;AAAA,QAEzBD,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAOF;AAAA;AAEN,CAAC,GAEKE,IAAoBL,EAAOM,CAAI,EAAE,MAC9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOR,GAEKC,IAAoBP,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAAY;AAClD,QAAA,EAAE,QAAAM,EAAO,IAAIN,EAAM,QACnB,EAAE,YAAAO,EAAW,IAAIP,EAAM;AAEtB,SAAA;AAAA,eACMM,IAAS,CAAC;AAAA,gBACTA,IAAS,CAAC;AAAA,0BACAC,CAAU;AAAA;AAAA;AAAA;AAIpC,CAAC;"}
@@ -1,11 +1,7 @@
1
1
  import { PLUGINS as r } from "../../node_modules/@cuemath/analytics-v2/dist/constants.js";
2
2
  var s = /* @__PURE__ */ ((e) => (e.RESOURCE_ASSIGNED = "resource_assigned", e.RESOURCE_UNASSIGNED = "resource_unassigned", e))(s || {});
3
- const n = {
4
- resource_assigned: [r.MIXPANEL],
5
- resource_unassigned: [r.MIXPANEL]
6
- };
3
+ r.MIXPANEL, r.MIXPANEL;
7
4
  export {
8
- s as SHEETS_ANALYTICS_EVENTS,
9
- n as SHEETS_ANALYTICS_WHITELIST_EVENTS
5
+ s as SHEETS_ANALYTICS_EVENTS
10
6
  };
11
7
  //# sourceMappingURL=sheets-analytics-events.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sheets-analytics-events.js","sources":["../../../src/features/sheets/sheets-analytics-events.ts"],"sourcesContent":["import { PLUGINS } from '@cuemath/analytics-v2/dist/constants';\n\nexport enum SHEETS_ANALYTICS_EVENTS {\n RESOURCE_ASSIGNED = 'resource_assigned',\n RESOURCE_UNASSIGNED = 'resource_unassigned',\n}\n\nexport const SHEETS_ANALYTICS_WHITELIST_EVENTS = {\n [SHEETS_ANALYTICS_EVENTS.RESOURCE_ASSIGNED]: [PLUGINS.MIXPANEL],\n [SHEETS_ANALYTICS_EVENTS.RESOURCE_UNASSIGNED]: [PLUGINS.MIXPANEL],\n};\n"],"names":["SHEETS_ANALYTICS_EVENTS","SHEETS_ANALYTICS_WHITELIST_EVENTS","PLUGINS"],"mappings":";AAEY,IAAAA,sBAAAA,OACVA,EAAA,oBAAoB,qBACpBA,EAAA,sBAAsB,uBAFZA,IAAAA,KAAA,CAAA,CAAA;AAKL,MAAMC,IAAoC;AAAA,EAC9C,mBAA4C,CAACC,EAAQ,QAAQ;AAAA,EAC7D,qBAA8C,CAACA,EAAQ,QAAQ;AAClE;"}
1
+ {"version":3,"file":"sheets-analytics-events.js","sources":["../../../src/features/sheets/sheets-analytics-events.ts"],"sourcesContent":["import { PLUGINS } from '@cuemath/analytics-v2/dist/constants';\n\nexport enum SHEETS_ANALYTICS_EVENTS {\n RESOURCE_ASSIGNED = 'resource_assigned',\n RESOURCE_UNASSIGNED = 'resource_unassigned',\n}\n\nexport const SHEETS_ANALYTICS_WHITELIST_EVENTS = {\n [SHEETS_ANALYTICS_EVENTS.RESOURCE_ASSIGNED]: [PLUGINS.MIXPANEL],\n [SHEETS_ANALYTICS_EVENTS.RESOURCE_UNASSIGNED]: [PLUGINS.MIXPANEL],\n};\n"],"names":["SHEETS_ANALYTICS_EVENTS","PLUGINS"],"mappings":";AAEY,IAAAA,sBAAAA,OACVA,EAAA,oBAAoB,qBACpBA,EAAA,sBAAsB,uBAFZA,IAAAA,KAAA,CAAA,CAAA;AAMoCC,EAAQ,UACNA,EAAQ;"}
package/dist/index.d.ts CHANGED
@@ -494,12 +494,6 @@ export declare const HomeIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
494
494
 
495
495
  declare const hues: readonly ["YELLOW", "ORANGE", "PURPLE", "GREEN", "BLUE"];
496
496
 
497
- export declare const HWCardList: React_2.FC<HWCardListProps>;
498
-
499
- declare interface HWCardListProps {
500
- userType: TUserTypes;
501
- }
502
-
503
497
  declare interface IAccordionSectionProps {
504
498
  headerElement: React.ReactElement;
505
499
  bodyElement: React.ReactElement;
@@ -751,7 +745,7 @@ export declare interface IChapterBlockData {
751
745
 
752
746
  declare interface IChapterBlockPermission {
753
747
  can_skip: boolean;
754
- can_un_skip: boolean;
748
+ can_unskip: boolean;
755
749
  }
756
750
 
757
751
  export declare interface IChapterBlockV3 {
@@ -2131,7 +2125,7 @@ declare interface INodeCardCallbacks {
2131
2125
  onNodeAttempt?: (nodeData: INodeDataProps) => void;
2132
2126
  onNodeView?: (nodeData: INodeDataProps, milestoneId?: string) => void;
2133
2127
  onNodeReview?: (nodeData: INodeDataProps, milestoneId?: string) => void;
2134
- onNodeReattempt?: (nodeData: INodeDataProps, milestoneId?: string) => void;
2128
+ onNodeReattempt?: (nodeData: INodeDataProps) => void;
2135
2129
  onNodeAttemptLocationChange?: (nodeData: INodeDataProps) => void;
2136
2130
  onNodeMarkAsDone?: (nodeData: INodeDataProps) => void;
2137
2131
  onNodeReset?: (nodeData: INodeDataProps, milestoneId?: string) => void;
@@ -2965,7 +2959,13 @@ declare interface ITestsCreationProps {
2965
2959
  onError: (errorMessage?: string) => void;
2966
2960
  }
2967
2961
 
2968
- declare interface ITestsListProps {
2962
+ declare interface ITestSheetItemCallbackProps {
2963
+ onTestPreview?: (sheetData: INodeDataProps, milestoneId: string) => void;
2964
+ onTestStart?: (sheetData: INodeDataProps) => void;
2965
+ onTestReview?: (sheetData: INodeDataProps, milestoneId: string) => void;
2966
+ }
2967
+
2968
+ declare interface ITestsListProps extends ITestSheetItemCallbackProps {
2969
2969
  userType: TUserTypes;
2970
2970
  studentId: string;
2971
2971
  userMilestoneId: string;
@@ -2974,9 +2974,6 @@ declare interface ITestsListProps {
2974
2974
  isDraftMilestone?: boolean;
2975
2975
  isChaptersAvailable?: boolean;
2976
2976
  canUpdatePlan?: boolean;
2977
- onTestPreview?: (sheetData: INodeDataProps, milestoneId: string) => void;
2978
- onTestStart?: (sheetData: INodeDataProps) => void;
2979
- onTestReview?: (sheetData: INodeDataProps, milestoneId: string) => void;
2980
2977
  }
2981
2978
 
2982
2979
  declare interface ITextButtonProps extends IClickableAnalyticsProps {