@cuemath/leap 2.8.61-as13 → 2.8.61-as16

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 (29) hide show
  1. package/dist/assets/line-icons/icons/closed-eye.js +23 -0
  2. package/dist/assets/line-icons/icons/closed-eye.js.map +1 -0
  3. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +39 -39
  4. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -1
  5. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +83 -81
  6. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -1
  7. package/dist/features/chapters-v2/constants/node-constants.js.map +1 -1
  8. package/dist/features/homework/card-title.js +21 -0
  9. package/dist/features/homework/card-title.js.map +1 -0
  10. package/dist/features/homework/homework-card-view.js +133 -0
  11. package/dist/features/homework/homework-card-view.js.map +1 -0
  12. package/dist/features/homework/homework-card.js +153 -243
  13. package/dist/features/homework/homework-card.js.map +1 -1
  14. package/dist/features/homework/hw-card-list/hw-card-list-styled.js +38 -20
  15. package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +1 -1
  16. package/dist/features/homework/hw-card-list/hw-card-list.js +105 -89
  17. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  18. package/dist/features/homework/styles.js +31 -18
  19. package/dist/features/homework/styles.js.map +1 -1
  20. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +51 -52
  21. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
  22. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +36 -35
  23. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
  24. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +33 -32
  25. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -1
  26. package/dist/features/sheet-v2/resource-list/resource-list.js +25 -37
  27. package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -1
  28. package/dist/index.d.ts +13 -0
  29. package/package.json +1 -1
