@cuemath/leap 2.8.56-as1 → 2.8.56-hg1

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 (188) hide show
  1. package/dist/assets/illustrations/illustrations.js +0 -9
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/closed-eye.js +23 -0
  4. package/dist/assets/line-icons/icons/closed-eye.js.map +1 -0
  5. package/dist/features/analytics-events/whitelist-events.js +9 -7
  6. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  7. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +33 -98
  8. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
  9. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +47 -76
  10. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
  11. package/dist/features/chapters/chapters-list/chapters-list-styled.js +5 -5
  12. package/dist/features/chapters/chapters-list/chapters-list-styled.js.map +1 -1
  13. package/dist/features/chapters/chapters-list/chapters-list.js +70 -65
  14. package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
  15. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +92 -0
  16. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +1 -0
  17. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +25 -0
  18. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +1 -0
  19. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +53 -51
  20. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
  21. package/dist/features/milestone/milestone-list-container/api/get-milestones.js +17 -9
  22. package/dist/features/milestone/milestone-list-container/api/get-milestones.js.map +1 -1
  23. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +91 -116
  24. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  25. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +13 -0
  26. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +1 -0
  27. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +38 -0
  28. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +1 -0
  29. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +121 -105
  30. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  31. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +173 -145
  32. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
  33. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +10 -24
  34. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
  35. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +81 -76
  36. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
  37. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js +22 -10
  38. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js.map +1 -1
  39. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +53 -0
  40. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +1 -0
  41. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +37 -70
  42. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
  43. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +174 -114
  44. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
  45. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +25 -0
  46. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +1 -0
  47. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js +16 -29
  48. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js.map +1 -1
  49. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js +23 -19
  50. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js.map +1 -1
  51. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js +35 -23
  52. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js.map +1 -1
  53. package/dist/features/milestone/milestone-list-container/milestone-list-container.js +36 -34
  54. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  55. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js +1 -1
  56. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js.map +1 -1
  57. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +78 -96
  58. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
  59. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +71 -0
  60. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +1 -0
  61. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +31 -0
  62. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +1 -0
  63. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +34 -6
  64. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +1 -1
  65. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +73 -73
  66. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +1 -1
  67. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +7 -8
  68. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +1 -1
  69. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +68 -77
  70. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +1 -1
  71. package/dist/features/sheets/resources-list/resource-item/context-menu-helper/menu-element-styled.js +15 -0
  72. package/dist/features/sheets/resources-list/resource-item/context-menu-helper/menu-element-styled.js.map +1 -0
  73. package/dist/features/sheets/resources-list/resource-item/context-menu-helper/menu-element.js +26 -0
  74. package/dist/features/sheets/resources-list/resource-item/context-menu-helper/menu-element.js.map +1 -0
  75. package/dist/features/sheets/resources-list/resource-item/resource-item.js +179 -65
  76. package/dist/features/sheets/resources-list/resource-item/resource-item.js.map +1 -1
  77. package/dist/features/sheets/resources-list/resource-item/styled.js +38 -0
  78. package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -0
  79. package/dist/features/sheets/resources-list/resource-item/utils.js +23 -0
  80. package/dist/features/sheets/resources-list/resource-item/utils.js.map +1 -0
  81. package/dist/features/sheets/resources-list/resources-list.js +5 -5
  82. package/dist/features/sheets/resources-list/resources-list.js.map +1 -1
  83. package/dist/features/sheets/resources-list/styled.js +13 -9
  84. package/dist/features/sheets/resources-list/styled.js.map +1 -1
  85. package/dist/features/sheets/sheets-analytics-events.js +11 -0
  86. package/dist/features/sheets/sheets-analytics-events.js.map +1 -0
  87. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +3 -4
  88. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
  89. package/dist/features/sheets/utils/is-v3-worksheet.js.map +1 -1
  90. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +29 -30
  91. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  92. package/dist/features/ui/constants/z-index.js +1 -1
  93. package/dist/features/ui/constants/z-index.js.map +1 -1
  94. package/dist/features/ui/context-menu/context-menu-styled.js +14 -28
  95. package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
  96. package/dist/features/ui/context-menu/context-menu.js +15 -30
  97. package/dist/features/ui/context-menu/context-menu.js.map +1 -1
  98. package/dist/features/ui/theme/button.js +102 -17
  99. package/dist/features/ui/theme/button.js.map +1 -1
  100. package/dist/index.d.ts +12 -200
  101. package/dist/index.js +469 -487
  102. package/dist/index.js.map +1 -1
  103. package/package.json +1 -1
  104. package/dist/assets/line-icons/icons/alarm.js +0 -41
  105. package/dist/assets/line-icons/icons/alarm.js.map +0 -1
  106. package/dist/assets/line-icons/icons/dart.js +0 -23
  107. package/dist/assets/line-icons/icons/dart.js.map +0 -1
  108. package/dist/assets/line-icons/icons/exclamation.js +0 -26
  109. package/dist/assets/line-icons/icons/exclamation.js.map +0 -1
  110. package/dist/assets/line-icons/icons/home2.js +0 -25
  111. package/dist/assets/line-icons/icons/home2.js.map +0 -1
  112. package/dist/assets/line-icons/icons/important.js +0 -23
  113. package/dist/assets/line-icons/icons/important.js.map +0 -1
  114. package/dist/assets/line-icons/icons/puzzle.js +0 -25
  115. package/dist/assets/line-icons/icons/puzzle.js.map +0 -1
  116. package/dist/assets/line-icons/icons/recap.js +0 -32
  117. package/dist/assets/line-icons/icons/recap.js.map +0 -1
  118. package/dist/assets/line-icons/icons/status.js +0 -41
  119. package/dist/assets/line-icons/icons/status.js.map +0 -1
  120. package/dist/assets/line-icons/icons/testtube.js +0 -33
  121. package/dist/assets/line-icons/icons/testtube.js.map +0 -1
  122. package/dist/features/chapters-v2/api/chapter.js +0 -10
  123. package/dist/features/chapters-v2/api/chapter.js.map +0 -1
  124. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +0 -112
  125. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +0 -1
  126. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +0 -26
  127. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +0 -1
  128. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +0 -69
  129. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +0 -1
  130. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +0 -90
  131. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +0 -1
  132. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +0 -97
  133. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +0 -1
  134. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +0 -52
  135. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +0 -1
  136. package/dist/features/chapters-v2/chapter-details/chapter-details.js +0 -103
  137. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +0 -1
  138. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +0 -13
  139. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +0 -1
  140. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +0 -153
  141. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +0 -1
  142. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +0 -16
  143. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +0 -1
  144. package/dist/features/chapters-v2/comps/node-card/node-card.js +0 -12
  145. package/dist/features/chapters-v2/comps/node-card/node-card.js.map +0 -1
  146. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +0 -32
  147. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +0 -1
  148. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +0 -31
  149. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +0 -1
  150. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +0 -160
  151. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +0 -1
  152. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +0 -184
  153. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +0 -1
  154. package/dist/features/chapters-v2/comps/tag/tag-styled.js +0 -13
  155. package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +0 -1
  156. package/dist/features/chapters-v2/comps/tag/tag.js +0 -28
  157. package/dist/features/chapters-v2/comps/tag/tag.js.map +0 -1
  158. package/dist/features/chapters-v2/constants/block-constants.js +0 -20
  159. package/dist/features/chapters-v2/constants/block-constants.js.map +0 -1
  160. package/dist/features/chapters-v2/constants/node-constants.js +0 -15
  161. package/dist/features/chapters-v2/constants/node-constants.js.map +0 -1
  162. package/dist/features/chapters-v2/utils/index.js +0 -41
  163. package/dist/features/chapters-v2/utils/index.js.map +0 -1
  164. package/dist/features/chapters-v2/utils/node-card-utils.js +0 -106
  165. package/dist/features/chapters-v2/utils/node-card-utils.js.map +0 -1
  166. package/dist/features/homework/card-menu-options.js +0 -36
  167. package/dist/features/homework/card-menu-options.js.map +0 -1
  168. package/dist/features/homework/homework-card.js +0 -136
  169. package/dist/features/homework/homework-card.js.map +0 -1
  170. package/dist/features/homework/styles.js +0 -114
  171. package/dist/features/homework/styles.js.map +0 -1
  172. package/dist/features/homework/utils.js +0 -28
  173. package/dist/features/homework/utils.js.map +0 -1
  174. package/dist/features/recent-chapters/api/get-recent-chapters.js +0 -9
  175. package/dist/features/recent-chapters/api/get-recent-chapters.js.map +0 -1
  176. package/dist/features/recent-chapters/recent-chapters-styled.js +0 -23
  177. package/dist/features/recent-chapters/recent-chapters-styled.js.map +0 -1
  178. package/dist/features/recent-chapters/recent-chapters.js +0 -49
  179. package/dist/features/recent-chapters/recent-chapters.js.map +0 -1
  180. package/dist/static/chapter-header-bg-2.c8d96894.svg +0 -1
  181. package/dist/static/node-custom-test-bg.d3b757be.svg +0 -1
  182. package/dist/static/node-learn-bg.b61f815c.svg +0 -1
  183. package/dist/static/node-practice-bg.16cbaf2a.svg +0 -1
  184. package/dist/static/node-project-bg.e6a33e28.svg +0 -1
  185. package/dist/static/node-puzzle-bg.3422135c.svg +0 -1
  186. package/dist/static/node-recap-bg.546154e4.svg +0 -1
  187. package/dist/static/node-test-prep-bg.42c0b9c4.svg +0 -1
  188. package/dist/static/node-video-bg.3df3f73a.svg +0 -1
