@cuemath/leap 3.5.73 → 3.5.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/blockers/multi-tab-blocker/multi-tab-blocker.js +10 -10
- package/dist/features/blockers/multi-tab-blocker/multi-tab-blocker.js.map +1 -1
- package/dist/features/chapters/chapter/comps/supplementary-resources/supplementary-resources.js +15 -15
- package/dist/features/chapters/chapter/comps/supplementary-resources/supplementary-resources.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/block-section.js +22 -22
- package/dist/features/chapters/lpar-chapter/block-section/block-section.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block-action.js +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block-action.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block-header.js +11 -11
- package/dist/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block-header.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-item.js +20 -20
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-item.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/question-overview.js +10 -10
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/question-overview.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/student-actions/student-actions.js +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/student-actions/student-actions.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/context-menu-helper/menu-element.js +5 -5
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/context-menu-helper/menu-element.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions.js +12 -12
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/teacher-actions/teacher-actions.js +6 -6
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/sheet-item.js +15 -15
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/sheet-item.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/comps/chapter-progress.js +5 -5
- package/dist/features/chapters/lpar-chapter/comps/chapter-progress.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/comps/tab-section.js +9 -9
- package/dist/features/chapters/lpar-chapter/comps/tab-section.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/lpar-chapter-banner/chapter-banner.js +24 -24
- package/dist/features/chapters/lpar-chapter/lpar-chapter-banner/chapter-banner.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/puzzle-section/puzzle-card/cue-coins.js +6 -6
- package/dist/features/chapters/lpar-chapter/puzzle-section/puzzle-card/cue-coins.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/puzzle-section/puzzle-card/puzzle-card.js +23 -23
- package/dist/features/chapters/lpar-chapter/puzzle-section/puzzle-card/puzzle-card.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/puzzle-section/puzzle-section.js +11 -11
- package/dist/features/chapters/lpar-chapter/puzzle-section/puzzle-section.js.map +1 -1
- package/dist/features/chapters/lpar-milestone-chapter/block-section/block-section.js +21 -21
- package/dist/features/chapters/lpar-milestone-chapter/block-section/block-section.js.map +1 -1
- package/dist/features/chapters/lpar-milestone-chapter/block-section/sheet-item/rewards-n-actions/rewards-n-actions.js +12 -12
- package/dist/features/chapters/lpar-milestone-chapter/block-section/sheet-item/rewards-n-actions/rewards-n-actions.js.map +1 -1
- package/dist/features/chapters/lpar-milestone-chapter/block-section/sheet-item/sheet-info.js +13 -13
- package/dist/features/chapters/lpar-milestone-chapter/block-section/sheet-item/sheet-info.js.map +1 -1
- package/dist/features/chapters/lpar-milestone-chapter/extra-practice-section/extra-practice-section.js +13 -13
- package/dist/features/chapters/lpar-milestone-chapter/extra-practice-section/extra-practice-section.js.map +1 -1
- package/dist/features/chapters/lpar-milestone-chapter/puzzle-section/puzzle-card.js +22 -22
- package/dist/features/chapters/lpar-milestone-chapter/puzzle-section/puzzle-card.js.map +1 -1
- package/dist/features/chapters/lpar-milestone-chapter/puzzle-section/puzzle-section.js +12 -12
- package/dist/features/chapters/lpar-milestone-chapter/puzzle-section/puzzle-section.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +10 -10
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
- package/dist/features/cue-canvas/bottombar/homework-controls.js +1 -1
- package/dist/features/cue-canvas/bottombar/homework-controls.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/homework/homework-menu.js +10 -10
- package/dist/features/cue-canvas/sidebar/homework/homework-menu.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/homework/homework-request.js +12 -12
- package/dist/features/cue-canvas/sidebar/homework/homework-request.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/puzzles/filter-selection-menu.js +1 -1
- package/dist/features/cue-canvas/sidebar/puzzles/filter-selection-menu.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/puzzles/filters-section.js +11 -11
- package/dist/features/cue-canvas/sidebar/puzzles/filters-section.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/puzzles/filters.js +31 -31
- package/dist/features/cue-canvas/sidebar/puzzles/filters.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu-header.js +1 -1
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu-header.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu.js +18 -18
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu.js.map +1 -1
- package/dist/features/extra-practice/extra-practice.js +16 -16
- package/dist/features/extra-practice/extra-practice.js.map +1 -1
- package/dist/features/extra-practice/list/list.js +16 -16
- package/dist/features/extra-practice/list/list.js.map +1 -1
- package/dist/features/milestone/create/comps/info-points/info-points.js +5 -5
- package/dist/features/milestone/create/comps/info-points/info-points.js.map +1 -1
- package/dist/features/milestone/create/comps/milestone-progress/milestone-progress.js +11 -11
- package/dist/features/milestone/create/comps/milestone-progress/milestone-progress.js.map +1 -1
- package/dist/features/milestone/create/submit-modal/submit-with-plan-modal/submit-with-plan-modal.js +32 -32
- package/dist/features/milestone/create/submit-modal/submit-with-plan-modal/submit-with-plan-modal.js.map +1 -1
- package/dist/features/milestone/edit/comps/delete-milestone/confirm-delete.js +3 -3
- package/dist/features/milestone/edit/comps/delete-milestone/confirm-delete.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/edit-milestone.js +19 -19
- package/dist/features/milestone/edit/comps/edit-milestone-modal/edit-milestone.js.map +1 -1
- package/dist/features/milestone/milestone-action-widget/milestone-action-widget.js +21 -21
- package/dist/features/milestone/milestone-action-widget/milestone-action-widget.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +16 -16
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +14 -14
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
- package/dist/features/milestone/outcome/comps/achievement/achievement-constants.js +6 -6
- package/dist/features/milestone/outcome/comps/achievement/achievement-constants.js.map +1 -1
- package/dist/features/milestone/outcome/comps/achievement/achievement-container.js +20 -20
- package/dist/features/milestone/outcome/comps/achievement/achievement-container.js.map +1 -1
- package/dist/features/milestone/outcome/comps/achievement/reason-submit-modal.js +8 -8
- package/dist/features/milestone/outcome/comps/achievement/reason-submit-modal.js.map +1 -1
- package/dist/features/milestone/outcome/comps/outcome-collection/input-descriptor.js +4 -4
- package/dist/features/milestone/outcome/comps/outcome-collection/input-descriptor.js.map +1 -1
- package/dist/features/milestone/outcome/comps/outcome-collection/milestone-outcome-collection-container.js +5 -5
- package/dist/features/milestone/outcome/comps/outcome-collection/milestone-outcome-collection-container.js.map +1 -1
- package/dist/features/milestone/outcome/comps/outcome-collection/rank-inputs/index.js +12 -12
- package/dist/features/milestone/outcome/comps/outcome-collection/rank-inputs/index.js.map +1 -1
- package/dist/features/milestone/outcome/comps/past-milestone/past-milestone-container.js +5 -5
- package/dist/features/milestone/outcome/comps/past-milestone/past-milestone-container.js.map +1 -1
- package/dist/features/milestone/outcome/comps/past-milestone/question.js +3 -3
- package/dist/features/milestone/outcome/comps/past-milestone/question.js.map +1 -1
- package/dist/features/milestone/outcome/milestone-outcome-container.js +8 -8
- package/dist/features/milestone/outcome/milestone-outcome-container.js.map +1 -1
- package/dist/features/milestone/start/milestone-start.js +8 -8
- package/dist/features/milestone/start/milestone-start.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +1 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +1 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +1 -1
- package/dist/features/sheet-tools/tool-header/tool-header.js +19 -19
- package/dist/features/sheet-tools/tool-header/tool-header.js.map +1 -1
- package/dist/features/sheets/reference-sheet/reference-sheet.js +1 -1
- package/dist/features/sheets/reference-sheet/reference-sheet.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/context-menu-helper/menu-element/menu-element.js +9 -9
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/context-menu-helper/menu-element/menu-element.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/reward-n-actions.js +6 -6
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/reward-n-actions.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/sheet-item-tag.js +15 -15
- package/dist/features/sheets/sheets-list/sheet-item/sheet-item-tag.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/sheet-item.js +16 -16
- package/dist/features/sheets/sheets-list/sheet-item/sheet-item.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheets-list.js +18 -18
- package/dist/features/sheets/sheets-list/sheets-list.js.map +1 -1
- package/dist/features/student-details/student-details.js +6 -6
- package/dist/features/student-details/student-details.js.map +1 -1
- package/dist/features/student-details/wins-preview/wins-preview.js +8 -8
- package/dist/features/student-details/wins-preview/wins-preview.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/support-card/support-card.js +3 -3
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/support-card/support-card.js.map +1 -1
- package/dist/features/trial-session/comps/clock/clock.js +6 -6
- package/dist/features/trial-session/comps/clock/clock.js.map +1 -1
- package/dist/features/trial-session/comps/cue-tips/cues/index.js +5 -5
- package/dist/features/trial-session/comps/cue-tips/cues/index.js.map +1 -1
- package/dist/features/trial-session/comps/cue-tips/tips/index.js +6 -6
- package/dist/features/trial-session/comps/cue-tips/tips/index.js.map +1 -1
- package/dist/features/trial-session/comps/solutions/index.js +9 -9
- package/dist/features/trial-session/comps/solutions/index.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +16 -16
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +7 -7
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +1 -1
- package/dist/features/ui/callout/callout.js +5 -5
- package/dist/features/ui/callout/callout.js.map +1 -1
- package/dist/features/ui/error/error.js +14 -14
- package/dist/features/ui/error/error.js.map +1 -1
- package/dist/features/ui/inputs/base-input/base-input.js +4 -4
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/base-select-input/select-option/select-option.js +8 -8
- package/dist/features/ui/inputs/base-select-input/select-option/select-option.js.map +1 -1
- package/dist/features/ui/inputs/base-select-input/select-section/select-section.js +12 -12
- package/dist/features/ui/inputs/base-select-input/select-section/select-section.js.map +1 -1
- package/dist/features/ui/inputs/num-range-input/num-range-input.js +6 -6
- package/dist/features/ui/inputs/num-range-input/num-range-input.js.map +1 -1
- package/dist/features/ui/inputs/radio-input/radio-option/radio-option.js +3 -3
- package/dist/features/ui/inputs/radio-input/radio-option/radio-option.js.map +1 -1
- package/dist/features/ui/perfect-hits/perfect-hits.js +3 -3
- package/dist/features/ui/perfect-hits/perfect-hits.js.map +1 -1
- package/dist/features/ui/radio-cards/radio-card-option/radio-card-option.js +9 -9
- package/dist/features/ui/radio-cards/radio-card-option/radio-card-option.js.map +1 -1
- package/dist/features/ui/stepper/stepper.js +7 -7
- package/dist/features/ui/stepper/stepper.js.map +1 -1
- package/dist/features/ui/tag/tag.js +1 -1
- package/dist/features/ui/tag/tag.js.map +1 -1
- package/dist/features/ui/theme/input.js +13 -13
- package/dist/features/ui/theme/input.js.map +1 -1
- package/dist/features/ui/theme/tab.js +4 -4
- package/dist/features/ui/theme/tab.js.map +1 -1
- package/dist/features/ui/theme/text-button.js +3 -3
- package/dist/features/ui/theme/text-button.js.map +1 -1
- package/dist/features/ui/timers/countdown-timer/countdown-timer.js +14 -14
- package/dist/features/ui/timers/countdown-timer/countdown-timer.js.map +1 -1
- package/dist/features/wins-dashboard/belts-elements-stickers/belts.js +27 -27
- package/dist/features/wins-dashboard/belts-elements-stickers/belts.js.map +1 -1
- package/dist/features/wins-dashboard/belts-elements-stickers/elements.js +15 -23
- package/dist/features/wins-dashboard/belts-elements-stickers/elements.js.map +1 -1
- package/dist/features/wins-dashboard/belts-elements-stickers/reward-elements.js +12 -12
- package/dist/features/wins-dashboard/belts-elements-stickers/reward-elements.js.map +1 -1
- package/dist/features/wins-dashboard/header/wins-header.js +10 -10
- package/dist/features/wins-dashboard/header/wins-header.js.map +1 -1
- package/dist/features/wins-dashboard/student-badges/animated-tabbar.js +13 -13
- package/dist/features/wins-dashboard/student-badges/animated-tabbar.js.map +1 -1
- package/dist/features/wins-dashboard/student-badges/student-badge.js +18 -18
- package/dist/features/wins-dashboard/student-badges/student-badge.js.map +1 -1
- package/dist/features/wins-dashboard/student-badges/student-badges-lists.js +10 -10
- package/dist/features/wins-dashboard/student-badges/student-badges-lists.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/exit-ticket-intervention.js +2 -2
- package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/exit-ticket-intervention.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/exit-ticket-review-available.js +4 -4
- package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/exit-ticket-review-available.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/exit-ticket-review.js +7 -7
- package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/exit-ticket-review.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/exit-ticket-student-submission.js +2 -2
- package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/exit-ticket-student-submission.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/optional-items-assignment.js +5 -5
- package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/optional-items-assignment.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/optional-items-skip.js +1 -1
- package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/optional-items-skip.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-item-number/worksheet-item-number.js +20 -20
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-item-number/worksheet-item-number.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-permissions/error.js +11 -11
- package/dist/features/worksheet/worksheet/worksheet-permissions/error.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-permissions/sheet-locked.js +12 -12
- package/dist/features/worksheet/worksheet/worksheet-permissions/sheet-locked.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/header/header-tags.js +7 -7
- package/dist/features/worksheet/worksheet/worksheet-question/header/header-tags.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/header/header.js +21 -21
- package/dist/features/worksheet/worksheet/worksheet-question/header/header.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/intros/system-intros/advanced-practice-intro.js +6 -6
- package/dist/features/worksheet/worksheet/worksheet-question/intros/system-intros/advanced-practice-intro.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/intros/system-intros/basic-practice-intro.js +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/intros/system-intros/basic-practice-intro.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/intros/system-intros/exit-ticket-intro.js +4 -4
- package/dist/features/worksheet/worksheet/worksheet-question/intros/system-intros/exit-ticket-intro.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/intros/system-intros/regular-practice-intro.js +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/intros/system-intros/regular-practice-intro.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/subjective-feedback.js +41 -41
- package/dist/features/worksheet/worksheet/worksheet-question/subjective-feedback.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/subjective-review.js +23 -23
- package/dist/features/worksheet/worksheet/worksheet-question/subjective-review.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-summary/worksheet-questions-summary.js +6 -6
- package/dist/features/worksheet/worksheet/worksheet-questions-summary/worksheet-questions-summary.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-summary/worksheet-summary.js +1 -1
- package/dist/features/worksheet/worksheet/worksheet-summary/worksheet-summary.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools.js +18 -18
- package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js +11 -11
- package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +14 -14
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/package.json +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
|
@@ -4,14 +4,14 @@ import u from "../../ui/buttons/button/button.js";
|
|
|
4
4
|
import h from "../../ui/layout/flex-view.js";
|
|
5
5
|
import f from "../../ui/text/text.js";
|
|
6
6
|
import k from "./multi-tab-blocker-context.js";
|
|
7
|
-
import { EqualSpaceFlexView as
|
|
8
|
-
const l = "multi-tab-blocker",
|
|
9
|
-
function({ children:
|
|
7
|
+
import { EqualSpaceFlexView as x } from "./multi-tab-blocker-styled.js";
|
|
8
|
+
const l = "multi-tab-blocker", y = C(
|
|
9
|
+
function({ children: b, whitelist: a, onTabBlock: r }) {
|
|
10
10
|
const [o] = d(
|
|
11
11
|
() => (a == null ? void 0 : a.some((e) => window.location.pathname.startsWith(e))) ?? !1
|
|
12
|
-
), [n,
|
|
12
|
+
), [n, g] = d(!1), i = s(
|
|
13
13
|
(e) => {
|
|
14
|
-
|
|
14
|
+
g(!0), r == null || r(e);
|
|
15
15
|
},
|
|
16
16
|
[r]
|
|
17
17
|
), w = E(
|
|
@@ -52,9 +52,9 @@ const l = "multi-tab-blocker", x = C(
|
|
|
52
52
|
$background: "WHITE",
|
|
53
53
|
$borderRadiusX: 1,
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */ t(f, { $renderAs: "
|
|
56
|
-
/* @__PURE__ */ t(f, { $renderAs: "
|
|
57
|
-
/* @__PURE__ */ c(
|
|
55
|
+
/* @__PURE__ */ t(f, { $renderAs: "ah4-bold", $marginBottomX: 0.5, children: "Cuemath is open in another window." }),
|
|
56
|
+
/* @__PURE__ */ t(f, { $renderAs: "ub1", $marginBottomX: 1.5, children: 'Click "Use here" to use Cuemath in this window.' }),
|
|
57
|
+
/* @__PURE__ */ c(x, { $flexDirection: "row", $flexGapX: 2, children: [
|
|
58
58
|
/* @__PURE__ */ t(
|
|
59
59
|
u,
|
|
60
60
|
{
|
|
@@ -78,9 +78,9 @@ const l = "multi-tab-blocker", x = C(
|
|
|
78
78
|
}
|
|
79
79
|
)
|
|
80
80
|
}
|
|
81
|
-
) :
|
|
81
|
+
) : b });
|
|
82
82
|
}
|
|
83
|
-
), U =
|
|
83
|
+
), U = y;
|
|
84
84
|
export {
|
|
85
85
|
U as default
|
|
86
86
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-tab-blocker.js","sources":["../../../../src/features/blockers/multi-tab-blocker/multi-tab-blocker.tsx"],"sourcesContent":["import {\n memo,\n useCallback,\n useEffect,\n useMemo,\n useState,\n type FC,\n type PropsWithChildren,\n} from 'react';\n\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport MultiTabBlockerContext from './multi-tab-blocker-context';\nimport { EqualSpaceFlexView } from './multi-tab-blocker-styled';\nimport type { IMultiTabBlockerProps } from './multi-tab-blocker-types';\n\nconst STORAGE_KEY = 'multi-tab-blocker';\n\nconst MultiTabBlocker: FC<PropsWithChildren<IMultiTabBlockerProps>> = memo(\n function MultiTabBlocker({ children, whitelist, onTabBlock }) {\n const [isWhitelisted] = useState(\n () => whitelist?.some(path => window.location.pathname.startsWith(path)) ?? false,\n );\n const [isTabBlocked, setIsTabBlocked] = useState(false);\n const handleTabBlock = useCallback(\n (source: string) => {\n setIsTabBlocked(true);\n onTabBlock?.(source);\n },\n [onTabBlock],\n );\n const cachedContextValue = useMemo(\n () => ({ isTabBlocked, setIsTabBlocked: handleTabBlock }),\n [handleTabBlock, isTabBlocked],\n );\n\n const handleOnClose = useCallback(() => {\n window.location.href = 'https://cuemath.com';\n }, []);\n\n const handleOnUseHere = useCallback(() => {\n document.location.reload();\n }, []);\n\n /**\n * When the localStorage is changed from another tab, the storage event is triggered in all tabs except the one that triggered the change.\n * Block the tab when we detect that the localStorage has been changed from another tab.\n */\n useEffect(() => {\n const handleStorageEvent = (event: StorageEvent) => {\n if (event.key === STORAGE_KEY) {\n handleTabBlock('localStorage');\n window.removeEventListener('storage', handleStorageEvent);\n }\n };\n\n if (!isWhitelisted) {\n window.addEventListener('storage', handleStorageEvent);\n }\n\n return () => {\n if (!isWhitelisted) {\n window.removeEventListener('storage', handleStorageEvent);\n }\n };\n }, [handleTabBlock, isWhitelisted]);\n\n /**\n * When the new tab is opened and is visible, set the localStorage key to the current timestamp.\n * When the tab is hidden, wait for it to become visible and set the localStorage key to the current timestamp.\n * Which triggers the storage event in other tabs, blocking them.\n */\n useEffect(() => {\n let setStorageKeyWhenVisible: () => void;\n\n if (!isWhitelisted && !isTabBlocked) {\n if (!document.hidden) {\n window.localStorage.setItem(STORAGE_KEY, Date.now().toString());\n } else {\n setStorageKeyWhenVisible = () => {\n if (!document.hidden) {\n window.localStorage.setItem(STORAGE_KEY, Date.now().toString());\n }\n\n document.removeEventListener('visibilitychange', setStorageKeyWhenVisible);\n };\n\n document.addEventListener('visibilitychange', setStorageKeyWhenVisible);\n }\n }\n\n return () => {\n if (setStorageKeyWhenVisible) {\n document.removeEventListener('visibilitychange', setStorageKeyWhenVisible);\n }\n };\n }, [isTabBlocked, isWhitelisted]);\n\n return (\n <MultiTabBlockerContext.Provider value={cachedContextValue}>\n {isTabBlocked ? (\n <FlexView\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $height=\"100vh\"\n $background=\"BLACK_75\"\n >\n <FlexView\n $gutterX={1.5}\n $gapX={1.5}\n $widthX={32}\n $background=\"WHITE\"\n $borderRadiusX={1}\n >\n <Text $renderAs=\"
|
|
1
|
+
{"version":3,"file":"multi-tab-blocker.js","sources":["../../../../src/features/blockers/multi-tab-blocker/multi-tab-blocker.tsx"],"sourcesContent":["import {\n memo,\n useCallback,\n useEffect,\n useMemo,\n useState,\n type FC,\n type PropsWithChildren,\n} from 'react';\n\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport MultiTabBlockerContext from './multi-tab-blocker-context';\nimport { EqualSpaceFlexView } from './multi-tab-blocker-styled';\nimport type { IMultiTabBlockerProps } from './multi-tab-blocker-types';\n\nconst STORAGE_KEY = 'multi-tab-blocker';\n\nconst MultiTabBlocker: FC<PropsWithChildren<IMultiTabBlockerProps>> = memo(\n function MultiTabBlocker({ children, whitelist, onTabBlock }) {\n const [isWhitelisted] = useState(\n () => whitelist?.some(path => window.location.pathname.startsWith(path)) ?? false,\n );\n const [isTabBlocked, setIsTabBlocked] = useState(false);\n const handleTabBlock = useCallback(\n (source: string) => {\n setIsTabBlocked(true);\n onTabBlock?.(source);\n },\n [onTabBlock],\n );\n const cachedContextValue = useMemo(\n () => ({ isTabBlocked, setIsTabBlocked: handleTabBlock }),\n [handleTabBlock, isTabBlocked],\n );\n\n const handleOnClose = useCallback(() => {\n window.location.href = 'https://cuemath.com';\n }, []);\n\n const handleOnUseHere = useCallback(() => {\n document.location.reload();\n }, []);\n\n /**\n * When the localStorage is changed from another tab, the storage event is triggered in all tabs except the one that triggered the change.\n * Block the tab when we detect that the localStorage has been changed from another tab.\n */\n useEffect(() => {\n const handleStorageEvent = (event: StorageEvent) => {\n if (event.key === STORAGE_KEY) {\n handleTabBlock('localStorage');\n window.removeEventListener('storage', handleStorageEvent);\n }\n };\n\n if (!isWhitelisted) {\n window.addEventListener('storage', handleStorageEvent);\n }\n\n return () => {\n if (!isWhitelisted) {\n window.removeEventListener('storage', handleStorageEvent);\n }\n };\n }, [handleTabBlock, isWhitelisted]);\n\n /**\n * When the new tab is opened and is visible, set the localStorage key to the current timestamp.\n * When the tab is hidden, wait for it to become visible and set the localStorage key to the current timestamp.\n * Which triggers the storage event in other tabs, blocking them.\n */\n useEffect(() => {\n let setStorageKeyWhenVisible: () => void;\n\n if (!isWhitelisted && !isTabBlocked) {\n if (!document.hidden) {\n window.localStorage.setItem(STORAGE_KEY, Date.now().toString());\n } else {\n setStorageKeyWhenVisible = () => {\n if (!document.hidden) {\n window.localStorage.setItem(STORAGE_KEY, Date.now().toString());\n }\n\n document.removeEventListener('visibilitychange', setStorageKeyWhenVisible);\n };\n\n document.addEventListener('visibilitychange', setStorageKeyWhenVisible);\n }\n }\n\n return () => {\n if (setStorageKeyWhenVisible) {\n document.removeEventListener('visibilitychange', setStorageKeyWhenVisible);\n }\n };\n }, [isTabBlocked, isWhitelisted]);\n\n return (\n <MultiTabBlockerContext.Provider value={cachedContextValue}>\n {isTabBlocked ? (\n <FlexView\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $height=\"100vh\"\n $background=\"BLACK_75\"\n >\n <FlexView\n $gutterX={1.5}\n $gapX={1.5}\n $widthX={32}\n $background=\"WHITE\"\n $borderRadiusX={1}\n >\n <Text $renderAs=\"ah4-bold\" $marginBottomX={0.5}>\n Cuemath is open in another window.\n </Text>\n <Text $renderAs=\"ub1\" $marginBottomX={1.5}>\n Click \"Use here\" to use Cuemath in this window.\n </Text>\n <EqualSpaceFlexView $flexDirection=\"row\" $flexGapX={2}>\n <Button\n renderAs=\"secondary\"\n label=\"Close\"\n analyticsLabel=\"Multi Tab Close\"\n onClick={handleOnClose}\n />\n <Button\n renderAs=\"primary\"\n label=\"Use here\"\n analyticsLabel=\"Multi Tab Use Here\"\n onClick={handleOnUseHere}\n />\n </EqualSpaceFlexView>\n </FlexView>\n </FlexView>\n ) : (\n children\n )}\n </MultiTabBlockerContext.Provider>\n );\n },\n);\n\nexport default MultiTabBlocker;\n"],"names":["STORAGE_KEY","MultiTabBlocker","memo","children","whitelist","onTabBlock","isWhitelisted","useState","path","isTabBlocked","setIsTabBlocked","handleTabBlock","useCallback","source","cachedContextValue","useMemo","handleOnClose","handleOnUseHere","useEffect","handleStorageEvent","event","setStorageKeyWhenVisible","MultiTabBlockerContext","jsx","FlexView","jsxs","Text","EqualSpaceFlexView","Button","MultiTabBlocker$1"],"mappings":";;;;;;;AAiBA,MAAMA,IAAc,qBAEdC,IAAgEC;AAAA,EACpE,SAAyB,EAAE,UAAAC,GAAU,WAAAC,GAAW,YAAAC,KAAc;AACtD,UAAA,CAACC,CAAa,IAAIC;AAAA,MACtB,OAAMH,KAAA,gBAAAA,EAAW,KAAK,CAAQI,MAAA,OAAO,SAAS,SAAS,WAAWA,CAAI,OAAM;AAAA,IAAA,GAExE,CAACC,GAAcC,CAAe,IAAIH,EAAS,EAAK,GAChDI,IAAiBC;AAAA,MACrB,CAACC,MAAmB;AAClB,QAAAH,EAAgB,EAAI,GACpBL,KAAA,QAAAA,EAAaQ;AAAA,MACf;AAAA,MACA,CAACR,CAAU;AAAA,IAAA,GAEPS,IAAqBC;AAAA,MACzB,OAAO,EAAE,cAAAN,GAAc,iBAAiBE;MACxC,CAACA,GAAgBF,CAAY;AAAA,IAAA,GAGzBO,IAAgBJ,EAAY,M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AK,EAAA,WAAU,YAAW,gBAAgB,KAAK,UAEhD,sCAAA;AAAA,gCACCA,GAAK,EAAA,WAAU,OAAM,gBAAgB,KAAK,UAE3C,mDAAA;AAAA,cACC,gBAAAD,EAAAE,GAAA,EAAmB,gBAAe,OAAM,WAAW,GAClD,UAAA;AAAA,gBAAA,gBAAAJ;AAAA,kBAACK;AAAA,kBAAA;AAAA,oBACC,UAAS;AAAA,oBACT,OAAM;AAAA,oBACN,gBAAe;AAAA,oBACf,SAASZ;AAAA,kBAAA;AAAA,gBACX;AAAA,gBACA,gBAAAO;AAAA,kBAACK;AAAA,kBAAA;AAAA,oBACC,UAAS;AAAA,oBACT,OAAM;AAAA,oBACN,gBAAe;AAAA,oBACf,SAASX;AAAA,kBAAA;AAAA,gBACX;AAAA,cAAA,GACF;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA,IAGFd,EAEJ,CAAA;AAAA,EAEJ;AACF,GAEA0B,IAAe5B;"}
|
package/dist/features/chapters/chapter/comps/supplementary-resources/supplementary-resources.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import { memo as D, useRef as
|
|
3
|
-
import { useTheme as
|
|
2
|
+
import { memo as D, useRef as v, useState as O, useMemo as X, useCallback as _ } from "react";
|
|
3
|
+
import { useTheme as y } from "styled-components";
|
|
4
4
|
import G from "../../../../sheets/resources-list/resources-list.js";
|
|
5
5
|
import L, { useUIContext as I } from "../../../../ui/context/context.js";
|
|
6
6
|
import N from "../../../../ui/context/use-tracking-context.js";
|
|
7
7
|
import m from "../../../../ui/layout/flex-view.js";
|
|
8
|
-
import
|
|
8
|
+
import b from "../../../../ui/text/text.js";
|
|
9
9
|
import { SupplementaryResourcesContainer as S, ScrollFlexView as j, Tab as P, WrappedText as B } from "./supplementary-resources-styled.js";
|
|
10
10
|
import { getResourceTabName as F } from "./utils.js";
|
|
11
|
-
const K = (
|
|
12
|
-
const a = C
|
|
11
|
+
const K = (g, t) => t.find((C) => {
|
|
12
|
+
const a = g[C];
|
|
13
13
|
return a ? a.length > 0 : void 0;
|
|
14
14
|
}) ?? "assigned", te = D(
|
|
15
15
|
function({
|
|
16
16
|
groupedSupplementarySheets: t,
|
|
17
17
|
userType: u,
|
|
18
|
-
isDefocused:
|
|
18
|
+
isDefocused: C,
|
|
19
19
|
...a
|
|
20
20
|
}) {
|
|
21
21
|
const {
|
|
22
22
|
handleOnCreateExtraPractice: U,
|
|
23
23
|
teacherId: V,
|
|
24
24
|
groupedSupplementarySheetsSortOrder: h,
|
|
25
|
-
...
|
|
26
|
-
} = a, A =
|
|
25
|
+
...k
|
|
26
|
+
} = a, A = y(), i = v(0), [l, R] = O(() => K(t, h)), w = N({ tab: l }), { onEvent: $ } = I(), d = u === "TEACHER", { keys: p, newAssignedSheetsCount: x } = X(() => {
|
|
27
27
|
const n = t.assigned ?? [], e = n.reduce((r, T) => T.state === "NOT_STARTED" ? r + 1 : r, 0), o = {};
|
|
28
28
|
return e > 0 && (o.assigned = e), i.current = d ? 0 : n.length, t && h.forEach((r) => {
|
|
29
29
|
const f = (t[r] || []).length;
|
|
30
30
|
r !== "assigned" && d && (i.current += f), f && (o[r] = f);
|
|
31
31
|
}), { keys: o, newAssignedSheetsCount: e };
|
|
32
|
-
}, [t, h, d]), E =
|
|
32
|
+
}, [t, h, d]), E = _(
|
|
33
33
|
(n) => {
|
|
34
34
|
R(n), $("clicked", {
|
|
35
35
|
cta: n
|
|
@@ -37,7 +37,7 @@ const K = (C, t) => t.find((b) => {
|
|
|
37
37
|
},
|
|
38
38
|
[$]
|
|
39
39
|
);
|
|
40
|
-
return i.current === 0 ? null : /* @__PURE__ */ s(L.Provider, { value:
|
|
40
|
+
return i.current === 0 ? null : /* @__PURE__ */ s(L.Provider, { value: w, children: /* @__PURE__ */ c(
|
|
41
41
|
S,
|
|
42
42
|
{
|
|
43
43
|
$flexGap: A.layout.gutter * 1.5,
|
|
@@ -45,12 +45,12 @@ const K = (C, t) => t.find((b) => {
|
|
|
45
45
|
$flexGapX: 2,
|
|
46
46
|
children: [
|
|
47
47
|
/* @__PURE__ */ c(m, { $flexGap: 8, children: [
|
|
48
|
-
/* @__PURE__ */ c(
|
|
48
|
+
/* @__PURE__ */ c(b, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
|
|
49
49
|
"resources (",
|
|
50
50
|
i.current,
|
|
51
51
|
")"
|
|
52
52
|
] }),
|
|
53
|
-
d && /* @__PURE__ */ s(
|
|
53
|
+
d && /* @__PURE__ */ s(b, { $renderAs: "ub3", $color: "BLACK_T_60", children: "Only assigned sheets are visible to the student" })
|
|
54
54
|
] }),
|
|
55
55
|
/* @__PURE__ */ s(j, { $flexDirection: "row", children: Object.entries(p).map((n) => {
|
|
56
56
|
const [e, o] = n, r = F(e, o ?? 0);
|
|
@@ -60,7 +60,7 @@ const K = (C, t) => t.find((b) => {
|
|
|
60
60
|
$selected: l === e,
|
|
61
61
|
onClick: () => E(e),
|
|
62
62
|
children: /* @__PURE__ */ c(m, { $flexDirection: "row", $flexGapX: 0.375, children: [
|
|
63
|
-
/* @__PURE__ */ s(
|
|
63
|
+
/* @__PURE__ */ s(b, { $renderAs: l === e ? "ub2-bold" : "ub2", children: r }),
|
|
64
64
|
e === "assigned" && !!x && /* @__PURE__ */ s(
|
|
65
65
|
m,
|
|
66
66
|
{
|
|
@@ -69,7 +69,7 @@ const K = (C, t) => t.find((b) => {
|
|
|
69
69
|
$gapX: 0.125,
|
|
70
70
|
$gutterX: 0.25,
|
|
71
71
|
$alignItems: "center",
|
|
72
|
-
children: /* @__PURE__ */ c(B, { $renderAs: "
|
|
72
|
+
children: /* @__PURE__ */ c(B, { $renderAs: "ac4-black", children: [
|
|
73
73
|
x,
|
|
74
74
|
" New"
|
|
75
75
|
] })
|
|
@@ -85,7 +85,7 @@ const K = (C, t) => t.find((b) => {
|
|
|
85
85
|
{
|
|
86
86
|
userType: u,
|
|
87
87
|
sheets: t[l] ?? [],
|
|
88
|
-
...
|
|
88
|
+
...k
|
|
89
89
|
}
|
|
90
90
|
)
|
|
91
91
|
]
|
package/dist/features/chapters/chapter/comps/supplementary-resources/supplementary-resources.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supplementary-resources.js","sources":["../../../../../../src/features/chapters/chapter/comps/supplementary-resources/supplementary-resources.tsx"],"sourcesContent":["import { memo, useCallback, useMemo, useRef, useState, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport ResourcesList from '../../../../sheets/resources-list/resources-list';\nimport UIContext, { useUIContext } from '../../../../ui/context/context';\nimport useTrackingContext from '../../../../ui/context/use-tracking-context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport type { IChapterDataProps } from '../../chapter-types';\nimport * as Styled from './supplementary-resources-styled';\nimport type { ISupplementaryResourcesProps } from './supplementary-resources-types';\nimport { getResourceTabName } from './utils';\n\nconst getDefaultSelectedTab = (\n groupedSheets: IChapterDataProps['sheets_data']['supplementary_sheets_grouped'],\n groupedSheetsSortOrder: IChapterDataProps['sheets_data']['supplementary_sheets_group_sort_order'],\n): string => {\n const sheetCategory = groupedSheetsSortOrder.find(category => {\n const categoryData = groupedSheets[category];\n\n return categoryData ? categoryData.length > 0 : undefined;\n });\n\n return sheetCategory ?? 'assigned';\n};\n\nconst SupplementaryResources: FC<ISupplementaryResourcesProps> = memo(\n function SupplementaryResources({\n groupedSupplementarySheets,\n userType,\n isDefocused,\n ...restSupplementaryResourcesProps\n }) {\n const {\n handleOnCreateExtraPractice,\n teacherId,\n groupedSupplementarySheetsSortOrder,\n ...sheetListCallbacks\n } = restSupplementaryResourcesProps;\n\n const theme = useTheme();\n const totalResourcesCount = useRef(0);\n\n const [selectedTab, setSelectedTab] = useState(() => {\n return getDefaultSelectedTab(groupedSupplementarySheets, groupedSupplementarySheetsSortOrder);\n });\n\n const analyticProps = useTrackingContext({ tab: selectedTab });\n const { onEvent: trackEvent } = useUIContext();\n\n const isTeacher = userType === 'TEACHER';\n\n const { keys: supplementarySheetCounts, newAssignedSheetsCount } = useMemo(() => {\n const assignedSheets = groupedSupplementarySheets.assigned ?? [];\n\n const newAssignedCount = assignedSheets.reduce((acc, assignedSheetData) => {\n if (assignedSheetData.state === 'NOT_STARTED') {\n return acc + 1;\n }\n\n return acc;\n }, 0);\n\n const keys: Partial<Record<string, number>> = {};\n\n if (newAssignedCount > 0) {\n keys.assigned = newAssignedCount;\n }\n\n totalResourcesCount.current = isTeacher ? 0 : assignedSheets.length;\n\n if (groupedSupplementarySheets) {\n groupedSupplementarySheetsSortOrder.forEach(suppSheetType => {\n const sheetData =\n groupedSupplementarySheets[suppSheetType as keyof typeof groupedSupplementarySheets] ||\n [];\n const sheetCount = sheetData.length;\n\n if (suppSheetType !== 'assigned' && isTeacher) {\n totalResourcesCount.current += sheetCount;\n }\n\n if (sheetCount) {\n keys[suppSheetType] = sheetCount;\n }\n });\n }\n\n return { keys, newAssignedSheetsCount: newAssignedCount };\n }, [groupedSupplementarySheets, groupedSupplementarySheetsSortOrder, isTeacher]);\n\n const handleOnTabSwitch = useCallback(\n (suppSheetKey: string) => {\n setSelectedTab(suppSheetKey);\n trackEvent('clicked', {\n cta: suppSheetKey,\n });\n },\n [trackEvent],\n );\n\n if (totalResourcesCount.current === 0) return null;\n\n return (\n <UIContext.Provider value={analyticProps}>\n <Styled.SupplementaryResourcesContainer\n $flexGap={theme.layout.gutter * 1.5}\n $widthX={47.5}\n $flexGapX={2}\n >\n <FlexView $flexGap={8}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n resources ({totalResourcesCount.current})\n </Text>\n\n {isTeacher && (\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n Only assigned sheets are visible to the student\n </Text>\n )}\n </FlexView>\n\n <Styled.ScrollFlexView $flexDirection=\"row\">\n {Object.entries(supplementarySheetCounts).map(entry => {\n const [suppSheetKey, sheetCount] = entry;\n\n const tabLabel = getResourceTabName(suppSheetKey, sheetCount ?? 0);\n\n return (\n <Styled.Tab\n key={suppSheetKey}\n $selected={selectedTab === suppSheetKey}\n onClick={() => handleOnTabSwitch(suppSheetKey)}\n >\n <FlexView $flexDirection=\"row\" $flexGapX={0.375}>\n <Text $renderAs={selectedTab === suppSheetKey ? '
|
|
1
|
+
{"version":3,"file":"supplementary-resources.js","sources":["../../../../../../src/features/chapters/chapter/comps/supplementary-resources/supplementary-resources.tsx"],"sourcesContent":["import { memo, useCallback, useMemo, useRef, useState, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport ResourcesList from '../../../../sheets/resources-list/resources-list';\nimport UIContext, { useUIContext } from '../../../../ui/context/context';\nimport useTrackingContext from '../../../../ui/context/use-tracking-context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport type { IChapterDataProps } from '../../chapter-types';\nimport * as Styled from './supplementary-resources-styled';\nimport type { ISupplementaryResourcesProps } from './supplementary-resources-types';\nimport { getResourceTabName } from './utils';\n\nconst getDefaultSelectedTab = (\n groupedSheets: IChapterDataProps['sheets_data']['supplementary_sheets_grouped'],\n groupedSheetsSortOrder: IChapterDataProps['sheets_data']['supplementary_sheets_group_sort_order'],\n): string => {\n const sheetCategory = groupedSheetsSortOrder.find(category => {\n const categoryData = groupedSheets[category];\n\n return categoryData ? categoryData.length > 0 : undefined;\n });\n\n return sheetCategory ?? 'assigned';\n};\n\nconst SupplementaryResources: FC<ISupplementaryResourcesProps> = memo(\n function SupplementaryResources({\n groupedSupplementarySheets,\n userType,\n isDefocused,\n ...restSupplementaryResourcesProps\n }) {\n const {\n handleOnCreateExtraPractice,\n teacherId,\n groupedSupplementarySheetsSortOrder,\n ...sheetListCallbacks\n } = restSupplementaryResourcesProps;\n\n const theme = useTheme();\n const totalResourcesCount = useRef(0);\n\n const [selectedTab, setSelectedTab] = useState(() => {\n return getDefaultSelectedTab(groupedSupplementarySheets, groupedSupplementarySheetsSortOrder);\n });\n\n const analyticProps = useTrackingContext({ tab: selectedTab });\n const { onEvent: trackEvent } = useUIContext();\n\n const isTeacher = userType === 'TEACHER';\n\n const { keys: supplementarySheetCounts, newAssignedSheetsCount } = useMemo(() => {\n const assignedSheets = groupedSupplementarySheets.assigned ?? [];\n\n const newAssignedCount = assignedSheets.reduce((acc, assignedSheetData) => {\n if (assignedSheetData.state === 'NOT_STARTED') {\n return acc + 1;\n }\n\n return acc;\n }, 0);\n\n const keys: Partial<Record<string, number>> = {};\n\n if (newAssignedCount > 0) {\n keys.assigned = newAssignedCount;\n }\n\n totalResourcesCount.current = isTeacher ? 0 : assignedSheets.length;\n\n if (groupedSupplementarySheets) {\n groupedSupplementarySheetsSortOrder.forEach(suppSheetType => {\n const sheetData =\n groupedSupplementarySheets[suppSheetType as keyof typeof groupedSupplementarySheets] ||\n [];\n const sheetCount = sheetData.length;\n\n if (suppSheetType !== 'assigned' && isTeacher) {\n totalResourcesCount.current += sheetCount;\n }\n\n if (sheetCount) {\n keys[suppSheetType] = sheetCount;\n }\n });\n }\n\n return { keys, newAssignedSheetsCount: newAssignedCount };\n }, [groupedSupplementarySheets, groupedSupplementarySheetsSortOrder, isTeacher]);\n\n const handleOnTabSwitch = useCallback(\n (suppSheetKey: string) => {\n setSelectedTab(suppSheetKey);\n trackEvent('clicked', {\n cta: suppSheetKey,\n });\n },\n [trackEvent],\n );\n\n if (totalResourcesCount.current === 0) return null;\n\n return (\n <UIContext.Provider value={analyticProps}>\n <Styled.SupplementaryResourcesContainer\n $flexGap={theme.layout.gutter * 1.5}\n $widthX={47.5}\n $flexGapX={2}\n >\n <FlexView $flexGap={8}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n resources ({totalResourcesCount.current})\n </Text>\n\n {isTeacher && (\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n Only assigned sheets are visible to the student\n </Text>\n )}\n </FlexView>\n\n <Styled.ScrollFlexView $flexDirection=\"row\">\n {Object.entries(supplementarySheetCounts).map(entry => {\n const [suppSheetKey, sheetCount] = entry;\n\n const tabLabel = getResourceTabName(suppSheetKey, sheetCount ?? 0);\n\n return (\n <Styled.Tab\n key={suppSheetKey}\n $selected={selectedTab === suppSheetKey}\n onClick={() => handleOnTabSwitch(suppSheetKey)}\n >\n <FlexView $flexDirection=\"row\" $flexGapX={0.375}>\n <Text $renderAs={selectedTab === suppSheetKey ? 'ub2-bold' : 'ub2'}>\n {tabLabel}\n </Text>\n {suppSheetKey === 'assigned' && !!newAssignedSheetsCount && (\n <FlexView\n $background=\"GREEN_4\"\n $borderRadiusX={0.25}\n $gapX={0.125}\n $gutterX={0.25}\n $alignItems=\"center\"\n >\n <Styled.WrappedText $renderAs=\"ac4-black\">\n {newAssignedSheetsCount} New\n </Styled.WrappedText>\n </FlexView>\n )}\n </FlexView>\n </Styled.Tab>\n );\n })}\n </Styled.ScrollFlexView>\n\n <ResourcesList\n userType={userType}\n sheets={groupedSupplementarySheets[selectedTab] ?? []}\n {...sheetListCallbacks}\n />\n </Styled.SupplementaryResourcesContainer>\n </UIContext.Provider>\n );\n },\n);\n\nexport default SupplementaryResources;\n"],"names":["getDefaultSelectedTab","groupedSheets","groupedSheetsSortOrder","category","categoryData","SupplementaryResources","memo","groupedSupplementarySheets","userType","isDefocused","restSupplementaryResourcesProps","handleOnCreateExtraPractice","teacherId","groupedSupplementarySheetsSortOrder","sheetListCallbacks","theme","useTheme","totalResourcesCount","useRef","selectedTab","setSelectedTab","useState","analyticProps","useTrackingContext","trackEvent","useUIContext","isTeacher","supplementarySheetCounts","newAssignedSheetsCount","useMemo","assignedSheets","newAssignedCount","acc","assignedSheetData","keys","suppSheetType","sheetCount","handleOnTabSwitch","useCallback","suppSheetKey","jsx","UIContext","jsxs","Styled.SupplementaryResourcesContainer","FlexView","Text","Styled.ScrollFlexView","entry","tabLabel","getResourceTabName","Styled.Tab","Styled.WrappedText","ResourcesList"],"mappings":";;;;;;;;;;AAaA,MAAMA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,aAAY;AAAA,sBACZ,gBAAgB;AAAA,sBAChB,OAAO;AAAA,sBACP,UAAU;AAAA,sBACV,aAAY;AAAA,sBAEZ,UAAC,gBAAAF,EAAAS,GAAA,EAAmB,WAAU,aAC3B,UAAA;AAAA,wBAAAvB;AAAA,wBAAuB;AAAA,sBAAA,GAC1B;AAAA,oBAAA;AAAA,kBACF;AAAA,gBAAA,GAEJ;AAAA,cAAA;AAAA,cArBKW;AAAA,YAAA;AAAA,UAwBV,CAAA,GACH;AAAA,UAEA,gBAAAC;AAAA,YAACY;AAAA,YAAA;AAAA,cACC,UAAA5C;AAAA,cACA,QAAQD,EAA2BY,CAAW,KAAK,CAAC;AAAA,cACnD,GAAGL;AAAA,YAAA;AAAA,UACN;AAAA,QAAA;AAAA,MAAA;AAAA,IAEJ,EAAA,CAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o, jsxs as R } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import s from "../../../ui/layout/flex-view.js";
|
|
3
3
|
import { BlockSectionTitle as b } from "./block-section-styled.js";
|
|
4
4
|
import O from "./chapter-block/chapter-block.js";
|
|
5
5
|
const M = ({
|
|
@@ -12,40 +12,40 @@ const M = ({
|
|
|
12
12
|
userType: d,
|
|
13
13
|
onMenuActionAttempt: f,
|
|
14
14
|
onReview: A,
|
|
15
|
-
onSATReview:
|
|
16
|
-
onSATStartOrResume:
|
|
17
|
-
onSATUnlock:
|
|
15
|
+
onSATReview: k,
|
|
16
|
+
onSATStartOrResume: S,
|
|
17
|
+
onSATUnlock: _,
|
|
18
18
|
onStartOrResume: x,
|
|
19
|
-
onView:
|
|
20
|
-
} = u, { tabs: e, is_mastery_enabled_user_and_program:
|
|
21
|
-
let
|
|
22
|
-
return
|
|
23
|
-
/* @__PURE__ */ o(b, { $renderAs: "
|
|
24
|
-
n.map((
|
|
25
|
-
const { block_type:
|
|
26
|
-
let
|
|
27
|
-
const B =
|
|
28
|
-
return
|
|
19
|
+
onView: T
|
|
20
|
+
} = u, { tabs: e, is_mastery_enabled_user_and_program: g } = a, t = e == null ? void 0 : e[p];
|
|
21
|
+
let r = 0;
|
|
22
|
+
return t ? /* @__PURE__ */ o(s, { $flexGapX: 1.25, children: t.map(({ blocks: n, section_code: l }) => /* @__PURE__ */ R(s, { children: [
|
|
23
|
+
/* @__PURE__ */ o(b, { $renderAs: "ac4-black", children: l }),
|
|
24
|
+
n.map((c, h) => {
|
|
25
|
+
const { block_type: y, id: w } = c;
|
|
26
|
+
let i = 0;
|
|
27
|
+
const B = h === n.length - 1;
|
|
28
|
+
return y === "GOAL" && (r += 1, i = r), /* @__PURE__ */ o(
|
|
29
29
|
O,
|
|
30
30
|
{
|
|
31
|
-
blockData:
|
|
32
|
-
goalIndex:
|
|
31
|
+
blockData: c,
|
|
32
|
+
goalIndex: i,
|
|
33
33
|
isLastBlock: B,
|
|
34
|
-
isMasteryEnabledUserAndProgram:
|
|
34
|
+
isMasteryEnabledUserAndProgram: g,
|
|
35
35
|
userType: d,
|
|
36
36
|
isClassOngoing: m,
|
|
37
37
|
onMenuActionAttempt: f,
|
|
38
38
|
onReview: A,
|
|
39
|
-
onSATReview:
|
|
40
|
-
onSATStartOrResume:
|
|
41
|
-
onSATUnlock:
|
|
39
|
+
onSATReview: k,
|
|
40
|
+
onSATStartOrResume: S,
|
|
41
|
+
onSATUnlock: _,
|
|
42
42
|
onStartOrResume: x,
|
|
43
|
-
onView:
|
|
43
|
+
onView: T
|
|
44
44
|
},
|
|
45
45
|
w
|
|
46
46
|
);
|
|
47
47
|
})
|
|
48
|
-
] },
|
|
48
|
+
] }, l)) }) : null;
|
|
49
49
|
};
|
|
50
50
|
export {
|
|
51
51
|
M as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-section.js","sources":["../../../../../src/features/chapters/lpar-chapter/block-section/block-section.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport * as Styled from './block-section-styled';\nimport type { IBlockSection } from './block-section-types';\nimport ChapterBlock from './chapter-block/chapter-block';\n\nconst BlockSection: FC<IBlockSection> = ({\n chapter,\n isClassOngoing,\n selectedSection,\n ...restBlockSectionProps\n}) => {\n const {\n userType,\n onMenuActionAttempt,\n onReview,\n onSATReview,\n onSATStartOrResume,\n onSATUnlock,\n onStartOrResume,\n onView,\n } = restBlockSectionProps;\n const { tabs, is_mastery_enabled_user_and_program: isMasteryEnabledUserAndProgram } = chapter;\n\n const sections = tabs?.[selectedSection];\n let goalCount = 0;\n\n if (!sections) return null;\n\n return (\n <FlexView $flexGapX={1.25}>\n {sections.map(({ blocks, section_code: sectionCode }) => {\n return (\n <FlexView key={sectionCode}>\n <Styled.BlockSectionTitle $renderAs=\"
|
|
1
|
+
{"version":3,"file":"block-section.js","sources":["../../../../../src/features/chapters/lpar-chapter/block-section/block-section.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport * as Styled from './block-section-styled';\nimport type { IBlockSection } from './block-section-types';\nimport ChapterBlock from './chapter-block/chapter-block';\n\nconst BlockSection: FC<IBlockSection> = ({\n chapter,\n isClassOngoing,\n selectedSection,\n ...restBlockSectionProps\n}) => {\n const {\n userType,\n onMenuActionAttempt,\n onReview,\n onSATReview,\n onSATStartOrResume,\n onSATUnlock,\n onStartOrResume,\n onView,\n } = restBlockSectionProps;\n const { tabs, is_mastery_enabled_user_and_program: isMasteryEnabledUserAndProgram } = chapter;\n\n const sections = tabs?.[selectedSection];\n let goalCount = 0;\n\n if (!sections) return null;\n\n return (\n <FlexView $flexGapX={1.25}>\n {sections.map(({ blocks, section_code: sectionCode }) => {\n return (\n <FlexView key={sectionCode}>\n <Styled.BlockSectionTitle $renderAs=\"ac4-black\">{sectionCode}</Styled.BlockSectionTitle>\n\n {blocks.map((block, idx) => {\n const { block_type: blockType, id } = block;\n let goalIndex = 0;\n const isLastBlock = idx === blocks.length - 1;\n\n if (blockType === 'GOAL') {\n goalCount += 1;\n goalIndex = goalCount;\n }\n\n return (\n <ChapterBlock\n blockData={block}\n goalIndex={goalIndex}\n isLastBlock={isLastBlock}\n isMasteryEnabledUserAndProgram={isMasteryEnabledUserAndProgram}\n key={id}\n userType={userType}\n isClassOngoing={isClassOngoing}\n onMenuActionAttempt={onMenuActionAttempt}\n onReview={onReview}\n onSATReview={onSATReview}\n onSATStartOrResume={onSATStartOrResume}\n onSATUnlock={onSATUnlock}\n onStartOrResume={onStartOrResume}\n onView={onView}\n />\n );\n })}\n </FlexView>\n );\n })}\n </FlexView>\n );\n};\n\nexport default BlockSection;\n"],"names":["BlockSection","chapter","isClassOngoing","selectedSection","restBlockSectionProps","userType","onMenuActionAttempt","onReview","onSATReview","onSATStartOrResume","onSATUnlock","onStartOrResume","onView","tabs","isMasteryEnabledUserAndProgram","sections","goalCount","jsx","FlexView","blocks","sectionCode","Styled.BlockSectionTitle","block","idx","blockType","id","goalIndex","isLastBlock","ChapterBlock"],"mappings":";;;;AAOA,MAAMA,IAAkC,CAAC;AAAA,EACvC,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA;AAAA,IACJ,UAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,QAAAC;AAAA,EACE,IAAAR,GACE,EAAE,MAAAS,GAAM,qCAAqCC,EAAA,IAAmCb,GAEhFc,IAAWF,KAAA,gBAAAA,EAAOV;AACxB,MAAIa,IAAY;AAEZ,SAACD,IAGH,gBAAAE,EAACC,GAAS,EAAA,WAAW,MAClB,UAAAH,EAAS,IAAI,CAAC,EAAE,QAAAI,GAAQ,cAAcC,EAAA,wBAElCF,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAD,EAACI,GAAA,EAAyB,WAAU,aAAa,UAAYD,GAAA;AAAA,IAE5DD,EAAO,IAAI,CAACG,GAAOC,MAAQ;AAC1B,YAAM,EAAE,YAAYC,GAAW,IAAAC,EAAA,IAAOH;AACtC,UAAII,IAAY;AACV,YAAAC,IAAcJ,MAAQJ,EAAO,SAAS;AAE5C,aAAIK,MAAc,WACHR,KAAA,GACDU,IAAAV,IAIZ,gBAAAC;AAAA,QAACW;AAAA,QAAA;AAAA,UACC,WAAWN;AAAA,UACX,WAAAI;AAAA,UACA,aAAAC;AAAA,UACA,gCAAAb;AAAA,UAEA,UAAAT;AAAA,UACA,gBAAAH;AAAA,UACA,qBAAAI;AAAA,UACA,UAAAC;AAAA,UACA,aAAAC;AAAA,UACA,oBAAAC;AAAA,UACA,aAAAC;AAAA,UACA,iBAAAC;AAAA,UACA,QAAAC;AAAA,QAAA;AAAA,QATKa;AAAA,MAAA;AAAA,IAUP,CAEH;AAAA,EAAA,EAAA,GA/BYL,CAgCf,CAEH,EACH,CAAA,IAzCoB;AA2CxB;"}
|
package/dist/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block-action.js
CHANGED
|
@@ -3,7 +3,7 @@ import { ILLUSTRATIONS as o } from "../../../../../assets/illustrations/illustra
|
|
|
3
3
|
import i from "../../../../ui/layout/flex-view.js";
|
|
4
4
|
import t from "../../../../ui/text/text.js";
|
|
5
5
|
import { BLOCK_STATUS_VALUE as m, BLOCK_STATUS as n } from "../../constants/index.js";
|
|
6
|
-
const { ADDED: A, MASTERED:
|
|
6
|
+
const { ADDED: A, MASTERED: c } = n, E = ({ blockStatus: r }) => r === A ? null : /* @__PURE__ */ e(i, { $flexDirection: "row", $alignItems: "center", $flexGap: 4, children: r === c ? /* @__PURE__ */ e("img", { src: o.MASTERED_BADGE }) : /* @__PURE__ */ e(t, { $renderAs: "ac4-black", $color: "BLACK_75", children: m[r] }) });
|
|
7
7
|
export {
|
|
8
8
|
E as default
|
|
9
9
|
};
|
package/dist/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block-action.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chapter-block-action.js","sources":["../../../../../../src/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block-action.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { BLOCK_STATUS_VALUE, BLOCK_STATUS } from '../../constants';\nimport type { IChapterBlockAction } from './chapter-block-types';\n\nconst { ADDED, MASTERED } = BLOCK_STATUS;\n\nconst ChapterBlockAction: FC<IChapterBlockAction> = ({ blockStatus }) => {\n if (blockStatus === ADDED) return null;\n\n return (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGap={4}>\n {blockStatus === MASTERED ? (\n <img src={ILLUSTRATIONS.MASTERED_BADGE} />\n ) : (\n <Text $renderAs=\"
|
|
1
|
+
{"version":3,"file":"chapter-block-action.js","sources":["../../../../../../src/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block-action.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { BLOCK_STATUS_VALUE, BLOCK_STATUS } from '../../constants';\nimport type { IChapterBlockAction } from './chapter-block-types';\n\nconst { ADDED, MASTERED } = BLOCK_STATUS;\n\nconst ChapterBlockAction: FC<IChapterBlockAction> = ({ blockStatus }) => {\n if (blockStatus === ADDED) return null;\n\n return (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGap={4}>\n {blockStatus === MASTERED ? (\n <img src={ILLUSTRATIONS.MASTERED_BADGE} />\n ) : (\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_75\">\n {BLOCK_STATUS_VALUE[blockStatus as keyof typeof BLOCK_STATUS_VALUE]}\n </Text>\n )}\n </FlexView>\n );\n};\n\nexport default ChapterBlockAction;\n"],"names":["ADDED","MASTERED","BLOCK_STATUS","ChapterBlockAction","blockStatus","jsx","FlexView","ILLUSTRATIONS","Text","BLOCK_STATUS_VALUE"],"mappings":";;;;;AAQA,MAAM,EAAE,OAAAA,GAAO,UAAAC,EAAa,IAAAC,GAEtBC,IAA8C,CAAC,EAAE,aAAAC,QACjDA,MAAgBJ,IAAc,OAGhC,gBAAAK,EAACC,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,UAAU,GAC3D,UAAgBF,MAAAH,IACd,gBAAAI,EAAA,OAAA,EAAI,KAAKE,EAAc,eAAgB,CAAA,IAExC,gBAAAF,EAACG,GAAK,EAAA,WAAU,aAAY,QAAO,YAChC,UAAAC,EAAmBL,CAA8C,EACpE,CAAA,EAEJ,CAAA;"}
|
package/dist/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block-header.js
CHANGED
|
@@ -3,17 +3,17 @@ import r from "../../../../ui/layout/flex-view.js";
|
|
|
3
3
|
import i from "../../../../ui/text/text.js";
|
|
4
4
|
import { OPTIONAL_STATUS as f } from "../../constants/index.js";
|
|
5
5
|
import { StyledDownIcon as h } from "../block-section-styled.js";
|
|
6
|
-
import
|
|
7
|
-
import { ChapterBlockHeaderContainer as
|
|
8
|
-
const
|
|
9
|
-
blockName:
|
|
10
|
-
blockStatus:
|
|
6
|
+
import u from "./chapter-block-action.js";
|
|
7
|
+
import { ChapterBlockHeaderContainer as g, CustomTrophy as x } from "./chapter-block-styled.js";
|
|
8
|
+
const P = ({
|
|
9
|
+
blockName: l,
|
|
10
|
+
blockStatus: c,
|
|
11
11
|
blockType: $,
|
|
12
12
|
...a
|
|
13
13
|
}) => {
|
|
14
14
|
const { expandBlock: d, goalIndex: p, HeaderIcon: o, isGoalBlockType: s, optionalStatus: n, userType: m } = a;
|
|
15
15
|
return /* @__PURE__ */ t(
|
|
16
|
-
|
|
16
|
+
g,
|
|
17
17
|
{
|
|
18
18
|
$flexDirection: "row",
|
|
19
19
|
$justifyContent: "space-between",
|
|
@@ -33,15 +33,15 @@ const j = ({
|
|
|
33
33
|
$justifyContent: "center",
|
|
34
34
|
$borderColor: "PURPLE_4",
|
|
35
35
|
$borderRadius: 4,
|
|
36
|
-
children: /* @__PURE__ */ e(i, { $renderAs: "
|
|
36
|
+
children: /* @__PURE__ */ e(i, { $renderAs: "ub1-bold", $color: "PURPLE_4", children: `G${p}` })
|
|
37
37
|
}
|
|
38
38
|
),
|
|
39
39
|
$ !== "GOAL" && o && /* @__PURE__ */ e(r, { $gap: 4, $gutter: 4, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ e(o, {}) }),
|
|
40
|
-
/* @__PURE__ */ e(i, { $renderAs: "
|
|
40
|
+
/* @__PURE__ */ e(i, { $renderAs: "ub1", children: l })
|
|
41
41
|
] }),
|
|
42
42
|
/* @__PURE__ */ t(r, { $flexDirection: "row", $alignItems: "center", $flexGap: 8, children: [
|
|
43
|
-
n && /* @__PURE__ */ e(
|
|
44
|
-
/* @__PURE__ */ e(
|
|
43
|
+
n && /* @__PURE__ */ e(x, { $active: n === f.COMPLETED }),
|
|
44
|
+
/* @__PURE__ */ e(u, { userType: m, blockStatus: c }),
|
|
45
45
|
/* @__PURE__ */ e(h, { $expanded: d })
|
|
46
46
|
] })
|
|
47
47
|
]
|
|
@@ -49,6 +49,6 @@ const j = ({
|
|
|
49
49
|
);
|
|
50
50
|
};
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
P as default
|
|
53
53
|
};
|
|
54
54
|
//# sourceMappingURL=chapter-block-header.js.map
|
package/dist/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block-header.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chapter-block-header.js","sources":["../../../../../../src/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block-header.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { OPTIONAL_STATUS } from '../../constants';\nimport { StyledDownIcon } from '../block-section-styled';\nimport ChapterBlockAction from './chapter-block-action';\nimport * as Styled from './chapter-block-styled';\nimport type { IChapterBlockHeader } from './chapter-block-types';\n\nconst ChapterBlockHeader: FC<IChapterBlockHeader> = ({\n blockName,\n blockStatus,\n blockType,\n ...restChapterBlockHeader\n}) => {\n const { expandBlock, goalIndex, HeaderIcon, isGoalBlockType, optionalStatus, userType } =\n restChapterBlockHeader;\n\n return (\n <Styled.ChapterBlockHeaderContainer\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n $gutterX={1}\n $gapX={1}\n >\n <FlexView $flexDirection=\"row\" $flexGap={8} $alignItems=\"center\" $width=\"70%\">\n {isGoalBlockType && (\n <FlexView\n $widthX={2}\n $heightX={2}\n $gap={8}\n $gutter={4}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderColor=\"PURPLE_4\"\n $borderRadius={4}\n >\n <Text $renderAs=\"
|
|
1
|
+
{"version":3,"file":"chapter-block-header.js","sources":["../../../../../../src/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block-header.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { OPTIONAL_STATUS } from '../../constants';\nimport { StyledDownIcon } from '../block-section-styled';\nimport ChapterBlockAction from './chapter-block-action';\nimport * as Styled from './chapter-block-styled';\nimport type { IChapterBlockHeader } from './chapter-block-types';\n\nconst ChapterBlockHeader: FC<IChapterBlockHeader> = ({\n blockName,\n blockStatus,\n blockType,\n ...restChapterBlockHeader\n}) => {\n const { expandBlock, goalIndex, HeaderIcon, isGoalBlockType, optionalStatus, userType } =\n restChapterBlockHeader;\n\n return (\n <Styled.ChapterBlockHeaderContainer\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n $gutterX={1}\n $gapX={1}\n >\n <FlexView $flexDirection=\"row\" $flexGap={8} $alignItems=\"center\" $width=\"70%\">\n {isGoalBlockType && (\n <FlexView\n $widthX={2}\n $heightX={2}\n $gap={8}\n $gutter={4}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderColor=\"PURPLE_4\"\n $borderRadius={4}\n >\n <Text $renderAs=\"ub1-bold\" $color=\"PURPLE_4\">\n {`G${goalIndex}`}\n </Text>\n </FlexView>\n )}\n {blockType !== 'GOAL' && HeaderIcon && (\n <FlexView $gap={4} $gutter={4} $justifyContent=\"center\" $alignItems=\"center\">\n <HeaderIcon />\n </FlexView>\n )}\n\n <Text $renderAs=\"ub1\">{blockName}</Text>\n </FlexView>\n\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGap={8}>\n {optionalStatus && (\n <Styled.CustomTrophy $active={optionalStatus === OPTIONAL_STATUS.COMPLETED} />\n )}\n\n <ChapterBlockAction userType={userType} blockStatus={blockStatus} />\n <StyledDownIcon $expanded={expandBlock} />\n </FlexView>\n </Styled.ChapterBlockHeaderContainer>\n );\n};\n\nexport default ChapterBlockHeader;\n"],"names":["ChapterBlockHeader","blockName","blockStatus","blockType","restChapterBlockHeader","expandBlock","goalIndex","HeaderIcon","isGoalBlockType","optionalStatus","userType","jsxs","Styled.ChapterBlockHeaderContainer","FlexView","jsx","Text","Styled.CustomTrophy","OPTIONAL_STATUS","ChapterBlockAction","StyledDownIcon"],"mappings":";;;;;;;AAUA,MAAMA,IAA8C,CAAC;AAAA,EACnD,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAM,EAAE,aAAAC,GAAa,WAAAC,GAAW,YAAAC,GAAY,iBAAAC,GAAiB,gBAAAC,GAAgB,UAAAC,EAC3E,IAAAN;AAGA,SAAA,gBAAAO;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,iBAAgB;AAAA,MAChB,aAAY;AAAA,MACZ,UAAU;AAAA,MACV,OAAO;AAAA,MAEP,UAAA;AAAA,QAAC,gBAAAD,EAAAE,GAAA,EAAS,gBAAe,OAAM,UAAU,GAAG,aAAY,UAAS,QAAO,OACrE,UAAA;AAAA,UACCL,KAAA,gBAAAM;AAAA,YAACD;AAAA,YAAA;AAAA,cACC,SAAS;AAAA,cACT,UAAU;AAAA,cACV,MAAM;AAAA,cACN,SAAS;AAAA,cACT,aAAY;AAAA,cACZ,iBAAgB;AAAA,cAChB,cAAa;AAAA,cACb,eAAe;AAAA,cAEf,UAAA,gBAAAC,EAACC,KAAK,WAAU,YAAW,QAAO,YAC/B,UAAA,IAAIT,CAAS,GAChB,CAAA;AAAA,YAAA;AAAA,UACF;AAAA,UAEDH,MAAc,UAAUI,KACvB,gBAAAO,EAACD,KAAS,MAAM,GAAG,SAAS,GAAG,iBAAgB,UAAS,aAAY,UAClE,UAAA,gBAAAC,EAACP,IAAW,CAAA,GACd;AAAA,UAGD,gBAAAO,EAAAC,GAAA,EAAK,WAAU,OAAO,UAAUd,GAAA;AAAA,QAAA,GACnC;AAAA,0BAECY,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,UAAU,GAC3D,UAAA;AAAA,UAAAJ,uBACEO,GAAA,EAAoB,SAASP,MAAmBQ,EAAgB,WAAW;AAAA,UAG9E,gBAAAH,EAACI,GAAmB,EAAA,UAAAR,GAAoB,aAAAR,EAA0B,CAAA;AAAA,UAClE,gBAAAY,EAACK,GAAe,EAAA,WAAWd,EAAa,CAAA;AAAA,QAAA,GAC1C;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -6,7 +6,7 @@ import S from "../../../../ui/text/text.js";
|
|
|
6
6
|
import { RewardAccuracy as _ } from "../sheet-item/rewards-n-actions/reward-n-actions-styled.js";
|
|
7
7
|
import v from "../sheet-item/sheet-item-icon.js";
|
|
8
8
|
import { SheetItemContainer as O, VerticalLineWrapper as U, TopVerticalLine as j, SheetDetailsWrapper as B } from "../sheet-item/sheet-item-styled.js";
|
|
9
|
-
import { getUserNodeIdsToUnlockSAT as
|
|
9
|
+
import { getUserNodeIdsToUnlockSAT as G, getSATSheetStatementStats as M } from "./sat-sheet-item-utils.js";
|
|
10
10
|
import { getActiveSATSheet as V } from "./sat-sheet-utils.js";
|
|
11
11
|
import L from "./student-actions/student-actions.js";
|
|
12
12
|
import N from "./teacher-actions/teacher-actions.js";
|
|
@@ -16,12 +16,12 @@ const ee = ({
|
|
|
16
16
|
satScore: A,
|
|
17
17
|
...T
|
|
18
18
|
}) => {
|
|
19
|
-
const { blockId: o, sheets: s, userType: I, onSATReview:
|
|
19
|
+
const { blockId: o, sheets: s, userType: I, onSATReview: l, onSATUnlock: m, onSATStartOrResume: d } = T, {
|
|
20
20
|
user_block_id: r,
|
|
21
21
|
can_review: h,
|
|
22
|
-
can_start:
|
|
23
|
-
can_resume:
|
|
24
|
-
order:
|
|
22
|
+
can_start: b,
|
|
23
|
+
can_resume: g,
|
|
24
|
+
order: x
|
|
25
25
|
} = V(s) || {}, { onEvent: p } = D(), a = C(
|
|
26
26
|
() => ({
|
|
27
27
|
user_block_id: r,
|
|
@@ -29,19 +29,19 @@ const ee = ({
|
|
|
29
29
|
}),
|
|
30
30
|
[o, r]
|
|
31
31
|
), w = !!((n === "COMPLETED" || n === "MASTERED") && h && r), $ = f(() => {
|
|
32
|
-
if (typeof
|
|
32
|
+
if (typeof l != "function")
|
|
33
33
|
throw new Error("onSATReview must be a function");
|
|
34
34
|
if (!r)
|
|
35
35
|
throw new Error("userBlockId must be a string");
|
|
36
|
-
p("clicked", a),
|
|
37
|
-
}, [a,
|
|
38
|
-
if (typeof
|
|
36
|
+
p("clicked", a), l(r);
|
|
37
|
+
}, [a, l, p, r]), E = f(() => {
|
|
38
|
+
if (typeof m != "function")
|
|
39
39
|
throw new Error("onSATUnlock must be a function");
|
|
40
|
-
const i =
|
|
40
|
+
const i = G(s);
|
|
41
41
|
if (i.length === 0)
|
|
42
42
|
throw new Error("User node IDs are missing");
|
|
43
|
-
|
|
44
|
-
}, [
|
|
43
|
+
m(i);
|
|
44
|
+
}, [m, s]), k = f(() => {
|
|
45
45
|
if (typeof d != "function")
|
|
46
46
|
throw new Error("onSATStartOrResume must be a function");
|
|
47
47
|
if (!o)
|
|
@@ -69,10 +69,10 @@ const ee = ({
|
|
|
69
69
|
children: [
|
|
70
70
|
/* @__PURE__ */ e(v, { chapterPermissionCode: n }),
|
|
71
71
|
/* @__PURE__ */ t(c, { $justifyContent: "center", $width: "100%", children: [
|
|
72
|
-
/* @__PURE__ */ e(S, { $renderAs: "
|
|
72
|
+
/* @__PURE__ */ e(S, { $renderAs: "ub1-bold", children: "Assessment • Mock test" }),
|
|
73
73
|
/* @__PURE__ */ e(c, { children: s.map((i) => {
|
|
74
|
-
const { statement:
|
|
75
|
-
return /* @__PURE__ */ e(S, { $renderAs: "
|
|
74
|
+
const { statement: R, color: y } = M(i);
|
|
75
|
+
return /* @__PURE__ */ e(S, { $renderAs: "ub2", $color: y, children: R }, i.node_id);
|
|
76
76
|
}) })
|
|
77
77
|
] })
|
|
78
78
|
]
|
|
@@ -80,7 +80,7 @@ const ee = ({
|
|
|
80
80
|
)
|
|
81
81
|
] }),
|
|
82
82
|
/* @__PURE__ */ t(c, { $flexDirection: "row", $alignItems: "center", $justifyContent: "center", $flexGap: 8, children: [
|
|
83
|
-
h && u && /* @__PURE__ */ e(c, { $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ t(_, { $renderAs: "
|
|
83
|
+
h && u && /* @__PURE__ */ e(c, { $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ t(_, { $renderAs: "ac4-black", $align: "center", children: [
|
|
84
84
|
A,
|
|
85
85
|
"/",
|
|
86
86
|
u
|
|
@@ -91,11 +91,11 @@ const ee = ({
|
|
|
91
91
|
handleOnReview: $,
|
|
92
92
|
isMenuVisible: w,
|
|
93
93
|
blockStatus: n,
|
|
94
|
-
canResume: !!
|
|
95
|
-
canStart: !!
|
|
96
|
-
handleOnStartOrResume:
|
|
94
|
+
canResume: !!g,
|
|
95
|
+
canStart: !!b,
|
|
96
|
+
handleOnStartOrResume: k,
|
|
97
97
|
analyticsProps: a,
|
|
98
|
-
questionOrder:
|
|
98
|
+
questionOrder: x
|
|
99
99
|
}
|
|
100
100
|
) : /* @__PURE__ */ e(
|
|
101
101
|
N,
|
package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-item.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sat-sheet-item.js","sources":["../../../../../../src/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-item.tsx"],"sourcesContent":["import { useCallback, type FC, useMemo } from 'react';\n\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { RewardAccuracy } from '../sheet-item/rewards-n-actions/reward-n-actions-styled';\nimport SheetItemIcon from '../sheet-item/sheet-item-icon';\nimport {\n SheetDetailsWrapper,\n SheetItemContainer,\n TopVerticalLine,\n VerticalLineWrapper,\n} from '../sheet-item/sheet-item-styled';\nimport type { ISATSheetItemProps } from './sat-sheet-item-types';\nimport { getSATSheetStatementStats, getUserNodeIdsToUnlockSAT } from './sat-sheet-item-utils';\nimport { getActiveSATSheet } from './sat-sheet-utils';\nimport StudentActions from './student-actions/student-actions';\nimport TeacherActions from './teacher-actions/teacher-actions';\n\nconst SATSheetItem: FC<ISATSheetItemProps> = ({\n blockStatus,\n satMaxScore,\n satScore,\n ...restSATSheetItemProps\n}) => {\n const { blockId, sheets, userType, onSATReview, onSATUnlock, onSATStartOrResume } =\n restSATSheetItemProps;\n const {\n user_block_id: userBlockId,\n can_review: canReview,\n can_start: canStart,\n can_resume: canResume,\n order: questionOrder,\n } = getActiveSATSheet(sheets) || {};\n\n const { onEvent: trackEvent } = useUIContext();\n const analyticsProps = useMemo(\n () => ({\n user_block_id: userBlockId,\n block_id: blockId,\n }),\n [blockId, userBlockId],\n );\n\n const isMenuVisible = Boolean(\n (blockStatus === 'COMPLETED' || blockStatus === 'MASTERED') && canReview && userBlockId,\n );\n\n const handleOnReview = useCallback(() => {\n if (typeof onSATReview !== 'function') {\n throw new Error('onSATReview must be a function');\n }\n\n if (!userBlockId) {\n throw new Error('userBlockId must be a string');\n }\n\n trackEvent('clicked', analyticsProps);\n\n onSATReview(userBlockId);\n }, [analyticsProps, onSATReview, trackEvent, userBlockId]);\n\n const handleOnUnlock = useCallback(() => {\n if (typeof onSATUnlock !== 'function') {\n throw new Error('onSATUnlock must be a function');\n }\n\n const userNodeIds = getUserNodeIdsToUnlockSAT(sheets);\n\n if (userNodeIds.length === 0) {\n throw new Error('User node IDs are missing');\n }\n\n onSATUnlock(userNodeIds);\n }, [onSATUnlock, sheets]);\n\n const handleOnStartOrResume = useCallback(() => {\n if (typeof onSATStartOrResume !== 'function') {\n throw new Error('onSATStartOrResume must be a function');\n }\n\n if (!blockId) {\n throw new Error('blockId must be a string');\n }\n\n onSATStartOrResume(blockId);\n }, [onSATStartOrResume, blockId]);\n\n return (\n <SheetItemContainer\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n $flexGapX={1}\n >\n <FlexView $width=\"70%\" $flexGap={8} $flexDirection=\"row\">\n <VerticalLineWrapper>\n <TopVerticalLine />\n </VerticalLineWrapper>\n\n <SheetDetailsWrapper\n $width=\"100%\"\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGap={8}\n $marginBottom={12}\n >\n <SheetItemIcon chapterPermissionCode={blockStatus} />\n\n <FlexView $justifyContent=\"center\" $width=\"100%\">\n <Text $renderAs=\"
|
|
1
|
+
{"version":3,"file":"sat-sheet-item.js","sources":["../../../../../../src/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-item.tsx"],"sourcesContent":["import { useCallback, type FC, useMemo } from 'react';\n\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { RewardAccuracy } from '../sheet-item/rewards-n-actions/reward-n-actions-styled';\nimport SheetItemIcon from '../sheet-item/sheet-item-icon';\nimport {\n SheetDetailsWrapper,\n SheetItemContainer,\n TopVerticalLine,\n VerticalLineWrapper,\n} from '../sheet-item/sheet-item-styled';\nimport type { ISATSheetItemProps } from './sat-sheet-item-types';\nimport { getSATSheetStatementStats, getUserNodeIdsToUnlockSAT } from './sat-sheet-item-utils';\nimport { getActiveSATSheet } from './sat-sheet-utils';\nimport StudentActions from './student-actions/student-actions';\nimport TeacherActions from './teacher-actions/teacher-actions';\n\nconst SATSheetItem: FC<ISATSheetItemProps> = ({\n blockStatus,\n satMaxScore,\n satScore,\n ...restSATSheetItemProps\n}) => {\n const { blockId, sheets, userType, onSATReview, onSATUnlock, onSATStartOrResume } =\n restSATSheetItemProps;\n const {\n user_block_id: userBlockId,\n can_review: canReview,\n can_start: canStart,\n can_resume: canResume,\n order: questionOrder,\n } = getActiveSATSheet(sheets) || {};\n\n const { onEvent: trackEvent } = useUIContext();\n const analyticsProps = useMemo(\n () => ({\n user_block_id: userBlockId,\n block_id: blockId,\n }),\n [blockId, userBlockId],\n );\n\n const isMenuVisible = Boolean(\n (blockStatus === 'COMPLETED' || blockStatus === 'MASTERED') && canReview && userBlockId,\n );\n\n const handleOnReview = useCallback(() => {\n if (typeof onSATReview !== 'function') {\n throw new Error('onSATReview must be a function');\n }\n\n if (!userBlockId) {\n throw new Error('userBlockId must be a string');\n }\n\n trackEvent('clicked', analyticsProps);\n\n onSATReview(userBlockId);\n }, [analyticsProps, onSATReview, trackEvent, userBlockId]);\n\n const handleOnUnlock = useCallback(() => {\n if (typeof onSATUnlock !== 'function') {\n throw new Error('onSATUnlock must be a function');\n }\n\n const userNodeIds = getUserNodeIdsToUnlockSAT(sheets);\n\n if (userNodeIds.length === 0) {\n throw new Error('User node IDs are missing');\n }\n\n onSATUnlock(userNodeIds);\n }, [onSATUnlock, sheets]);\n\n const handleOnStartOrResume = useCallback(() => {\n if (typeof onSATStartOrResume !== 'function') {\n throw new Error('onSATStartOrResume must be a function');\n }\n\n if (!blockId) {\n throw new Error('blockId must be a string');\n }\n\n onSATStartOrResume(blockId);\n }, [onSATStartOrResume, blockId]);\n\n return (\n <SheetItemContainer\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n $flexGapX={1}\n >\n <FlexView $width=\"70%\" $flexGap={8} $flexDirection=\"row\">\n <VerticalLineWrapper>\n <TopVerticalLine />\n </VerticalLineWrapper>\n\n <SheetDetailsWrapper\n $width=\"100%\"\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGap={8}\n $marginBottom={12}\n >\n <SheetItemIcon chapterPermissionCode={blockStatus} />\n\n <FlexView $justifyContent=\"center\" $width=\"100%\">\n <Text $renderAs=\"ub1-bold\">Assessment • Mock test</Text>\n\n <FlexView>\n {sheets.map(sheet => {\n const { statement, color } = getSATSheetStatementStats(sheet);\n\n return (\n <Text $renderAs=\"ub2\" key={sheet.node_id} $color={color}>\n {statement}\n </Text>\n );\n })}\n </FlexView>\n </FlexView>\n </SheetDetailsWrapper>\n </FlexView>\n\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $justifyContent=\"center\" $flexGap={8}>\n {canReview && satMaxScore && (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n <RewardAccuracy $renderAs=\"ac4-black\" $align=\"center\">\n {satScore}/{satMaxScore}\n </RewardAccuracy>\n </FlexView>\n )}\n\n {userType === 'STUDENT' ? (\n <StudentActions\n handleOnReview={handleOnReview}\n isMenuVisible={isMenuVisible}\n blockStatus={blockStatus}\n canResume={Boolean(canResume)}\n canStart={Boolean(canStart)}\n handleOnStartOrResume={handleOnStartOrResume}\n analyticsProps={analyticsProps}\n questionOrder={questionOrder}\n />\n ) : (\n <TeacherActions\n handleOnReview={handleOnReview}\n handleOnUnlock={handleOnUnlock}\n isMenuVisible={isMenuVisible}\n blockStatus={blockStatus}\n analyticsProps={analyticsProps}\n />\n )}\n </FlexView>\n </SheetItemContainer>\n );\n};\n\nexport default SATSheetItem;\n"],"names":["SATSheetItem","blockStatus","satMaxScore","satScore","restSATSheetItemProps","blockId","sheets","userType","onSATReview","onSATUnlock","onSATStartOrResume","userBlockId","canReview","canStart","canResume","questionOrder","getActiveSATSheet","trackEvent","useUIContext","analyticsProps","useMemo","isMenuVisible","handleOnReview","useCallback","handleOnUnlock","userNodeIds","getUserNodeIdsToUnlockSAT","handleOnStartOrResume","jsxs","SheetItemContainer","FlexView","jsx","VerticalLineWrapper","TopVerticalLine","SheetDetailsWrapper","SheetItemIcon","Text","sheet","statement","color","getSATSheetStatementStats","RewardAccuracy","StudentActions","TeacherActions"],"mappings":";;;;;;;;;;;;AAmBA,MAAMA,KAAuC,CAAC;AAAA,EAC5C,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAM,EAAE,SAAAC,GAAS,QAAAC,GAAQ,UAAAC,GAAU,aAAAC,GAAa,aAAAC,GAAa,oBAAAC,EAC3D,IAAAN,GACI;AAAA,IACJ,eAAeO;AAAA,IACf,YAAYC;AAAA,IACZ,WAAWC;AAAA,IACX,YAAYC;AAAA,IACZ,OAAOC;AAAA,EAAA,IACLC,EAAkBV,CAAM,KAAK,IAE3B,EAAE,SAASW,EAAW,IAAIC,EAAa,GACvCC,IAAiBC;AAAA,IACrB,OAAO;AAAA,MACL,eAAeT;AAAA,MACf,UAAUN;AAAA,IAAA;AAAA,IAEZ,CAACA,GAASM,CAAW;AAAA,EAAA,GAGjBU,IAAgB,IACnBpB,MAAgB,eAAeA,MAAgB,eAAeW,KAAaD,IAGxEW,IAAiBC,EAAY,MAAM;AACnC,QAAA,OAAOf,KAAgB;AACnB,YAAA,IAAI,MAAM,gCAAgC;AAGlD,QAAI,CAACG;AACG,YAAA,IAAI,MAAM,8BAA8B;AAGhD,IAAAM,EAAW,WAAWE,CAAc,GAEpCX,EAAYG,CAAW;AAAA,KACtB,CAACQ,GAAgB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