@@ -1,19 +1,19 @@
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 O, IconContainer as b, IconButtonCover as g } from "./test-list-view-styled.js";
11
- const j = (e) => {
1
+ import { jsxs as C, jsx as t } from "react/jsx-runtime";
2
+ import { h as S } from "../../../../node_modules/humanize-plus/dist/humanize.js";
3
+ import { memo as x } from "react";
4
+ import A from "../../../../assets/line-icons/icons/plus2.js";
5
+ import N from "../../../homework/homework-card.js";
6
+ import w from "../../../ui/buttons/icon-button/icon-button.js";
7
+ import O from "../../../ui/layout/flex-view.js";
8
+ import { MILESTONE_WIDGET_MIN_HEIGHT as g } from "../../constants.js";
9
+ import { TESTS_CREATION_ANALYTICS_EVENTS as j } from "../tests-creation/tests-creation-analytics-events.js";
10
+ import { TestSheetItemWrapper as y, IconContainer as H, IconButtonCover as M } from "./test-list-view-styled.js";
11
+ const R = (e) => {
12
12
  const o = /* @__PURE__ */ new Set();
13
13
  return e == null || e.forEach((r) => {
14
14
  o.add(r.chapter_name);
15
15
  }), Array.from(o).join(", ");
16
- }, G = C(
16
+ }, V = x(
17
17
  ({
18
18
  milestoneId: e,
19
19
  studentId: o,
@@ -22,49 +22,50 @@ const j = (e) => {
22
22
  onCreateNewTest: m,
23
23
  isMilestoneActive: c,
24
24
  canUpdatedPlan: d,
25
- ...p
26
- }) => /* @__PURE__ */ E(
27
- w,
25
+ ...l
26
+ }) => /* @__PURE__ */ C(
27
+ O,
28
28
  {
29
- $height: x,
29
+ $height: g,
30
30
  $position: "relative",
31
31
  $justifyContent: "space-between",
32
32
  children: [
33
- /* @__PURE__ */ t(O, { children: r.map((s, a) => {
33
+ /* @__PURE__ */ t(y, { children: r.map((s, a) => {
34
34
  const {
35
- items: l,
36
- node_id: h,
37
- sheet_time: T,
35
+ items: p,
36
+ node_id: T,
37
+ sheet_time: h,
38
38
  total_questions: n,
39
- worksheet_id: f
40
- } = s, u = Math.ceil((T || 0) / 60), I = j(l), _ = `${typeof n == "number" ? `${n} ${$.pluralize(n, "Question")}, ` : ""}${u} Mins`;
39
+ worksheet_id: u,
40
+ is_timed: _
41
+ } = s, f = Math.ceil((h || 0) / 60), I = R(p), E = _ ? `${f} Mins` : "", $ = `${n ? `${n} ${S.pluralize(n, "Question")}` : ""} ${E}`;
41
42
  return /* @__PURE__ */ t(
42
- A,
43
+ N,
43
44
  {
44
45
  userType: i,
45
46
  header: I,
46
- subHeader: _,
47
+ subHeader: $,
47
48
  nodeData: s,
48
49
  renderAs: "milestone",
49
50
  shouldOpenOnRight: (a + 1) % 3 === 0,
50
- ...p
51
+ ...l
51
52
  },
52
- `${f}_${h}_${a}`
53
+ `${u}_${T}_${a}`
53
54
  );
54
55
  }) }),
55
56
  i === "TEACHER" && d && /* @__PURE__ */ t(
56
- b,
57
+ H,
57
58
  {
58
59
  $flexDirection: "row",
59
60
  $justifyContent: "flex-end",
60
61
  $gapX: 1,
61
62
  $gutterX: 1,
62
- children: /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(
63
- N,
63
+ children: /* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(
64
+ w,
64
65
  {
65
- Icon: S,
66
+ Icon: A,
66
67
  renderAs: "secondary",
67
- analyticsLabel: y.CUSTOM_TEST_CREATION_STARTED,
68
+ analyticsLabel: j.CUSTOM_TEST_CREATION_STARTED,
68
69
  onClick: m,
69
70
  disabled: !c,
70
71
  analyticsProps: {
@@ -79,6 +80,6 @@ const j = (e) => {
79
80
  )
80
81
  );
81
82
  export {
82
- G as default
83
+ V as default
83
84
  };
84
85
  //# 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 renderAs=\"milestone\"\n shouldOpenOnRight={(idx + 1) % 3 === 0}\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,KAA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A,gBACC,MAAMC;AAAA,gBACN,UAAS;AAAA,gBACT,gBAAgBC,EAAgC;AAAA,gBAChD,SAASxB;AAAA,gBACT,UAAU,CAACC;AAAA,gBACX,gBAAgB;AAAA,kBACd,cAAcL;AAAA,gBAChB;AAAA,cAAA;AAAA,YAAA,GAEJ;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;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 { 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 is_timed: isTimed,\n } = sheet;\n const totalSheetTime = Math.ceil((sheetTime || 0) / 60);\n const testChapterName = getTopicNameFromItems(items);\n const sheetTimeText = isTimed ? `${totalSheetTime} Mins` : '';\n const totalQuestionsText = totalQuestions\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}`\n : '';\n const subHeader = `${totalQuestionsText} ${sheetTimeText}`;\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n userType={userType}\n header={testChapterName}\n subHeader={subHeader}\n nodeData={sheet}\n renderAs=\"milestone\"\n shouldOpenOnRight={(idx + 1) % 3 === 0}\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","isTimed","totalSheetTime","testChapterName","sheetTimeText","subHeader","pluralize","HomeworkCard","Styled.IconContainer","Styled.IconButtonCover","IconButton","Plus2Icon","TESTS_CREATION_ANALYTICS_EVENTS"],"mappings":";;;;;;;;;;AAeA,MAAMA,IAAwB,CAACC,MAA0C;AACjE,QAAAC,wBAAa;AAEnB,SAAAD,KAA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AAAAA,UAAA;AAAA,YACC,gBAAe;AAAA,YACf,iBAAgB;AAAA,YAChB,OAAO;AAAA,YACP,UAAU;AAAA,YAEV,UAAA,gBAAAf,EAACgB,GAAA,EACC,UAAA,gBAAAhB;AAAA,cAACiB;AAAA,cAAA;AAAA,gBACC,MAAMC;AAAA,gBACN,UAAS;AAAA,gBACT,gBAAgBC,EAAgC;AAAA,gBAChD,SAAS1B;AAAA,gBACT,UAAU,CAACC;AAAA,gBACX,gBAAgB;AAAA,kBACd,cAAcL;AAAA,gBAChB;AAAA,cAAA;AAAA,YAAA,GAEJ;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAKV;"}
@@ -1,51 +1,39 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { h as p } from "../../../node_modules/humanize-plus/dist/humanize.js";
3
- import { memo as c } from "react";
4
- import u from "styled-components";
5
- import l from "../../homework/homework-card.js";
6
- import f from "../../ui/layout/flex-view.js";
7
- const h = u.div`
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { h as f } from "../../../node_modules/humanize-plus/dist/humanize.js";
3
+ import { memo as $ } from "react";
4
+ import x from "styled-components";
5
+ import _ from "../../homework/homework-card.js";
6
+ import g from "../../ui/layout/flex-view.js";
7
+ const w = x.div`
8
8
  display: grid;
9
9
  grid-template-columns: repeat(3, 200px);
10
10
  grid-gap: 32px;
11
11
  justify-content: center;
12
12
  padding: 32px 0;
13
- `, E = (r) => {
13
+ `, R = ({ sheets: r, userType: n, ...m }) => /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(w, { children: r.map((o, s) => {
14
14
  const {
15
- sheet_time: t,
16
- node_type: o,
15
+ title: d,
16
+ node_id: a,
17
+ worksheet_id: p,
18
+ is_timed: l,
19
+ sheet_time: c,
17
20
  total_questions: e
18
- } = r || {};
19
- switch (o) {
20
- case "ASSESSMENT":
21
- case "MASTERY":
22
- case "DYNAMIC":
23
- return `${typeof e == "number" ? `${e} ${p.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(h, { children: r.map((e, n) => {
33
- const { title: i, node_id: a, worksheet_id: d } = e, m = E(e);
34
- return /* @__PURE__ */ s(
35
- l,
21
+ } = o, u = Math.ceil((c || 0) / 60), i = e ? `${e} ${f.pluralize(e, "Question")}` : "", h = l ? `${i} ${u} Mins` : i;
22
+ return /* @__PURE__ */ t(
23
+ _,
36
24
  {
37
- header: i,
38
- subHeader: m,
39
- userType: t,
40
- nodeData: e,
25
+ header: d,
26
+ subHeader: h,
27
+ userType: n,
28
+ nodeData: o,
41
29
  renderAs: "milestone",
42
- shouldOpenOnRight: (n + 1) % 3 === 0,
43
- ...o
30
+ shouldOpenOnRight: (s + 1) % 3 === 0,
31
+ ...m
44
32
  },
45
- `${d}_${a}_${n}`
33
+ `${p}_${a}_${s}`
46
34
  );
47
- }) }) }), y = c(_);
35
+ }) }) }), j = $(R);
48
36
  export {
49
- y as default
37
+ j as default
50
38
  };