@@ -0,0 +1,71 @@
1
+ import { jsx as E } from "react/jsx-runtime";
2
+ import { memo as M, useMemo as _, useCallback as N } from "react";
3
+ import O from "../../../../../sheets/comps/sheet-button/index.js";
4
+ import { SHEET_STATE as k } from "../../../../../sheets/constants/sheet.js";
5
+ import L from "../../../../../ui/layout/flex-view.js";
6
+ import { IS_CHAPTER_COMPLETED_STATES as $ } from "../../../../create/milestone-create-constants.js";
7
+ import { TESTS_CREATION_ANALYTICS_EVENTS as g } from "../../../tests-creation/tests-creation-analytics-events.js";
8
+ import { getTestCtaInfo as H } from "./test-sheet-item-utils.js";
9
+ const { COMPLETED: U } = k, J = M((d) => {
10
+ const { milestoneId: n, studentId: m, userType: T, sheet: s, onTestStart: r, onTestReview: i, onTestPreview: a } = d, e = _(() => T === "STUDENT", [T]), { permissions: f, state: c, accuracy: l, user_node_id: u } = s, {
11
+ can_start: t,
12
+ can_resume: o,
13
+ can_review: S,
14
+ can_teacher_review: w
15
+ } = f, p = e ? S : w, h = _(
16
+ () => ({
17
+ user_node_id: u,
18
+ milestone_id: n,
19
+ student_id: m,
20
+ ...e ? {
21
+ can_start: t,
22
+ can_resume: o
23
+ } : {}
24
+ }),
25
+ [n, m, o, t, e, u]
26
+ ), C = N(() => {
27
+ if (e && (t || o)) {
28
+ if (typeof r == "function") {
29
+ r(s);
30
+ return;
31
+ }
32
+ throw new Error("No callback is available");
33
+ }
34
+ if (p) {
35
+ if (typeof i != "function")
36
+ throw new Error("onTestReview must be a function");
37
+ i(s, n);
38
+ return;
39
+ }
40
+ if (typeof a != "function")
41
+ throw new Error("onTestPreview must be a function");
42
+ a(n, s);
43
+ }, [
44
+ e,
45
+ p,
46
+ a,
47
+ n,
48
+ s,
49
+ t,
50
+ o,
51
+ r,
52
+ i
53
+ ]), y = H(c, f, e), { state: b, renderAs: v = "primary", label: A } = y || {}, I = !(c === U || $.some((x) => x === c)) && !(t || o || S), P = e && I, R = typeof l == "number" ? `${l}%` : void 0, D = e && (t || o) ? g.CUSTOM_TEST_ATTEMPTED : "";
54
+ return /* @__PURE__ */ E(L, { $flexDirection: "row", $flexGapX: 1, $alignItems: "center", children: /* @__PURE__ */ E(
55
+ O,
56
+ {
57
+ renderAs: v,
58
+ label: A,
59
+ onClick: C,
60
+ disabled: P,
61
+ state: b,
62
+ accuracy: R,
63
+ analyticsLabel: D,
64
+ analyticsProps: h
65
+ }
66
+ ) });
67
+ });
68
+ export {
69
+ J as default
70
+ };
71
+ //# sourceMappingURL=test-sheet-item-cta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-sheet-item-cta.js","sources":["../../../../../../../src/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.tsx"],"sourcesContent":["import type { ITestSheetItemProps } from './test-sheet-item-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo, memo } from 'react';\n\nimport SheetButton from '../../../../../sheets/comps/sheet-button';\nimport { SHEET_STATE } from '../../../../../sheets/constants/sheet';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport { IS_CHAPTER_COMPLETED_STATES } from '../../../../create/milestone-create-constants';\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../../../tests-creation/tests-creation-analytics-events';\nimport { getTestCtaInfo } from './test-sheet-item-utils';\n\nconst { COMPLETED } = SHEET_STATE;\n\nconst TestSheetItemCta: FC<Omit<ITestSheetItemProps, 'sequenceNo'>> = memo(props => {\n const { milestoneId, studentId, userType, sheet, onTestStart, onTestReview, onTestPreview } =\n props;\n const isStudent = useMemo(() => userType === 'STUDENT', [userType]);\n const { permissions, state: sheetState, accuracy, user_node_id } = sheet;\n const {\n can_start: canStart,\n can_resume: canResume,\n can_review: canReview,\n can_teacher_review: canTeacherReview,\n } = permissions;\n const canReviewSheet = isStudent ? canReview : canTeacherReview;\n\n const analyticsProps = useMemo(\n () => ({\n user_node_id,\n milestone_id: milestoneId,\n student_id: studentId,\n ...(isStudent\n ? {\n can_start: canStart,\n can_resume: canResume,\n }\n : {}),\n }),\n [milestoneId, studentId, canResume, canStart, isStudent, user_node_id],\n );\n\n const handleOnClick = useCallback(() => {\n if (isStudent) {\n if (canStart || canResume) {\n if (typeof onTestStart === 'function') {\n onTestStart(sheet);\n\n return;\n }\n\n throw new Error('No callback is available');\n }\n }\n\n if (canReviewSheet) {\n if (typeof onTestReview !== 'function') {\n throw new Error('onTestReview must be a function');\n }\n\n onTestReview(sheet, milestoneId);\n\n return;\n }\n\n if (typeof onTestPreview !== 'function') {\n throw new Error('onTestPreview must be a function');\n }\n\n onTestPreview(milestoneId, sheet);\n\n return;\n }, [\n isStudent,\n canReviewSheet,\n onTestPreview,\n milestoneId,\n sheet,\n canStart,\n canResume,\n onTestStart,\n onTestReview,\n ]);\n\n const testCtaInfo = getTestCtaInfo(sheetState, permissions, isStudent);\n const { state: testCtaState, renderAs = 'primary', label } = testCtaInfo || {};\n\n const isSheetCompleted =\n sheetState === COMPLETED || IS_CHAPTER_COMPLETED_STATES.some(state => state === sheetState);\n const sheetPermissionDisability = !isSheetCompleted && !(canStart || canResume || canReview);\n const disableCta = isStudent && sheetPermissionDisability;\n const sheetAccuracy = typeof accuracy === 'number' ? `${accuracy}%` : undefined;\n\n const analyticsLabel =\n isStudent && (canStart || canResume)\n ? TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_ATTEMPTED\n : '';\n\n return (\n <FlexView $flexDirection=\"row\" $flexGapX={1} $alignItems=\"center\">\n <SheetButton\n renderAs={renderAs}\n label={label}\n onClick={handleOnClick}\n disabled={disableCta}\n state={testCtaState}\n accuracy={sheetAccuracy}\n analyticsLabel={analyticsLabel}\n analyticsProps={analyticsProps}\n />\n </FlexView>\n );\n});\n\nexport default TestSheetItemCta;\n"],"names":["COMPLETED","SHEET_STATE","TestSheetItemCta","memo","props","milestoneId","studentId","userType","sheet","onTestStart","onTestReview","onTestPreview","isStudent","useMemo","permissions","sheetState","accuracy","user_node_id","canStart","canResume","canReview","canTeacherReview","canReviewSheet","analyticsProps","handleOnClick","useCallback","testCtaInfo","getTestCtaInfo","testCtaState","renderAs","label","sheetPermissionDisability","IS_CHAPTER_COMPLETED_STATES","state","disableCta","sheetAccuracy","analyticsLabel","TESTS_CREATION_ANALYTICS_EVENTS","FlexView","jsx","SheetButton"],"mappings":";;;;;;;;AAYA,MAAM,EAAE,WAAAA,EAAc,IAAAC,GAEhBC,IAAgEC,EAAK,CAASC,MAAA;AAC5E,QAAA,EAAE,aAAAC,GAAa,WAAAC,GAAW,UAAAC,GAAU,OAAAC,GAAO,aAAAC,GAAa,cAAAC,GAAc,eAAAC,EAC1E,IAAAP,GACIQ,IAAYC,EAAQ,MAAMN,MAAa,WAAW,CAACA,CAAQ,CAAC,GAC5D,EAAE,aAAAO,GAAa,OAAOC,GAAY,UAAAC,GAAU,cAAAC,EAAiB,IAAAT,GAC7D;AAAA,IACJ,WAAWU;AAAA,IACX,YAAYC;AAAA,IACZ,YAAYC;AAAA,IACZ,oBAAoBC;AAAA,EAClB,IAAAP,GACEQ,IAAiBV,IAAYQ,IAAYC,GAEzCE,IAAiBV;AAAA,IACrB,OAAO;AAAA,MACL,cAAAI;AAAA,MACA,cAAcZ;AAAA,MACd,YAAYC;AAAA,MACZ,GAAIM,IACA;AAAA,QACE,WAAWM;AAAA,QACX,YAAYC;AAAA,MAAA,IAEd,CAAC;AAAA,IAAA;AAAA,IAEP,CAACd,GAAaC,GAAWa,GAAWD,GAAUN,GAAWK,CAAY;AAAA,EAAA,GAGjEO,IAAgBC,EAAY,MAAM;AACtC,QAAIb,MACEM,KAAYC,IAAW;AACrB,UAAA,OAAOV,KAAgB,YAAY;AACrC,QAAAA,EAAYD,CAAK;AAEjB;AAAA,MACF;AAEM,YAAA,IAAI,MAAM,0BAA0B;AAAA,IAC5C;AAGF,QAAIc,GAAgB;AACd,UAAA,OAAOZ,KAAiB;AACpB,cAAA,IAAI,MAAM,iCAAiC;AAGnD,MAAAA,EAAaF,GAAOH,CAAW;AAE/B;AAAA,IACF;AAEI,QAAA,OAAOM,KAAkB;AACrB,YAAA,IAAI,MAAM,kCAAkC;AAGpD,IAAAA,EAAcN,GAAaG,CAAK;AAAA,EAEhC,GACC;AAAA,IACDI;AAAA,IACAU;AAAA,IACAX;AAAA,IACAN;AAAA,IACAG;AAAA,IACAU;AAAA,IACAC;AAAA,IACAV;AAAA,IACAC;AAAA,EAAA,CACD,GAEKgB,IAAcC,EAAeZ,GAAYD,GAAaF,CAAS,GAC/D,EAAE,OAAOgB,GAAc,UAAAC,IAAW,WAAW,OAAAC,EAAM,IAAIJ,KAAe,IAItEK,IAA4B,EADhChB,MAAef,KAAagC,EAA4B,KAAK,CAAAC,MAASA,MAAUlB,CAAU,MACrC,EAAEG,KAAYC,KAAaC,IAC5Ec,IAAatB,KAAamB,GAC1BI,IAAgB,OAAOnB,KAAa,WAAW,GAAGA,CAAQ,MAAM,QAEhEoB,IACJxB,MAAcM,KAAYC,KACtBkB,EAAgC,wBAChC;AAEN,2BACGC,GAAS,EAAA,gBAAe,OAAM,WAAW,GAAG,aAAY,UACvD,UAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAAX;AAAA,MACA,OAAAC;AAAA,MACA,SAASN;AAAA,MACT,UAAUU;AAAA,MACV,OAAON;AAAA,MACP,UAAUO;AAAA,MACV,gBAAAC;AAAA,MACA,gBAAAb;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
@@ -0,0 +1,31 @@
1
+ import o from "styled-components";
2
+ import i from "../../../../../ui/layout/flex-view.js";
3
+ import e from "../../../../../ui/text/text.js";
4
+ const s = o(i)(({ theme: t }) => {
5
+ const { WHITE_5: r } = t.colors;
6
+ return `
7
+ border: 1px solid ${r};
8
+ border-top-width: 0;
9
+ border-left-width: 0;
10
+
11
+ &:nth-child(even) {
12
+ border-right-width: 0;
13
+ }
14
+ `;
15
+ }), c = o(e)(({ theme: t }) => `
16
+ width: fit-content;
17
+ padding: ${t.layout.gutter * 0.25}px;
18
+ background-color: ${t.colors.BLUE_2};
19
+ `), p = o(e)(() => `
20
+ display: -webkit-box;
21
+ -webkit-box-orient: vertical;
22
+ -webkit-line-clamp: 1;
23
+ text-overflow: ellipsis;
24
+ overflow: hidden;
25
+ `);
26
+ export {
27
+ s as TestItemCard,
28
+ p as TestItemTitle,
29
+ c as TestTag
30
+ };
31
+ //# sourceMappingURL=test-sheet-item-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-sheet-item-styled.js","sources":["../../../../../../../src/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Text from '../../../../../ui/text/text';\n\nconst TestItemCard = styled(FlexView)(({ theme }) => {\n const { WHITE_5 } = theme.colors;\n\n return `\n border: 1px solid ${WHITE_5};\n border-top-width: 0;\n border-left-width: 0;\n\n &:nth-child(even) {\n border-right-width: 0;\n }\n `;\n});\n\nconst TestTag = styled(Text)(({ theme }) => {\n return `\n width: fit-content;\n padding: ${theme.layout.gutter * 0.25}px;\n background-color: ${theme.colors.BLUE_2};\n `;\n});\n\nconst TestItemTitle = styled(Text)(() => {\n return `\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n `;\n});\n\nexport { TestItemCard, TestItemTitle, TestTag };\n"],"names":["TestItemCard","styled","FlexView","theme","WHITE_5","TestTag","Text","TestItemTitle"],"mappings":";;;AAKA,MAAMA,IAAeC,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAAY;AAC7C,QAAA,EAAE,SAAAC,EAAQ,IAAID,EAAM;AAEnB,SAAA;AAAA,wBACeC,CAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ/B,CAAC,GAEKC,IAAUJ,EAAOK,CAAI,EAAE,CAAC,EAAE,OAAAH,QACvB;AAAA;AAAA,eAEMA,EAAM,OAAO,SAAS,IAAI;AAAA,wBACjBA,EAAM,OAAO,MAAM;AAAA,GAE1C,GAEKI,IAAgBN,EAAOK,CAAI,EAAE,MAC1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOR;"}
@@ -1,10 +1,38 @@
1
- const a = (r) => {
2
- const o = /* @__PURE__ */ new Set();
3
- return r == null || r.forEach((c) => {
4
- o.add(c.chapter_name);
5
- }), Array.from(o);
1
+ import { SHEET_STATE as c } from "../../../../../sheets/constants/sheet.js";
2
+ import { IS_CHAPTER_COMPLETED_STATES as i } from "../../../../create/milestone-create-constants.js";
3
+ const { COMPLETED: m } = c, l = (r, e, t) => {
4
+ const { can_start: n, can_resume: a } = e, o = r === m || i.some((s) => s === r);
5
+ if (t) {
6
+ if (a)
7
+ return {
8
+ state: "in_progress",
9
+ renderAs: "primary",
10
+ label: "Resume"
11
+ };
12
+ if (n)
13
+ return {
14
+ state: void 0,
15
+ renderAs: "primary",
16
+ label: "Start"
17
+ };
18
+ }
19
+ return o ? {
20
+ state: "completed",
21
+ renderAs: "secondary_black",
22
+ label: "Review"
23
+ } : {
24
+ state: a ? "in_progress" : void 0,
25
+ renderAs: "primary",
26
+ label: "View"
27
+ };
28
+ }, E = (r) => {
29
+ const e = /* @__PURE__ */ new Set();
30
+ return r == null || r.forEach((t) => {
31
+ e.add(t.chapter_name);
32
+ }), Array.from(e);
6
33
  };
7
34
  export {
8
- a as getTopicsFromItems
35
+ l as getTestCtaInfo,
36
+ E as getTopicsFromItems
9
37
  };
10
38
  //# sourceMappingURL=test-sheet-item-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-sheet-item-utils.js","sources":["../../../../../../../src/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.ts"],"sourcesContent":["import type { TTestHelpItemsDataProps } from '../../../../../sheets/sheets-list/sheet-item/sheet-item-types';\n\nconst getTopicsFromItems = (items?: TTestHelpItemsDataProps[]) => {\n const topics = new Set<string>();\n\n items?.forEach(item => {\n topics.add(item.chapter_name);\n });\n\n return Array.from(topics);\n};\n\nexport { getTopicsFromItems };\n"],"names":["getTopicsFromItems","items","topics","item"],"mappings":"AAEM,MAAAA,IAAqB,CAACC,MAAsC;AAC1D,QAAAC,wBAAa;AAEnB,SAAAD,KAAA,QAAAA,EAAO,QAAQ,CAAQE,MAAA;AACd,IAAAD,EAAA,IAAIC,EAAK,YAAY;AAAA,EAAA,IAGvB,MAAM,KAAKD,CAAM;AAC1B;"}
1
+ {"version":3,"file":"test-sheet-item-utils.js","sources":["../../../../../../../src/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.ts"],"sourcesContent":["import type {\n TSheetButtonState,\n TSheetButtonVariant,\n} from '../../../../../sheets/comps/sheet-button/types';\nimport type {\n ISheetDataProps,\n TTestHelpItemsDataProps,\n} from '../../../../../sheets/sheets-list/sheet-item/sheet-item-types';\n\nimport { SHEET_STATE } from '../../../../../sheets/constants/sheet';\nimport { IS_CHAPTER_COMPLETED_STATES } from '../../../../create/milestone-create-constants';\n\nconst { COMPLETED } = SHEET_STATE;\n\ninterface IGetTestSheetCtaInfo {\n (\n state: ISheetDataProps['state'],\n permissions: ISheetDataProps['permissions'],\n isStudent: boolean,\n ): {\n state: TSheetButtonState | undefined;\n renderAs: TSheetButtonVariant;\n label: 'Start' | 'Resume' | 'View' | 'Review';\n };\n}\n\nconst getTestCtaInfo: IGetTestSheetCtaInfo = (sheetState, permissions, isStudent) => {\n const { can_start: canStart, can_resume: canResume } = permissions;\n\n const isSheetCompleted =\n sheetState === COMPLETED ||\n IS_CHAPTER_COMPLETED_STATES.some(completedState => completedState === sheetState);\n\n if (isStudent) {\n if (canResume) {\n return {\n state: 'in_progress',\n renderAs: 'primary',\n label: 'Resume',\n };\n }\n\n if (canStart) {\n return {\n state: undefined,\n renderAs: 'primary',\n label: 'Start',\n };\n }\n }\n\n if (isSheetCompleted) {\n return {\n state: 'completed',\n renderAs: 'secondary_black',\n label: 'Review',\n };\n }\n\n return {\n state: canResume ? 'in_progress' : undefined,\n renderAs: 'primary',\n label: 'View',\n };\n};\n\nconst getTopicsFromItems = (items?: TTestHelpItemsDataProps[]) => {\n const topics = new Set<string>();\n\n items?.forEach(item => {\n topics.add(item.chapter_name);\n });\n\n return Array.from(topics);\n};\n\nexport { getTopicsFromItems, getTestCtaInfo };\n"],"names":["COMPLETED","SHEET_STATE","getTestCtaInfo","sheetState","permissions","isStudent","canStart","canResume","isSheetCompleted","IS_CHAPTER_COMPLETED_STATES","completedState","getTopicsFromItems","items","topics","item"],"mappings":";;AAYA,MAAM,EAAE,WAAAA,EAAc,IAAAC,GAchBC,IAAuC,CAACC,GAAYC,GAAaC,MAAc;AACnF,QAAM,EAAE,WAAWC,GAAU,YAAYC,MAAcH,GAEjDI,IACJL,MAAeH,KACfS,EAA4B,KAAK,CAAAC,MAAkBA,MAAmBP,CAAU;AAElF,MAAIE,GAAW;AACb,QAAIE;AACK,aAAA;AAAA,QACL,OAAO;AAAA,QACP,UAAU;AAAA,QACV,OAAO;AAAA,MAAA;AAIX,QAAID;AACK,aAAA;AAAA,QACL,OAAO;AAAA,QACP,UAAU;AAAA,QACV,OAAO;AAAA,MAAA;AAAA,EAGb;AAEA,SAAIE,IACK;AAAA,IACL,OAAO;AAAA,IACP,UAAU;AAAA,IACV,OAAO;AAAA,EAAA,IAIJ;AAAA,IACL,OAAOD,IAAY,gBAAgB;AAAA,IACnC,UAAU;AAAA,IACV,OAAO;AAAA,EAAA;AAEX,GAEMI,IAAqB,CAACC,MAAsC;AAC1D,QAAAC,wBAAa;AAEnB,SAAAD,KAAA,QAAAA,EAAO,QAAQ,CAAQE,MAAA;AACd,IAAAD,EAAA,IAAIC,EAAK,YAAY;AAAA,EAAA,IAGvB,MAAM,KAAKD,CAAM;AAC1B;"}
@@ -1,79 +1,79 @@
1
- import { jsx as v } from "react/jsx-runtime";
2
- import { h as I } from "../../../../../../node_modules/humanize-plus/dist/humanize.js";
3
- import { memo as M, useMemo as e, useCallback as j } from "react";
4
- import z from "../../../../../homework/homework-card.js";
5
- import { getNodeTypeBasedHWCardTitle as D } from "../../../../../homework/utils.js";
6
- import O from "../../../../../ui/buttons/clickable/clickable.js";
7
- import { getTopicsFromItems as P } from "./test-sheet-item-utils.js";
8
- const W = M((b) => {
9
- const { sheet: t, userType: i, milestoneId: n, onTestPreview: s, onTestReview: a, onTestStart: c } = b, {
10
- title: y,
11
- items: l,
12
- state: g,
13
- sheet_time: m,
14
- node_type: u,
15
- image_url: k,
16
- permissions: C,
17
- accuracy: R,
18
- due_date_ts: S,
19
- total_questions: o,
20
- image_hue: E
21
- } = t, {
22
- can_start: f,
23
- can_resume: p,
24
- can_review: d,
25
- can_teacher_review: h
26
- } = C || {}, r = e(() => i === "STUDENT", [i]), T = e(
27
- () => r ? d : h,
28
- [d, h, r]
29
- ), w = e(() => m && Math.ceil(m / 60) || 0, [m]), _ = e(() => P(l), [l]), H = e(() => _.join(", "), [_]), N = e(
30
- () => `${typeof o == "number" ? `${o} ${I.pluralize(o, "Question")}, ` : ""}${w} Mins`,
31
- [o, w]
32
- ), $ = e(() => D(u), [u]), x = j(() => {
33
- if (r && (f || p)) {
34
- if (typeof c == "function") {
35
- c(t);
36
- return;
37
- }
38
- throw new Error("No callback is available");
39
- }
40
- if (T) {
41
- if (typeof a != "function")
42
- throw new Error("onTestReview must be a function");
43
- a(t, n);
44
- return;
45
- }
46
- if (typeof s != "function")
47
- throw new Error("onTestPreview must be a function");
48
- s(n, t);
49
- }, [
50
- p,
51
- T,
52
- f,
53
- r,
54
- n,
55
- s,
56
- a,
57
- c,
58
- t
59
- ]);
60
- return /* @__PURE__ */ v(O, { label: `test card click ${y}`, onClick: x, children: /* @__PURE__ */ v(
61
- z,
1
+ import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
+ import { h as g } from "../../../../../../node_modules/humanize-plus/dist/humanize.js";
3
+ import { memo as y, useRef as D, useState as M, useMemo as n, useEffect as b } from "react";
4
+ import { SHEET_STATE as F } from "../../../../../sheets/constants/sheet.js";
5
+ import H from "../../../../../ui/arrow-tooltip/arrow-tooltip.js";
6
+ import f from "../../../../../ui/layout/flex-view.js";
7
+ import j from "../../../../../ui/text/text.js";
8
+ import { IS_CHAPTER_COMPLETED_STATES as v } from "../../../../create/milestone-create-constants.js";
9
+ import R from "./test-sheet-item-cta.js";
10
+ import { TestItemCard as O, TestTag as P, TestItemTitle as X } from "./test-sheet-item-styled.js";
11
+ import { getTopicsFromItems as Y } from "./test-sheet-item-utils.js";
12
+ const { COMPLETED: z } = F, B = {
13
+ EASY: "Easy",
14
+ MODERATE: "Moderate",
15
+ DIFFICULT: "Difficult"
16
+ }, ee = y((p) => {
17
+ const { sheet: l, userType: a, milestoneId: h, studentId: d, onTestPreview: u, onTestReview: E, onTestStart: I } = p, {
18
+ title: C,
19
+ items: m,
20
+ sheet_time: o,
21
+ state: c,
22
+ difficulty_level: S
23
+ } = l, e = D(null), [_, $] = M(!1), A = n(() => o && Math.ceil(o / 60) || 0, [o]), r = n(() => Y(m), [m]), i = n(() => r.join(" • "), [r]), T = r.length, w = B[S || "EASY"], x = c === z || v.some((L) => L === c);
24
+ return b(() => {
25
+ e.current && e.current.scrollHeight > e.current.clientHeight && $(!0);
26
+ }, [e]), /* @__PURE__ */ s(
27
+ O,
62
28
  {
63
- nodeType: u,
64
- cardHeader: $,
65
- imageHue: E || "ORANGE",
66
- imageUrl: k,
67
- header: H,
68
- subHeader: N,
69
- userType: i,
70
- state: g,
71
- accuracy: R,
72
- dueDateTs: S
29
+ $gapX: 1.25,
30
+ $gutterX: 1.25,
31
+ $flexGapX: 1.25,
32
+ $background: x ? "WHITE_3" : "WHITE_1",
33
+ $justifyContent: "space-between",
34
+ children: [
35
+ /* @__PURE__ */ s(f, { $flexGap: 4, children: [
36
+ /* @__PURE__ */ t(P, { $renderAs: "ac4", $color: "BLACK_T_60", children: C }),
37
+ /* @__PURE__ */ t(
38
+ H,
39
+ {
40
+ renderAs: "primary",
41
+ position: "bottom",
42
+ tooltipItem: i ?? "",
43
+ widthX: 22.4375,
44
+ hidden: !_ || !i,
45
+ children: /* @__PURE__ */ t(X, { ref: e, $renderAs: "ab2", children: i })
46
+ }
47
+ ),
48
+ /* @__PURE__ */ s(j, { $renderAs: "ub3", $color: "BLACK_T_60", children: [
49
+ T,
50
+ " ",
51
+ g.pluralize(T, "Chapter"),
52
+ " • ",
53
+ w,
54
+ " •",
55
+ " ",
56
+ A,
57
+ " Mins"
58
+ ] })
59
+ ] }),
60
+ /* @__PURE__ */ t(f, { $flexDirection: "row", $justifyContent: "space-between", $alignItems: "center", children: /* @__PURE__ */ t(
61
+ R,
62
+ {
63
+ milestoneId: h,
64
+ studentId: d,
65
+ sheet: l,
66
+ userType: a,
67
+ onTestPreview: u,
68
+ onTestReview: E,
69
+ onTestStart: I
70
+ }
71
+ ) })
72
+ ]
73
73
  }
74
- ) });
74
+ );
75
75
  });
76
76
  export {
77
- W as default
77
+ ee as default
78
78
  };
79
79
  //# sourceMappingURL=test-sheet-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-sheet-item.js","sources":["../../../../../../../src/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.tsx"],"sourcesContent":["import type { TSheetStates } from '../../../../../chapters-v2/comps/node-card/node-card-types';\nimport type { ITestSheetItemProps } from './test-sheet-item-types';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport { memo, useCallback, useMemo } from 'react';\n\nimport HomeworkCard from '../../../../../homework/homework-card';\nimport { getNodeTypeBasedHWCardTitle } from '../../../../../homework/utils';\nimport Clickable from '../../../../../ui/buttons/clickable/clickable';\nimport { getTopicsFromItems } from './test-sheet-item-utils';\n\nconst TestSheetItem: FC<ITestSheetItemProps> = memo(props => {\n const { sheet, userType, milestoneId, onTestPreview, onTestReview, onTestStart } = props;\n const {\n title,\n items,\n state,\n sheet_time: sheetTime,\n node_type: nodeType,\n image_url: imageUrl,\n permissions,\n accuracy,\n due_date_ts: dueDateTs,\n total_questions: totalQuestions,\n image_hue: imageHue,\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 = useMemo(() => userType === 'STUDENT', [userType]);\n const canReviewSheet = useMemo(\n () => (isStudent ? canReview : canTeacherReview),\n [canReview, canTeacherReview, isStudent],\n );\n const totalSheetTime = useMemo(() => (sheetTime && Math.ceil(sheetTime / 60)) || 0, [sheetTime]);\n const topics = useMemo(() => getTopicsFromItems(items), [items]);\n const testChapterName = useMemo(() => topics.join(', '), [topics]);\n const subHeader = useMemo(\n () =>\n `${\n typeof totalQuestions === 'number'\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}, `\n : ''\n }${totalSheetTime} Mins`,\n [totalQuestions, totalSheetTime],\n );\n const cardHeader = useMemo(() => getNodeTypeBasedHWCardTitle(nodeType), [nodeType]);\n\n const handleOnClick = useCallback(() => {\n if (isStudent) {\n if (canStart || canResume) {\n if (typeof onTestStart === 'function') {\n onTestStart(sheet);\n\n return;\n }\n\n throw new Error('No callback is available');\n }\n }\n\n if (canReviewSheet) {\n if (typeof onTestReview !== 'function') {\n throw new Error('onTestReview must be a function');\n }\n\n onTestReview(sheet, milestoneId);\n\n return;\n }\n\n if (typeof onTestPreview !== 'function') {\n throw new Error('onTestPreview must be a function');\n }\n\n onTestPreview(milestoneId, sheet);\n\n return;\n }, [\n canResume,\n canReviewSheet,\n canStart,\n isStudent,\n milestoneId,\n onTestPreview,\n onTestReview,\n onTestStart,\n sheet,\n ]);\n\n return (\n <Clickable label={`test card click ${title}`} onClick={handleOnClick}>\n <HomeworkCard\n nodeType={nodeType}\n cardHeader={cardHeader}\n imageHue={imageHue || 'ORANGE'}\n imageUrl={imageUrl}\n header={testChapterName}\n subHeader={subHeader}\n userType={userType}\n state={state as TSheetStates}\n accuracy={accuracy}\n dueDateTs={dueDateTs}\n />\n </Clickable>\n );\n});\n\nexport default TestSheetItem;\n"],"names":["TestSheetItem","memo","props","sheet","userType","milestoneId","onTestPreview","onTestReview","onTestStart","title","items","state","sheetTime","nodeType","imageUrl","permissions","accuracy","dueDateTs","totalQuestions","imageHue","canStart","canResume","canReview","canTeacherReview","isStudent","useMemo","canReviewSheet","totalSheetTime","topics","getTopicsFromItems","testChapterName","subHeader","pluralize","cardHeader","getNodeTypeBasedHWCardTitle","handleOnClick","useCallback","Clickable","jsx","HomeworkCard"],"mappings":";;;;;;;AAYM,MAAAA,IAAyCC,EAAK,CAASC,MAAA;AAC3D,QAAM,EAAE,OAAAC,GAAO,UAAAC,GAAU,aAAAC,GAAa,eAAAC,GAAe,cAAAC,GAAc,aAAAC,EAAgB,IAAAN,GAC7E;AAAA,IACJ,OAAAO;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAYC;AAAA,IACZ,WAAWC;AAAA,IACX,WAAWC;AAAA,IACX,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAaC;AAAA,IACb,iBAAiBC;AAAA,IACjB,WAAWC;AAAA,EACT,IAAAhB,GACE;AAAA,IACJ,WAAWiB;AAAA,IACX,YAAYC;AAAA,IACZ,YAAYC;AAAA,IACZ,oBAAoBC;AAAA,EAAA,IAClBR,KAAe,CAAA,GACbS,IAAYC,EAAQ,MAAMrB,MAAa,WAAW,CAACA,CAAQ,CAAC,GAC5DsB,IAAiBD;AAAA,IACrB,MAAOD,IAAYF,IAAYC;AAAA,IAC/B,CAACD,GAAWC,GAAkBC,CAAS;AAAA,EAAA,GAEnCG,IAAiBF,EAAQ,MAAOb,KAAa,KAAK,KAAKA,IAAY,EAAE,KAAM,GAAG,CAACA,CAAS,CAAC,GACzFgB,IAASH,EAAQ,MAAMI,EAAmBnB,CAAK,GAAG,CAACA,CAAK,CAAC,GACzDoB,IAAkBL,EAAQ,MAAMG,EAAO,KAAK,IAAI,GAAG,CAACA,CAAM,CAAC,GAC3DG,IAAYN;AAAA,IAChB,MACE,GACE,OAAOP,KAAmB,WACtB,GAAGA,CAAc,IAAIc,EAAAA,UAAUd,GAAgB,UAAU,CAAC,OAC1D,EACN,GAAGS,CAAc;AAAA,IACnB,CAACT,GAAgBS,CAAc;AAAA,EAAA,GAE3BM,IAAaR,EAAQ,MAAMS,EAA4BrB,CAAQ,GAAG,CAACA,CAAQ,CAAC,GAE5EsB,IAAgBC,EAAY,MAAM;AACtC,QAAIZ,MACEJ,KAAYC,IAAW;AACrB,UAAA,OAAOb,KAAgB,YAAY;AACrC,QAAAA,EAAYL,CAAK;AAEjB;AAAA,MACF;AAEM,YAAA,IAAI,MAAM,0BAA0B;AAAA,IAC5C;AAGF,QAAIuB,GAAgB;AACd,UAAA,OAAOnB,KAAiB;AACpB,cAAA,IAAI,MAAM,iCAAiC;AAGnD,MAAAA,EAAaJ,GAAOE,CAAW;AAE/B;AAAA,IACF;AAEI,QAAA,OAAOC,KAAkB;AACrB,YAAA,IAAI,MAAM,kCAAkC;AAGpD,IAAAA,EAAcD,GAAaF,CAAK;AAAA,EAEhC,GACC;AAAA,IACDkB;AAAA,IACAK;AAAA,IACAN;AAAA,IACAI;AAAA,IACAnB;AAAA,IACAC;AAAA,IACAC;AAAA,IACAC;AAAA,IACAL;AAAA,EAAA,CACD;AAED,2BACGkC,GAAU,EAAA,OAAO,mBAAmB5B,CAAK,IAAI,SAAS0B,GACrD,UAAA,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAA1B;AAAA,MACA,YAAAoB;AAAA,MACA,UAAUd,KAAY;AAAA,MACtB,UAAAL;AAAA,MACA,QAAQgB;AAAA,MACR,WAAAC;AAAA,MACA,UAAA3B;AAAA,MACA,OAAAO;AAAA,MACA,UAAAK;AAAA,MACA,WAAAC;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
1
+ {"version":3,"file":"test-sheet-item.js","sources":["../../../../../../../src/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.tsx"],"sourcesContent":["import type { ITestSheetItemProps } from './test-sheet-item-types';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport { memo, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { SHEET_STATE } from '../../../../../sheets/constants/sheet';\nimport ArrowTooltip from '../../../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Text from '../../../../../ui/text/text';\nimport { IS_CHAPTER_COMPLETED_STATES } from '../../../../create/milestone-create-constants';\nimport TestSheetItemCta from './test-sheet-item-cta';\nimport * as Styled from './test-sheet-item-styled';\nimport { getTopicsFromItems } from './test-sheet-item-utils';\n\nconst { COMPLETED } = SHEET_STATE;\n\nconst TEST_DIFFICULTY_LEVEL = {\n EASY: 'Easy',\n MODERATE: 'Moderate',\n DIFFICULT: 'Difficult',\n};\n\nconst TestSheetItem: FC<ITestSheetItemProps> = memo(props => {\n const { sheet, userType, milestoneId, studentId, onTestPreview, onTestReview, onTestStart } =\n props;\n const {\n title,\n items,\n sheet_time: sheetTime,\n state: testState,\n difficulty_level: difficultyLevel,\n } = sheet;\n\n const titleTextRef = useRef<HTMLDivElement>(null);\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n\n const totalSheetTime = useMemo(() => (sheetTime && Math.ceil(sheetTime / 60)) || 0, [sheetTime]);\n const topics = useMemo(() => getTopicsFromItems(items), [items]);\n const testChapterName = useMemo(() => topics.join(' '), [topics]);\n\n const noOfChapters = topics.length;\n\n const testDifficultyLevel = TEST_DIFFICULTY_LEVEL[difficultyLevel || 'EASY'];\n const isTestCompleted =\n testState === COMPLETED || IS_CHAPTER_COMPLETED_STATES.some(state => state === testState);\n\n useEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, [titleTextRef]);\n\n return (\n <Styled.TestItemCard\n $gapX={1.25}\n $gutterX={1.25}\n $flexGapX={1.25}\n $background={isTestCompleted ? 'WHITE_3' : 'WHITE_1'}\n $justifyContent=\"space-between\"\n >\n <FlexView $flexGap={4}>\n <Styled.TestTag $renderAs=\"ac4\" $color=\"BLACK_T_60\">\n {title}\n </Styled.TestTag>\n\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={testChapterName ?? ''}\n widthX={22.4375}\n hidden={!showTitleTooltip || !testChapterName}\n >\n <Styled.TestItemTitle ref={titleTextRef} $renderAs=\"ab2\">\n {testChapterName}\n </Styled.TestItemTitle>\n </ArrowTooltip>\n\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {noOfChapters} {pluralize(noOfChapters, 'Chapter')} {testDifficultyLevel} {' '}\n {totalSheetTime} Mins\n </Text>\n </FlexView>\n\n <FlexView $flexDirection=\"row\" $justifyContent=\"space-between\" $alignItems=\"center\">\n <TestSheetItemCta\n milestoneId={milestoneId}\n studentId={studentId}\n sheet={sheet}\n userType={userType}\n onTestPreview={onTestPreview}\n onTestReview={onTestReview}\n onTestStart={onTestStart}\n />\n </FlexView>\n </Styled.TestItemCard>\n );\n});\n\nexport default TestSheetItem;\n"],"names":["COMPLETED","SHEET_STATE","TEST_DIFFICULTY_LEVEL","TestSheetItem","memo","props","sheet","userType","milestoneId","studentId","onTestPreview","onTestReview","onTestStart","title","items","sheetTime","testState","difficultyLevel","titleTextRef","useRef","showTitleTooltip","setShowTitleTooltip","useState","totalSheetTime","useMemo","topics","getTopicsFromItems","testChapterName","noOfChapters","testDifficultyLevel","isTestCompleted","IS_CHAPTER_COMPLETED_STATES","state","useEffect","jsxs","Styled.TestItemCard","FlexView","jsx","Styled.TestTag","ArrowTooltip","Styled.TestItemTitle","Text","pluralize","TestSheetItemCta"],"mappings":";;;;;;;;;;;AAeA,MAAM,EAAE,WAAAA,EAAc,IAAAC,GAEhBC,IAAwB;AAAA,EAC5B,MAAM;AAAA,EACN,UAAU;AAAA,EACV,WAAW;AACb,GAEMC,KAAyCC,EAAK,CAASC,MAAA;AACrD,QAAA,EAAE,OAAAC,GAAO,UAAAC,GAAU,aAAAC,GAAa,WAAAC,GAAW,eAAAC,GAAe,cAAAC,GAAc,aAAAC,EAC5E,IAAAP,GACI;AAAA,IACJ,OAAAQ;AAAA,IACA,OAAAC;AAAA,IACA,YAAYC;AAAA,IACZ,OAAOC;AAAA,IACP,kBAAkBC;AAAA,EAChB,IAAAX,GAEEY,IAAeC,EAAuB,IAAI,GAC1C,CAACC,GAAkBC,CAAmB,IAAIC,EAAS,EAAK,GAExDC,IAAiBC,EAAQ,MAAOT,KAAa,KAAK,KAAKA,IAAY,EAAE,KAAM,GAAG,CAACA,CAAS,CAAC,GACzFU,IAASD,EAAQ,MAAME,EAAmBZ,CAAK,GAAG,CAACA,CAAK,CAAC,GACzDa,IAAkBH,EAAQ,MAAMC,EAAO,KAAK,KAAK,GAAG,CAACA,CAAM,CAAC,GAE5DG,IAAeH,EAAO,QAEtBI,IAAsB3B,EAAsBe,KAAmB,MAAM,GACrEa,IACJd,MAAchB,KAAa+B,EAA4B,KAAK,CAAAC,MAASA,MAAUhB,CAAS;AAE1F,SAAAiB,EAAU,MAAM;AACd,IACEf,EAAa,WACbA,EAAa,QAAQ,eAAeA,EAAa,QAAQ,gBAEzDG,EAAoB,EAAI;AAAA,EAC1B,GACC,CAACH,CAAY,CAAC,GAGf,gBAAAgB;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,UAAU;AAAA,MACV,WAAW;AAAA,MACX,aAAaL,IAAkB,YAAY;AAAA,MAC3C,iBAAgB;AAAA,MAEhB,UAAA;AAAA,QAAC,gBAAAI,EAAAE,GAAA,EAAS,UAAU,GAClB,UAAA;AAAA,UAAA,gBAAAC,EAACC,GAAA,EAAe,WAAU,OAAM,QAAO,cACpC,UACHzB,GAAA;AAAA,UAEA,gBAAAwB;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,aAAaZ,KAAmB;AAAA,cAChC,QAAQ;AAAA,cACR,QAAQ,CAACP,KAAoB,CAACO;AAAA,cAE9B,UAAA,gBAAAU,EAACG,GAAA,EAAqB,KAAKtB,GAAc,WAAU,OAChD,UACHS,GAAA;AAAA,YAAA;AAAA,UACF;AAAA,UAEC,gBAAAO,EAAAO,GAAA,EAAK,WAAU,OAAM,QAAO,cAC1B,UAAA;AAAA,YAAAb;AAAA,YAAa;AAAA,YAAEc,EAAA,UAAUd,GAAc,SAAS;AAAA,YAAE;AAAA,YAAIC;AAAA,YAAoB;AAAA,YAAG;AAAA,YAC7EN;AAAA,YAAe;AAAA,UAAA,GAClB;AAAA,QAAA,GACF;AAAA,0BAECa,GAAS,EAAA,gBAAe,OAAM,iBAAgB,iBAAgB,aAAY,UACzE,UAAA,gBAAAC;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,aAAAnC;AAAA,YACA,WAAAC;AAAA,YACA,OAAAH;AAAA,YACA,UAAAC;AAAA,YACA,eAAAG;AAAA,YACA,cAAAC;AAAA,YACA,aAAAC;AAAA,UAAA;AAAA,QAAA,GAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
@@ -1,19 +1,18 @@
1
1
  import { styled as o } from "styled-components";
2
- const p = o.div(({ theme: t }) => `
2
+ const e = o.div(({ theme: t }) => `
3
3
  position: absolute;
4
4
  bottom: ${t.layout.gutter}px;
5
5
  right: ${t.layout.gutter}px;
6
6
  box-shadow: 0px 10px 20px 0px ${t.colors.BLACK_T_20};
7
7
  border-radius: 50%;
8
- `), e = o.div`
8
+ `), p = o.div`
9
9
  display: grid;
10
- grid-template-columns: repeat(3, 200px);
11
- grid-gap: 32px;
12
- justify-content: center;
13
- padding: 32px 0;
10
+ grid-template-columns: repeat(2, 1fr);
11
+ grid-template-rows: max-content;
12
+ gap: 0;
14
13
  `;
15
14
  export {
16
- p as IconContainer,
17
- e as TestSheetItemWrapper
15
+ e as IconContainer,
16
+ p as TestSheetItemWrapper
18
17
  };
19
18
  //# sourceMappingURL=test-sheets-list-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-sheets-list-styled.js","sources":["../../../../../../src/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.tsx"],"sourcesContent":["import { styled } from 'styled-components';\n\nconst IconContainer = styled.div(({ theme }) => {\n return `\n position: absolute;\n bottom: ${theme.layout.gutter}px;\n right: ${theme.layout.gutter}px;\n box-shadow: 0px 10px 20px 0px ${theme.colors.BLACK_T_20};\n border-radius: 50%;\n `;\n});\n\nconst TestSheetItemWrapper = 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\nexport { IconContainer, TestSheetItemWrapper };\n"],"names":["IconContainer","styled","theme","TestSheetItemWrapper"],"mappings":";AAEA,MAAMA,IAAgBC,EAAO,IAAI,CAAC,EAAE,OAAAC,QAC3B;AAAA;AAAA,cAEKA,EAAM,OAAO,MAAM;AAAA,aACpBA,EAAM,OAAO,MAAM;AAAA,oCACIA,EAAM,OAAO,UAAU;AAAA;AAAA,GAG1D,GAEKC,IAAuBF,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"test-sheets-list-styled.js","sources":["../../../../../../src/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.tsx"],"sourcesContent":["import { styled } from 'styled-components';\n\nconst IconContainer = styled.div(({ theme }) => {\n return `\n position: absolute;\n bottom: ${theme.layout.gutter}px;\n right: ${theme.layout.gutter}px;\n box-shadow: 0px 10px 20px 0px ${theme.colors.BLACK_T_20};\n border-radius: 50%;\n `;\n});\n\nconst TestSheetItemWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n grid-template-rows: max-content;\n gap: 0;\n`;\n\nexport { IconContainer, TestSheetItemWrapper };\n"],"names":["IconContainer","styled","theme","TestSheetItemWrapper"],"mappings":";AAEA,MAAMA,IAAgBC,EAAO,IAAI,CAAC,EAAE,OAAAC,QAC3B;AAAA;AAAA,cAEKA,EAAM,OAAO,MAAM;AAAA,aACpBA,EAAM,OAAO,MAAM;AAAA,oCACIA,EAAM,OAAO,UAAU;AAAA;AAAA,GAG1D,GAEKC,IAAuBF,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,56 +1,56 @@
1
- import { jsx as e, jsxs as T, Fragment as M } from "react/jsx-runtime";
2
- import { memo as H, useCallback as o, useEffect as R } from "react";
3
- import { IMAGES as X } from "../../../../assets/images/images.js";
4
- import j from "../../../ui/arrow-tooltip/arrow-tooltip.js";
5
- import v from "../../../ui/buttons/button/button.js";
6
- import L from "../../../ui/layout/flex-view.js";
7
- import D from "../../../ui/loader/app-loader/app-loader.js";
8
- import $ from "../../../ui/separator/separator.js";
9
- import _ from "../../../ui/text/text.js";
10
- import { useGetTestHelpData as W } from "../../milestone-list-container/api/get-tests-list.js";
11
- import { TESTS_CREATION_ANALYTICS_EVENTS as F } from "../tests-creation/tests-creation-analytics-events.js";
12
- import G from "./test-sheets-list/test-sheets-list.js";
1
+ import { jsx as e, jsxs as T, Fragment as k } from "react/jsx-runtime";
2
+ import { memo as R, useCallback as o, useEffect as X } from "react";
3
+ import { IMAGES as j } from "../../../../assets/images/images.js";
4
+ import L from "../../../ui/arrow-tooltip/arrow-tooltip.js";
5
+ import I from "../../../ui/buttons/button/button.js";
6
+ import D from "../../../ui/layout/flex-view.js";
7
+ import H from "../../../ui/loader/app-loader/app-loader.js";
8
+ import _ from "../../../ui/separator/separator.js";
9
+ import $ from "../../../ui/text/text.js";
10
+ import { useGetTestHelpData as F } from "../../milestone-list-container/api/get-tests-list.js";
11
+ import { TESTS_CREATION_ANALYTICS_EVENTS as G } from "../tests-creation/tests-creation-analytics-events.js";
12
+ import U from "./test-sheets-list/test-sheets-list.js";
13
13
  import { TestHelpWrapper as a } from "./tests-list-styled.js";
14
- const ne = H((u) => {
14
+ const ne = R((u) => {
15
15
  const {
16
16
  isChaptersAvailable: g,
17
- isDraftMilestone: b,
17
+ isDraftMilestone: w,
18
18
  isMilestoneActive: s,
19
- userType: w,
19
+ userType: b,
20
20
  studentId: l,
21
21
  userMilestoneId: t,
22
22
  canUpdatePlan: C
23
23
  } = u, { onCreateMilestoneTest: n, onTestPreview: c, onTestReview: d, onTestStart: p } = u, {
24
- get: E,
24
+ get: A,
25
25
  data: r,
26
26
  isProcessingFailed: m,
27
27
  isProcessed: f,
28
- isStale: I,
29
- isProcessing: A
30
- } = W(), y = !C || !g || !s || s && b, P = s && !g ? "Chapters need to be assigned" : b ? "Allowed after plan is published" : "Plan is completed", h = o(() => {
31
- E(t, void 0, {
28
+ isStale: y,
29
+ isProcessing: S
30
+ } = F(), v = !C || !g || !s || s && w, P = s && !g ? "Chapters need to be assigned" : w ? "Allowed after plan is published" : "Plan is completed", h = o(() => {
31
+ A(t, void 0, {
32
32
  studentId: l
33
33
  });
34
- }, [E, l, t]);
35
- R(() => {
36
- !A && (!f && !m || I) && h();
37
- }, [h, f, A, m, I]);
38
- const S = o(() => {
34
+ }, [A, l, t]);
35
+ X(() => {
36
+ !S && (!f && !m || y) && h();
37
+ }, [h, f, S, m, y]);
38
+ const E = o(() => {
39
39
  if (typeof n == "function") {
40
40
  n == null || n(t, ((r == null ? void 0 : r.length) || 0) + 1);
41
41
  return;
42
42
  }
43
43
  throw new Error("No callback provided. If provided it must be a function");
44
- }, [n, t, r]), k = o(
45
- (i, x) => {
44
+ }, [n, t, r]), N = o(
45
+ (i, M) => {
46
46
  if (typeof c == "function") {
47
- c(i, x);
47
+ c(i, M);
48
48
  return;
49
49
  }
50
50
  throw new Error("No callback provided. If provided it must be a function");
51
51
  },
52
52
  [c]
53
- ), N = o(
53
+ ), O = o(
54
54
  (i) => {
55
55
  if (typeof p == "function") {
56
56
  p(i);
@@ -59,7 +59,7 @@ const ne = H((u) => {
59
59
  throw new Error("No callback provided. If provided it must be a function");
60
60
  },
61
61
  [p]
62
- ), O = o(
62
+ ), x = o(
63
63
  (i) => {
64
64
  if (typeof d == "function") {
65
65
  d(i, t);
@@ -69,10 +69,10 @@ const ne = H((u) => {
69
69
  },
70
70
  [d, t]
71
71
  );
72
- return m ? /* @__PURE__ */ e(a, { $alignItems: "center", $justifyContent: "center", $background: "WHITE", children: /* @__PURE__ */ T(L, { $flexGapX: 1.5, $alignItems: "center", $justifyContent: "center", children: [
73
- /* @__PURE__ */ e(_, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
72
+ return m ? /* @__PURE__ */ e(a, { $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ T(D, { $flexGapX: 1.5, $alignItems: "center", $justifyContent: "center", children: [
73
+ /* @__PURE__ */ e($, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
74
74
  /* @__PURE__ */ e(
75
- v,
75
+ I,
76
76
  {
77
77
  widthX: 14,
78
78
  size: "small",
@@ -83,60 +83,51 @@ const ne = H((u) => {
83
83
  }
84
84
  )
85
85
  ] }) }) : f ? r != null && r.length ? /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
86
- G,
86
+ U,
87
87
  {
88
88
  milestoneId: t,
89
89
  sheets: r,
90
- userType: w,
90
+ userType: b,
91
91
  studentId: l,
92
- onCreateNewTest: S,
93
- onTestPreview: k,
94
- onTestReview: O,
95
- onTestStart: N,
92
+ onCreateNewTest: E,
93
+ onTestPreview: N,
94
+ onTestReview: x,
95
+ onTestStart: O,
96
96
  canUpdatedPlan: C,
97
97
  isMilestoneActive: s
98
98
  }
99
- ) }) : /* @__PURE__ */ T(
100
- a,
101
- {
102
- $gapX: 6.75,
103
- $alignItems: "center",
104
- $justifyContent: "center",
105
- $background: "WHITE",
106
- children: [
107
- /* @__PURE__ */ e("img", { src: X.EMPTY_MIX_TESTS, alt: "empty_mix_tests" }),
108
- /* @__PURE__ */ e($, { heightX: 2 }),
109
- w === "TEACHER" ? /* @__PURE__ */ T(M, { children: [
110
- /* @__PURE__ */ e(
111
- j,
99
+ ) }) : /* @__PURE__ */ T(a, { $gapX: 6.75, $alignItems: "center", $justifyContent: "center", children: [
100
+ /* @__PURE__ */ e("img", { src: j.EMPTY_MIX_TESTS, alt: "empty_mix_tests" }),
101
+ /* @__PURE__ */ e(_, { heightX: 2 }),
102
+ b === "TEACHER" ? /* @__PURE__ */ T(k, { children: [
103
+ /* @__PURE__ */ e(
104
+ L,
105
+ {
106
+ renderAs: "primary",
107
+ position: "bottom",
108
+ hidden: !v,
109
+ tooltipItem: P,
110
+ children: /* @__PURE__ */ e(
111
+ I,
112
112
  {
113
+ widthX: 10,
113
114
  renderAs: "primary",
114
- position: "bottom",
115
- hidden: !y,
116
- tooltipItem: P,
117
- children: /* @__PURE__ */ e(
118
- v,
119
- {
120
- widthX: 10,
121
- renderAs: "primary",
122
- shape: "square",
123
- size: "small",
124
- label: "Create a Test",
125
- onClick: S,
126
- disabled: y,
127
- analyticsLabel: F.CUSTOM_TEST_CREATION_STARTED,
128
- analyticsProps: {
129
- milestone_id: t
130
- }
131
- }
132
- )
115
+ shape: "square",
116
+ size: "small",
117
+ label: "Create a Test",
118
+ onClick: E,
119
+ disabled: v,
120
+ analyticsLabel: G.CUSTOM_TEST_CREATION_STARTED,
121
+ analyticsProps: {
122
+ milestone_id: t
123
+ }
133
124
  }
134
- ),
135
- /* @__PURE__ */ e($, { heightX: 2 })
136
- ] }) : /* @__PURE__ */ e(_, { $renderAs: "ab2-bold", $color: "BLACK_T_87", children: "Wait for the teacher to create a test" })
137
- ]
138
- }
139
- ) : /* @__PURE__ */ e(a, { $alignItems: "center", $justifyContent: "center", $background: "WHITE", children: /* @__PURE__ */ e(D, { height: "100%" }) });
125
+ )
126
+ }
127
+ ),
128
+ /* @__PURE__ */ e(_, { heightX: 2 })
129
+ ] }) : /* @__PURE__ */ e($, { $renderAs: "ab2-bold", $color: "BLACK_T_87", children: "Wait for the teacher to create a test" })
130
+ ] }) : /* @__PURE__ */ e(a, { $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ e(H, { height: "100%" }) });
140
131
  });
141
132
  export {
142
133
  ne as default