51
39
  //# 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 renderAs=\"milestone\"\n shouldOpenOnRight={(idx + 1) % 3 === 0}\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,MACV,UAAS;AAAA,MACT,oBAAoBW,IAAM,KAAK,MAAM;AAAA,MACpC,GAAGH;AAAA,IAAA;AAAA,IAPC,GAAGM,CAAW,IAAID,CAAM,IAAIF,CAAG;AAAA,EAAA;AAU1C,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 { 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 ResourcesList: FC<IResourcesListProps> = ({ sheets, userType, ...sheetCallBacks }) => (\n <FlexView>\n <ResourceItemListWrapper>\n {sheets.map((sheet, idx) => {\n const {\n title,\n node_id: nodeId,\n worksheet_id: worksheetId,\n is_timed: isTimed,\n sheet_time: sheetTime,\n total_questions: totalQuestions,\n } = sheet;\n const totalSheetTime = Math.ceil((sheetTime || 0) / 60);\n const totalQuestionsText = totalQuestions\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}`\n : '';\n const subHeader = isTimed\n ? `${totalQuestionsText} ${totalSheetTime} Mins`\n : totalQuestionsText;\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n header={title}\n subHeader={subHeader}\n userType={userType}\n nodeData={sheet}\n renderAs=\"milestone\"\n shouldOpenOnRight={(idx + 1) % 3 === 0}\n {...sheetCallBacks}\n />\n );\n })}\n </ResourceItemListWrapper>\n </FlexView>\n);\n\nexport default memo(ResourcesList);\n"],"names":["ResourceItemListWrapper","styled","ResourcesList","sheets","userType","sheetCallBacks","jsx","FlexView","sheet","idx","title","nodeId","worksheetId","isTimed","sheetTime","totalQuestions","totalSheetTime","totalQuestionsText","pluralize","subHeader","HomeworkCard","ResourcesList$1","memo"],"mappings":";;;;;;AAUA,MAAMA,IAA0BC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAyC,CAAC,EAAE,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,EAAe,MACnF,gBAAAC,EAAAC,GAAA,EACC,4BAACP,GACE,EAAA,UAAAG,EAAO,IAAI,CAACK,GAAOC,MAAQ;AACpB,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,SAASC;AAAA,IACT,cAAcC;AAAA,IACd,UAAUC;AAAA,IACV,YAAYC;AAAA,IACZ,iBAAiBC;AAAA,EACf,IAAAP,GACEQ,IAAiB,KAAK,MAAMF,KAAa,KAAK,EAAE,GAChDG,IAAqBF,IACvB,GAAGA,CAAc,IAAIG,EAAU,UAAAH,GAAgB,UAAU,CAAC,KAC1D,IACEI,IAAYN,IACd,GAAGI,CAAkB,IAAID,CAAc,UACvCC;AAGF,SAAA,gBAAAX;AAAA,IAACc;AAAA,IAAA;AAAA,MAEC,QAAQV;AAAA,MACR,WAAAS;AAAA,MACA,UAAAf;AAAA,MACA,UAAUI;AAAA,MACV,UAAS;AAAA,MACT,oBAAoBC,IAAM,KAAK,MAAM;AAAA,MACpC,GAAGJ;AAAA,IAAA;AAAA,IAPC,GAAGO,CAAW,IAAID,CAAM,IAAIF,CAAG;AAAA,EAAA;AAU1C,CAAC,GACH,EACF,CAAA,GAGaY,IAAAC,EAAKpB,CAAa;"}
package/dist/index.d.ts CHANGED
@@ -2160,6 +2160,7 @@ export declare interface INodeDataProps {
2160
2160
  card_header: string;
2161
2161
  chapter_id: string;
2162
2162
  complete_status: boolean;
2163
+ course_type: TCourseType;
2163
2164
  desmos_calculator_enabled: boolean;
2164
2165
  due_date_ts: number | null;
2165
2166
  is_lesson_v3_enabled: boolean;
@@ -2184,6 +2185,8 @@ export declare interface INodeDataProps {
2184
2185
  unlocked_on_ts: number | null;
2185
2186
  items?: TNodeDataTestItemsDataProps[];
2186
2187
  user_milestone_id?: string;
2188
+ user_attempt_id: string | null;
2189
+ subtext: string | null;
2187
2190
  }
2188
2191
 
2189
2192
  declare interface INodePermissions {
@@ -2993,6 +2996,7 @@ declare interface ITestsListProps {
2993
2996
  isDraftMilestone?: boolean;
2994
2997
  isChaptersAvailable?: boolean;
2995
2998
  canUpdatePlan?: boolean;
2999
+ onNodeReattempt?: (sheetData: INodeDataProps, milestoneId?: string) => void;
2996
3000
  onTestPreview?: (sheetData: INodeDataProps, milestoneId: string) => void;
2997
3001
  onTestStart?: (sheetData: INodeDataProps) => void;
2998
3002
  onTestReview?: (sheetData: INodeDataProps, milestoneId: string) => void;
@@ -3749,6 +3753,13 @@ export declare const Next2Icon: React.FC<React.SVGProps<SVGSVGElement>>;
3749
3753
 
3750
3754
  export declare const NextIcon: React.FC<React.SVGProps<SVGSVGElement>>;
3751
3755
 
3756
+ declare enum NODE_CARD_COURSE_TYPES {
3757
+ PROGRAM = "PROGRAM",
3758
+ REMEDIAL = "REMEDIAL",
3759
+ TEST_SERIES = "TEST_SERIES",
3760
+ EXAM = "EXAM"
3761
+ }
3762
+
3752
3763
  declare enum NODE_CARD_STATES {
3753
3764
  LOCKED = "LOCKED",
3754
3765
  NOT_STARTED = "NOT_STARTED",
@@ -4362,6 +4373,8 @@ declare type TCourseProgramPermissions = {
4362
4373
 
4363
4374
  declare type TCourseStream = (typeof COURSE_STREAMS)[keyof typeof COURSE_STREAMS];
4364
4375
 
4376
+ declare type TCourseType = keyof typeof NODE_CARD_COURSE_TYPES;
4377
+
4365
4378
  declare type TCreateOnPresubmit = (options: TOnPreSubmitOptions) => void;
4366
4379
 
4367
4380
  declare type TCueCanvasChangeDataObject = Record<string, TDrawingData[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "2.8.61-as13",
3
+ "version": "2.8.61-as16",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"