@cuemath/leap 2.9.4-as5 → 2.9.4-link.0
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/assets/illustrations/illustrations.js +0 -9
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/bin2.js +8 -7
- package/dist/assets/line-icons/icons/bin2.js.map +1 -1
- package/dist/assets/line-icons/icons/chevron-left.js.map +1 -1
- package/dist/assets/lottie/lottie.js +1 -9
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/constants/api.js +2 -3
- package/dist/constants/api.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +33 -99
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +49 -92
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapters-list-styled.js +5 -5
- package/dist/features/chapters/chapters-list/chapters-list-styled.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapters-list.js +70 -64
- package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +2 -5
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/journey/comps/coachmark/coachmark-styled.js +5 -12
- package/dist/features/journey/comps/coachmark/coachmark-styled.js.map +1 -1
- package/dist/features/journey/comps/coachmark/coachmark.js +24 -24
- package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js +2 -3
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/use-journey/journey-context-provider.js +28 -36
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +5 -10
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/features/milestone/create/api/goal-submit.js +1 -1
- package/dist/features/milestone/create/api/goal-submit.js.map +1 -1
- package/dist/features/milestone/create/comps/chapter-item/chapter-item.js +49 -42
- package/dist/features/milestone/create/comps/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +4 -12
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +105 -128
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +92 -0
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +1 -0
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +25 -0
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +1 -0
- package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +20 -14
- package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js.map +1 -1
- package/dist/features/milestone/create/comps/sheets-list/sheets-list.js +50 -26
- package/dist/features/milestone/create/comps/sheets-list/sheets-list.js.map +1 -1
- package/dist/features/milestone/create/milestone-create.js +43 -49
- package/dist/features/milestone/create/milestone-create.js.map +1 -1
- package/dist/features/milestone/create/utils/index.js +38 -33
- package/dist/features/milestone/create/utils/index.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +53 -51
- package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +40 -42
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/goal-edit-container.js +62 -64
- package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/goal-edit-helpers.js +53 -50
- package/dist/features/milestone/edit/goal-edit-helpers.js.map +1 -1
- package/dist/features/milestone/edit/milestone-edit-container.js +52 -54
- package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestones.js +17 -9
- package/dist/features/milestone/milestone-list-container/api/get-milestones.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-tests-list.js +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +104 -136
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +13 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +1 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +38 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +1 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +123 -107
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +175 -155
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +10 -24
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +86 -80
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js +22 -10
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +53 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +1 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +37 -70
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +176 -114
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +25 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +1 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js +16 -29
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js +23 -19
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js +35 -23
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js +100 -96
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +112 -114
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +18 -16
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +71 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +31 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +34 -6
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +79 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +18 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +51 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +11 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +135 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +1 -0
- package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
- package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +3 -4
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
- package/dist/features/trial-session/comps/offering-information/offering-information.js +21 -21
- package/dist/features/trial-session/comps/offering-information/offering-information.js.map +1 -1
- package/dist/features/trial-session/comps/pricing/pricing-cards.js +46 -46
- package/dist/features/trial-session/comps/pricing/pricing-cards.js.map +1 -1
- package/dist/features/trial-session/comps/pricing/pricing.js +25 -25
- package/dist/features/trial-session/comps/pricing/pricing.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +29 -30
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/constants/z-index.js +1 -1
- package/dist/features/ui/constants/z-index.js.map +1 -1
- package/dist/features/ui/context-menu/context-menu-styled.js +14 -28
- package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
- package/dist/features/ui/context-menu/context-menu.js +15 -30
- package/dist/features/ui/context-menu/context-menu.js.map +1 -1
- package/dist/features/ui/theme/button.js +107 -22
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/index.d.ts +34 -314
- package/dist/index.js +470 -499
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/line-icons/icons/alarm.js +0 -41
- package/dist/assets/line-icons/icons/alarm.js.map +0 -1
- package/dist/assets/line-icons/icons/dart.js +0 -23
- package/dist/assets/line-icons/icons/dart.js.map +0 -1
- package/dist/assets/line-icons/icons/exclamation.js +0 -26
- package/dist/assets/line-icons/icons/exclamation.js.map +0 -1
- package/dist/assets/line-icons/icons/home2.js +0 -25
- package/dist/assets/line-icons/icons/home2.js.map +0 -1
- package/dist/assets/line-icons/icons/important.js +0 -23
- package/dist/assets/line-icons/icons/important.js.map +0 -1
- package/dist/assets/line-icons/icons/puzzle.js +0 -25
- package/dist/assets/line-icons/icons/puzzle.js.map +0 -1
- package/dist/assets/line-icons/icons/recap.js +0 -32
- package/dist/assets/line-icons/icons/recap.js.map +0 -1
- package/dist/assets/line-icons/icons/skip-colored.js +0 -43
- package/dist/assets/line-icons/icons/skip-colored.js.map +0 -1
- package/dist/assets/line-icons/icons/status.js +0 -41
- package/dist/assets/line-icons/icons/status.js.map +0 -1
- package/dist/assets/line-icons/icons/testtube.js +0 -33
- package/dist/assets/line-icons/icons/testtube.js.map +0 -1
- package/dist/features/chapters-v2/api/chapter.js +0 -10
- package/dist/features/chapters-v2/api/chapter.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +0 -112
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +0 -26
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +0 -73
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +0 -90
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +0 -97
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +0 -52
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +0 -103
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +0 -13
- package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +0 -153
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +0 -16
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/node-card.js +0 -12
- package/dist/features/chapters-v2/comps/node-card/node-card.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +0 -32
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +0 -31
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +0 -171
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +0 -192
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +0 -1
- package/dist/features/chapters-v2/comps/tag/tag-styled.js +0 -13
- package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +0 -1
- package/dist/features/chapters-v2/comps/tag/tag.js +0 -28
- package/dist/features/chapters-v2/comps/tag/tag.js.map +0 -1
- package/dist/features/chapters-v2/constants/block-constants.js +0 -20
- package/dist/features/chapters-v2/constants/block-constants.js.map +0 -1
- package/dist/features/chapters-v2/constants/node-constants.js +0 -14
- package/dist/features/chapters-v2/constants/node-constants.js.map +0 -1
- package/dist/features/chapters-v2/utils/index.js +0 -41
- package/dist/features/chapters-v2/utils/index.js.map +0 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +0 -144
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +0 -1
- package/dist/features/homework/card-menu-options.js +0 -38
- package/dist/features/homework/card-menu-options.js.map +0 -1
- package/dist/features/homework/card-title.js +0 -15
- package/dist/features/homework/card-title.js.map +0 -1
- package/dist/features/homework/homework-card-view.js +0 -131
- package/dist/features/homework/homework-card-view.js.map +0 -1
- package/dist/features/homework/homework-card.js +0 -205
- package/dist/features/homework/homework-card.js.map +0 -1
- package/dist/features/homework/hw-card-list/api/get-homeworks.js +0 -10
- package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +0 -1
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js +0 -71
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +0 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +0 -208
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +0 -1
- package/dist/features/homework/node-progress.js +0 -29
- package/dist/features/homework/node-progress.js.map +0 -1
- package/dist/features/homework/styles.js +0 -130
- package/dist/features/homework/styles.js.map +0 -1
- package/dist/features/journey/hooks/use-home-page-journey.js +0 -189
- package/dist/features/journey/hooks/use-home-page-journey.js.map +0 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +0 -165
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +0 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +0 -25
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +0 -85
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +0 -1
- package/dist/features/recent-chapters/api/get-recent-chapters.js +0 -9
- package/dist/features/recent-chapters/api/get-recent-chapters.js.map +0 -1
- package/dist/features/recent-chapters/recent-chapters-styled.js +0 -16
- package/dist/features/recent-chapters/recent-chapters-styled.js.map +0 -1
- package/dist/features/recent-chapters/recent-chapters.js +0 -39
- package/dist/features/recent-chapters/recent-chapters.js.map +0 -1
- package/dist/features/sheet-v2/resource-list/resource-list.js +0 -39
- package/dist/features/sheet-v2/resource-list/resource-list.js.map +0 -1
- package/dist/node_modules/date-fns/differenceInDays.js +0 -17
- package/dist/node_modules/date-fns/differenceInDays.js.map +0 -1
- package/dist/static/chapter-header-bg-2.c8d96894.svg +0 -1
- package/dist/static/competitive-arena.b9c40801.json +0 -1
- package/dist/static/learn.71b13323.json +0 -1
- package/dist/static/node-custom-test-bg.d3b757be.svg +0 -1
- package/dist/static/node-learn-bg.b61f815c.svg +0 -1
- package/dist/static/node-practice-bg.16cbaf2a.svg +0 -1
- package/dist/static/node-project-bg.e6a33e28.svg +0 -1
- package/dist/static/node-puzzle-bg.3422135c.svg +0 -1
- package/dist/static/node-recap-bg.546154e4.svg +0 -1
- package/dist/static/node-test-prep-bg.42c0b9c4.svg +0 -1
- package/dist/static/node-video-bg.3df3f73a.svg +0 -1
- package/dist/static/practice.158dd488.json +0 -1
- package/dist/static/project.eb665827.json +0 -1
- package/dist/static/puzzle.b298c7e4.json +0 -1
- package/dist/static/recap.0dd2c1e2.json +0 -1
- package/dist/static/test.803d6036.json +0 -1
- package/dist/static/video.b41451e2.json +0 -1
@@ -1,130 +0,0 @@
|
|
1
|
-
import r from "styled-components";
|
2
|
-
import n from "../../assets/line-icons/icons/minus2.js";
|
3
|
-
import e from "../ui/layout/flex-view.js";
|
4
|
-
import i from "../ui/text/text.js";
|
5
|
-
const l = r(e)(({ theme: o }) => `
|
6
|
-
cursor: pointer;
|
7
|
-
width: 24px;
|
8
|
-
height: 24px;
|
9
|
-
|
10
|
-
|
11
|
-
&:hover {
|
12
|
-
border-radius: 50%;
|
13
|
-
background: ${o.colors.WHITE_5};
|
14
|
-
}
|
15
|
-
`), d = r(i)`
|
16
|
-
display: -webkit-box;
|
17
|
-
-webkit-line-clamp: 1;
|
18
|
-
-webkit-box-orient: vertical;
|
19
|
-
overflow: hidden;
|
20
|
-
text-overflow: ellipsis;
|
21
|
-
`, u = r(e)(({
|
22
|
-
$shouldopenonright: o,
|
23
|
-
$visible: t
|
24
|
-
}) => `
|
25
|
-
cursor: pointer;
|
26
|
-
position: absolute;
|
27
|
-
z-index: 6;
|
28
|
-
top: calc(100% + 4px);
|
29
|
-
right: ${o ? 0 : "auto"};
|
30
|
-
transform-origin: top;
|
31
|
-
transform: scaleY(${t ? 1 : 0});
|
32
|
-
opacity: ${t ? 1 : 0};
|
33
|
-
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
|
34
|
-
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.4);
|
35
|
-
z-index: 10;
|
36
|
-
`), x = r(e)`
|
37
|
-
border: 1px solid ${({ theme: o }) => o.colors.BLACK_T_15};
|
38
|
-
|
39
|
-
&:hover {
|
40
|
-
border: 1px solid ${({ theme: o }) => o.colors.BLACK};
|
41
|
-
}
|
42
|
-
`, b = r(e)(({ $bgImage: o }) => o ? `
|
43
|
-
background-image: url(${o});
|
44
|
-
background-repeat: no-repeat;
|
45
|
-
background-size: cover;
|
46
|
-
background-position: center;
|
47
|
-
overflow: hidden;
|
48
|
-
` : "overflow: hidden;"), h = r(e)`
|
49
|
-
display: flex;
|
50
|
-
align-items: center;
|
51
|
-
justify-content: center;
|
52
|
-
`, w = r(e)`
|
53
|
-
position: absolute;
|
54
|
-
right: -18px;
|
55
|
-
top: -4px;
|
56
|
-
`, f = r.img(({ theme: o }) => {
|
57
|
-
const { gutter: t } = o.layout;
|
58
|
-
return `
|
59
|
-
border: 1px solid ${o.colors.BLACK_T_15};
|
60
|
-
width: ${t * 4}px;
|
61
|
-
height: ${t * 4}px;
|
62
|
-
border-radius: 50%;
|
63
|
-
`;
|
64
|
-
}), g = r(n)`
|
65
|
-
path {
|
66
|
-
stroke: ${({ theme: o }) => o.colors.WHITE};
|
67
|
-
}
|
68
|
-
`, m = r(i)`
|
69
|
-
display: -webkit-box;
|
70
|
-
-webkit-line-clamp: 2;
|
71
|
-
-webkit-box-orient: vertical;
|
72
|
-
overflow: hidden;
|
73
|
-
text-overflow: ellipsis;
|
74
|
-
white-space: break-spaces;
|
75
|
-
`;
|
76
|
-
r(e)``;
|
77
|
-
const k = r(e)(({
|
78
|
-
theme: o,
|
79
|
-
$disabled: t
|
80
|
-
}) => `
|
81
|
-
cursor: ${t ? "not-allowed" : "pointer"};
|
82
|
-
|
83
|
-
&:hover {
|
84
|
-
background: ${t ? "transparent" : o.colors.BLACK};
|
85
|
-
};
|
86
|
-
|
87
|
-
path {
|
88
|
-
fill: ${o.colors.WHITE_1};
|
89
|
-
}
|
90
|
-
`), v = r(i)`
|
91
|
-
white-space: nowrap;
|
92
|
-
overflow: hidden;
|
93
|
-
text-overflow: ellipsis;
|
94
|
-
`, C = r(e)`
|
95
|
-
position: absolute;
|
96
|
-
z-index: 6;
|
97
|
-
top: calc(100% - 36px);
|
98
|
-
right: 12px;
|
99
|
-
transform-origin: top;
|
100
|
-
transform: scaleY(1);
|
101
|
-
`, $ = r(e)`
|
102
|
-
position: absolute;
|
103
|
-
top: 0;
|
104
|
-
left: 0;
|
105
|
-
width: 100%;
|
106
|
-
height: 100%;
|
107
|
-
opacity: 0.5;
|
108
|
-
`, y = r(e)`
|
109
|
-
position: absolute;
|
110
|
-
right: 42px;
|
111
|
-
top: 24px;
|
112
|
-
`;
|
113
|
-
export {
|
114
|
-
f as BannerImage,
|
115
|
-
w as BannerImageWrapper,
|
116
|
-
$ as BlurContainer,
|
117
|
-
y as BlurFlexView,
|
118
|
-
x as CardContainer,
|
119
|
-
l as CardKebabMenuWrapper,
|
120
|
-
u as CardMenuOptionsWrapper,
|
121
|
-
k as CardOptionWrapper,
|
122
|
-
b as CardWrapper,
|
123
|
-
m as HeaderText,
|
124
|
-
h as IconWrapper,
|
125
|
-
C as MenuWrapper,
|
126
|
-
v as OptionText,
|
127
|
-
g as StyledMinus2Icon,
|
128
|
-
d as SubHeaderText
|
129
|
-
};
|
130
|
-
//# sourceMappingURL=styles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../src/features/homework/styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport Minus2Icon from '../../assets/line-icons/icons/minus2';\nimport FlexView from '../ui/layout/flex-view';\nimport Text from '../ui/text/text';\n\ninterface ICardWrapperProps {\n $bgImage: string;\n}\ninterface ICardOptionsMenuWrapperProps {\n $visible: boolean;\n $shouldopenonright: boolean;\n}\n\nexport const CardKebabMenuWrapper = styled(FlexView)(({ theme }) => {\n return `\n cursor: pointer;\n width: 24px;\n height: 24px;\n \n \n &:hover {\n border-radius: 50%;\n background: ${theme.colors.WHITE_5}; \n }\n `;\n});\n\nexport const SubHeaderText = styled(Text)`\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nexport const CardMenuOptionsWrapper = styled(FlexView)<ICardOptionsMenuWrapperProps>(({\n $shouldopenonright,\n $visible,\n}) => {\n return `\n cursor: pointer;\n position: absolute;\n z-index: 6;\n top: calc(100% + 4px);\n right: ${$shouldopenonright ? 0 : 'auto'};\n transform-origin: top;\n transform: scaleY(${$visible ? 1 : 0});\n opacity: ${$visible ? 1 : 0};\n transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;\n box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.4);\n z-index: 10;\n `;\n});\n\nexport const CardContainer = styled(FlexView)`\n border: 1px solid ${({ theme }) => theme.colors.BLACK_T_15};\n\n &:hover {\n border: 1px solid ${({ theme }) => theme.colors.BLACK};\n }\n`;\n\nexport const CardWrapper = styled(FlexView)<ICardWrapperProps>(({ $bgImage }) => {\n if ($bgImage) {\n return `\n background-image: url(${$bgImage});\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n overflow: hidden;\n `;\n }\n\n return 'overflow: hidden;';\n});\n\nexport const IconWrapper = styled(FlexView)`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const BannerImageWrapper = styled(FlexView)`\n position: absolute;\n right: -18px;\n top: -4px;\n`;\n\nexport const BannerImage = styled.img(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n border: 1px solid ${theme.colors.BLACK_T_15};\n width: ${gutter * 4}px;\n height: ${gutter * 4}px;\n border-radius: 50%;\n `;\n});\n\nexport const StyledMinus2Icon = styled(Minus2Icon)`\n path {\n stroke: ${({ theme }) => theme.colors.WHITE};\n }\n`;\n\nexport const HeaderText = styled(Text)`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n`;\n\ninterface ICardOptionWrapperProps {\n $disabled?: boolean;\n}\ninterface ICardOptionsProps {\n $top: number;\n $left: number;\n}\n\nexport const CardOptions = styled(FlexView)<ICardOptionsProps>``;\n\nexport const CardOptionWrapper = styled(FlexView)<ICardOptionWrapperProps>(({\n theme,\n $disabled,\n}) => {\n return `\n cursor: ${$disabled ? 'not-allowed' : 'pointer'};\n \n &:hover {\n background: ${$disabled ? 'transparent' : theme.colors.BLACK};\n };\n \n path {\n fill: ${theme.colors.WHITE_1};\n }\n `;\n});\n\nexport const OptionText = styled(Text)`\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nexport const MenuWrapper = styled(FlexView)`\n position: absolute;\n z-index: 6;\n top: calc(100% - 36px);\n right: 12px;\n transform-origin: top;\n transform: scaleY(1);\n`;\n\nexport const BlurContainer = styled(FlexView)`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0.5;\n`;\n\nexport const BlurFlexView = styled(FlexView)`\n position: absolute;\n right: 42px;\n top: 24px;\n`;\n"],"names":["CardKebabMenuWrapper","styled","FlexView","theme","SubHeaderText","Text","CardMenuOptionsWrapper","$shouldopenonright","$visible","CardContainer","CardWrapper","$bgImage","IconWrapper","BannerImageWrapper","BannerImage","gutter","StyledMinus2Icon","Minus2Icon","HeaderText","CardOptionWrapper","$disabled","OptionText","MenuWrapper","BlurContainer","BlurFlexView"],"mappings":";;;;AAcO,MAAMA,IAAuBC,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAC/C;AAAA;AAAA;AA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,EAAOC,CAAQ;AAEnC,MAAMiB,IAAoBlB,EAAOC,CAAQ,EAA2B,CAAC;AAAA,EAC1E,OAAAC;AAAA,EACA,WAAAiB;AACF,MACS;AAAA,cACKA,IAAY,gBAAgB,SAAS;AAAA;AAAA;AAAA,oBAG/BA,IAAY,gBAAgBjB,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA,cAIpDA,EAAM,OAAO,OAAO;AAAA;AAAA,GAGjC,GAEYkB,IAAapB,EAAOI,CAAI;AAAA;AAAA;AAAA;AAAA,GAMxBiB,IAAcrB,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAS7BqB,IAAgBtB,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAS/BsB,IAAevB,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -1,189 +0,0 @@
|
|
1
|
-
import { jsx as e, jsxs as h, Fragment as P } from "react/jsx-runtime";
|
2
|
-
import { useRef as a, useCallback as L, useMemo as Y, useEffect as _ } from "react";
|
3
|
-
import $ from "../../homework/homework-card.js";
|
4
|
-
import J from "../../homework/hw-card-list/hw-card-list.js";
|
5
|
-
import { getTopicsFromItems as U } from "../../milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js";
|
6
|
-
import z from "../../recent-chapters/recent-chapters.js";
|
7
|
-
import u from "../../ui/buttons/button/button.js";
|
8
|
-
import s from "../../ui/layout/flex-view.js";
|
9
|
-
import C from "../../ui/text/text.js";
|
10
|
-
import { ELementWrapper as H } from "../comps/coachmark/coachmark-styled.js";
|
11
|
-
import { JOURNEY_ID_STUDENT as O } from "../journey-id/journey-id-student.js";
|
12
|
-
import { IndicatorType as f } from "../use-journey/constants.js";
|
13
|
-
import { useJourney as K } from "../use-journey/use-journey.js";
|
14
|
-
const ie = () => {
|
15
|
-
const o = O.HOMEPAGE_JOURNEY, i = a(null), n = a(null), l = a(null), c = a(null), g = a([]), { nextCoachmark: t, setJourney: A, endJourney: w, addCoachmark: E } = K(), y = L(
|
16
|
-
(r, d, m) => {
|
17
|
-
c.current ? (E(O.HOMEPAGE_JOURNEY, {
|
18
|
-
originalElementToHighlightRef: c,
|
19
|
-
elementToHighlight: /* @__PURE__ */ e(s, { $widthX: 45, children: /* @__PURE__ */ e(
|
20
|
-
z,
|
21
|
-
{
|
22
|
-
studentId: r,
|
23
|
-
courseStream: m,
|
24
|
-
userType: d ? "STUDENT" : "TEACHER",
|
25
|
-
onChapterClick: () => null
|
26
|
-
}
|
27
|
-
) }),
|
28
|
-
isActive: !1,
|
29
|
-
type: f.TOOLTIP,
|
30
|
-
indicator: {
|
31
|
-
tooltipItem: /* @__PURE__ */ h(s, { $flexRowGapX: 0.75, $justifyContent: "flex-start", children: [
|
32
|
-
/* @__PURE__ */ e(C, { $renderAs: "ab2-bold", children: "Access all your recent chapters in one place." }),
|
33
|
-
/* @__PURE__ */ e(
|
34
|
-
u,
|
35
|
-
{
|
36
|
-
label: "Got it",
|
37
|
-
size: "xsmall",
|
38
|
-
widthX: 6,
|
39
|
-
renderAs: "secondary",
|
40
|
-
onClick: () => w(O.HOMEPAGE_JOURNEY)
|
41
|
-
}
|
42
|
-
)
|
43
|
-
] }),
|
44
|
-
position: "top",
|
45
|
-
renderAs: "primary",
|
46
|
-
tooltipXCoOrdinates: -227,
|
47
|
-
tooltipYCoOrdinates: 12,
|
48
|
-
arrowXCoOrdinates: -110,
|
49
|
-
backgroundColor: "YELLOW_4",
|
50
|
-
borderColor: "BLACK",
|
51
|
-
arrowColor: "BLACK",
|
52
|
-
arrowSize: 12,
|
53
|
-
width: 264
|
54
|
-
}
|
55
|
-
}), t(o, !1, 0, !0)) : w(o);
|
56
|
-
},
|
57
|
-
[t, o, E, w]
|
58
|
-
), b = L(
|
59
|
-
({ hwDetails: r, studentId: d, stream: m, userType: T }) => {
|
60
|
-
const { items: k, node_type: X, title: I, subtext: N } = r[0], S = U(k).join(", "), B = X === "DYNAMIC", p = T === "STUDENT";
|
61
|
-
if (!(i != null && i.current) || !(n != null && n.current) || !(l != null && l.current))
|
62
|
-
return;
|
63
|
-
const G = [
|
64
|
-
{
|
65
|
-
originalElementToHighlightRef: i,
|
66
|
-
isActive: !1,
|
67
|
-
type: f.TOOLTIP,
|
68
|
-
elementToHighlight: /* @__PURE__ */ e(P, {}),
|
69
|
-
indicator: {
|
70
|
-
position: "left",
|
71
|
-
tooltipXCoOrdinates: 0,
|
72
|
-
tooltipYCoOrdinates: p ? 100 : 0,
|
73
|
-
backgroundColor: "BLUE_4",
|
74
|
-
borderColor: "BLACK",
|
75
|
-
arrowColor: "BLACK",
|
76
|
-
arrowSize: 12,
|
77
|
-
width: 264,
|
78
|
-
tooltipItem: /* @__PURE__ */ h(s, { $flexRowGapX: 0.75, children: [
|
79
|
-
/* @__PURE__ */ e(C, { $renderAs: "ab2-bold", children: p ? "Welcome to the all new learning homepage." : "Welcome to the all new tutoring homepage." }),
|
80
|
-
/* @__PURE__ */ e(
|
81
|
-
u,
|
82
|
-
{
|
83
|
-
label: "Next",
|
84
|
-
size: "xsmall",
|
85
|
-
widthX: 6,
|
86
|
-
renderAs: "secondary",
|
87
|
-
onClick: () => t(o, !1, 0, !0)
|
88
|
-
}
|
89
|
-
)
|
90
|
-
] })
|
91
|
-
}
|
92
|
-
},
|
93
|
-
{
|
94
|
-
originalElementToHighlightRef: n,
|
95
|
-
elementToHighlight: /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(J, { userType: T, studentId: d, stream: m }) }),
|
96
|
-
type: f.TOOLTIP,
|
97
|
-
indicator: {
|
98
|
-
position: "top",
|
99
|
-
tooltipXCoOrdinates: -197,
|
100
|
-
tooltipYCoOrdinates: -12,
|
101
|
-
arrowXCoOrdinates: -110,
|
102
|
-
backgroundColor: "GREEN_4",
|
103
|
-
borderColor: "BLACK",
|
104
|
-
arrowColor: "BLACK",
|
105
|
-
width: 264,
|
106
|
-
arrowSize: 12,
|
107
|
-
tooltipItem: /* @__PURE__ */ h(s, { $flexRowGapX: 0.75, children: [
|
108
|
-
/* @__PURE__ */ e(C, { $renderAs: "ab2-bold", children: p ? "Homework is now easy to access and easy to complete!" : "Homework is now easy to access and easy to review!" }),
|
109
|
-
/* @__PURE__ */ e(
|
110
|
-
u,
|
111
|
-
{
|
112
|
-
label: "Next",
|
113
|
-
size: "xsmall",
|
114
|
-
widthX: 6,
|
115
|
-
renderAs: "secondary",
|
116
|
-
onClick: () => t(o, !1, 0, !0)
|
117
|
-
}
|
118
|
-
)
|
119
|
-
] })
|
120
|
-
},
|
121
|
-
isActive: !1
|
122
|
-
},
|
123
|
-
{
|
124
|
-
originalElementToHighlightRef: l,
|
125
|
-
elementToHighlight: /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(
|
126
|
-
$,
|
127
|
-
{
|
128
|
-
isInQueue: !1,
|
129
|
-
userType: T,
|
130
|
-
header: B ? S : I,
|
131
|
-
subHeader: N || "",
|
132
|
-
nodeData: r[0],
|
133
|
-
renderAs: "homework",
|
134
|
-
shouldOpenOnRight: !1
|
135
|
-
}
|
136
|
-
) }),
|
137
|
-
type: f.TOOLTIP,
|
138
|
-
indicator: {
|
139
|
-
position: "top",
|
140
|
-
tooltipXCoOrdinates: -35,
|
141
|
-
tooltipYCoOrdinates: -7,
|
142
|
-
backgroundColor: "PURPLE_4",
|
143
|
-
borderColor: "BLACK",
|
144
|
-
arrowColor: "BLACK",
|
145
|
-
arrowXCoOrdinates: -97,
|
146
|
-
arrowSize: 12,
|
147
|
-
width: 264,
|
148
|
-
tooltipItem: /* @__PURE__ */ h(s, { $flexRowGapX: 0.75, children: [
|
149
|
-
/* @__PURE__ */ e(C, { $renderAs: "ab2-bold", children: "Track homework status and their due dates." }),
|
150
|
-
/* @__PURE__ */ e(
|
151
|
-
u,
|
152
|
-
{
|
153
|
-
label: c.current ? "Next" : "Got it",
|
154
|
-
size: "xsmall",
|
155
|
-
widthX: 6,
|
156
|
-
renderAs: "secondary",
|
157
|
-
onClick: () => y(d, p, m)
|
158
|
-
}
|
159
|
-
)
|
160
|
-
] })
|
161
|
-
},
|
162
|
-
isActive: !1
|
163
|
-
}
|
164
|
-
];
|
165
|
-
A(o, G);
|
166
|
-
const x = setTimeout(() => {
|
167
|
-
clearTimeout(x), t(o);
|
168
|
-
}, 200);
|
169
|
-
g.current.push(x);
|
170
|
-
},
|
171
|
-
[A, o, t, y]
|
172
|
-
), R = Y(
|
173
|
-
() => ({
|
174
|
-
homepageRef: i,
|
175
|
-
homeworkRef: n,
|
176
|
-
individualHomeworkRef: l,
|
177
|
-
recentChaptersRef: c,
|
178
|
-
startJourney: b
|
179
|
-
}),
|
180
|
-
[b]
|
181
|
-
);
|
182
|
-
return _(() => () => {
|
183
|
-
g.current.forEach((r) => clearTimeout(r)), g.current = [];
|
184
|
-
}, []), R;
|
185
|
-
};
|
186
|
-
export {
|
187
|
-
ie as useHomePageJourney
|
188
|
-
};
|
189
|
-
//# sourceMappingURL=use-home-page-journey.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"use-home-page-journey.js","sources":["../../../../src/features/journey/hooks/use-home-page-journey.tsx"],"sourcesContent":["import type { IHomeworkData } from '../../homework/hw-card-list/api/get-homeworks';\nimport type { TCourseStream } from '../../milestone/create/milestone-create-types';\nimport type { IArrowTooltipProps } from '../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { IHomepageStartJourneyProps } from '../types/homepage-journey-types';\nimport type { ICoachmarkProps } from '../use-journey/journey-context-types';\n\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport HomeworkCard from '../../homework/homework-card';\nimport HWCardList from '../../homework/hw-card-list/hw-card-list';\nimport { getTopicsFromItems } from '../../milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils';\nimport RecentChapters from '../../recent-chapters/recent-chapters';\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { ELementWrapper } from '../comps/coachmark/coachmark-styled';\nimport { JOURNEY_ID_STUDENT } from '../journey-id/journey-id-student';\nimport { IndicatorType } from '../use-journey/constants';\nimport { useJourney } from '../use-journey/use-journey';\n\nexport const useHomePageJourney = () => {\n const journeyId = JOURNEY_ID_STUDENT.HOMEPAGE_JOURNEY;\n\n const homepageRef = useRef<HTMLDivElement>(null);\n const homeworkRef = useRef<HTMLDivElement>(null);\n const individualHomeworkRef = useRef<HTMLDivElement>(null);\n const recentChaptersRef = useRef<HTMLDivElement>(null);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n const { nextCoachmark, setJourney, endJourney, addCoachmark } = useJourney();\n\n const handleLastStep = useCallback(\n (userId: string, isStudent: boolean, courseValue: string) => {\n if (recentChaptersRef.current) {\n addCoachmark(JOURNEY_ID_STUDENT.HOMEPAGE_JOURNEY, {\n originalElementToHighlightRef: recentChaptersRef,\n elementToHighlight: (\n <FlexView $widthX={45}>\n <RecentChapters\n studentId={userId}\n courseStream={courseValue as TCourseStream}\n userType={isStudent ? 'STUDENT' : 'TEACHER'}\n onChapterClick={() => null}\n />\n </FlexView>\n ),\n isActive: false,\n type: IndicatorType.TOOLTIP,\n indicator: {\n tooltipItem: (\n <FlexView $flexRowGapX={0.75} $justifyContent=\"flex-start\">\n <Text $renderAs=\"ab2-bold\">Access all your recent chapters in one place.</Text>\n <Button\n label=\"Got it\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => endJourney(JOURNEY_ID_STUDENT.HOMEPAGE_JOURNEY)}\n />\n </FlexView>\n ),\n position: 'top',\n renderAs: 'primary',\n tooltipXCoOrdinates: -227,\n tooltipYCoOrdinates: 12,\n arrowXCoOrdinates: -110,\n backgroundColor: 'YELLOW_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n } as IArrowTooltipProps,\n });\n nextCoachmark(journeyId, false, 0, true);\n } else {\n endJourney(journeyId);\n }\n },\n [nextCoachmark, journeyId, addCoachmark, endJourney],\n );\n\n const startJourney = useCallback(\n ({ hwDetails, studentId, stream, userType }: IHomepageStartJourneyProps) => {\n const { items, node_type: nodeType, title, subtext } = hwDetails[0] as IHomeworkData;\n const topics = getTopicsFromItems(items);\n const testChapterName = topics.join(', ');\n const isDynamicSheet = nodeType === 'DYNAMIC';\n const isStudent = userType === 'STUDENT';\n\n if (!homepageRef?.current || !homeworkRef?.current || !individualHomeworkRef?.current) {\n return;\n }\n\n const homepageSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: homepageRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'left',\n tooltipXCoOrdinates: 0,\n tooltipYCoOrdinates: isStudent ? 100 : 0,\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">\n {isStudent\n ? 'Welcome to the all new learning homepage.'\n : 'Welcome to the all new tutoring homepage.'}\n </Text>\n <Button\n label=\"Next\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => nextCoachmark(journeyId, false, 0, true)}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: homeworkRef,\n elementToHighlight: (\n <ELementWrapper>\n <HWCardList userType={userType} studentId={studentId} stream={stream} />\n </ELementWrapper>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: -197,\n tooltipYCoOrdinates: -12,\n arrowXCoOrdinates: -110,\n backgroundColor: 'GREEN_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n width: 264,\n arrowSize: 12,\n tooltipItem: (\n <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">\n {isStudent\n ? 'Homework is now easy to access and easy to complete!'\n : 'Homework is now easy to access and easy to review!'}\n </Text>\n <Button\n label=\"Next\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => nextCoachmark(journeyId, false, 0, true)}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n {\n originalElementToHighlightRef: individualHomeworkRef,\n elementToHighlight: (\n <ELementWrapper>\n <HomeworkCard\n isInQueue={false}\n userType={userType}\n header={isDynamicSheet ? testChapterName : title}\n subHeader={subtext || ''}\n nodeData={hwDetails[0] as IHomeworkData}\n renderAs=\"homework\"\n shouldOpenOnRight={false}\n />\n </ELementWrapper>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: -35,\n tooltipYCoOrdinates: -7,\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowXCoOrdinates: -97,\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">Track homework status and their due dates.</Text>\n <Button\n label={recentChaptersRef.current ? 'Next' : 'Got it'}\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => handleLastStep(studentId, isStudent, stream)}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, homepageSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n nextCoachmark(journeyId);\n }, 200);\n\n timerRefs.current.push(delayBeforeStart); // Store to cleanup later\n },\n [setJourney, journeyId, nextCoachmark, handleLastStep],\n );\n\n const data = useMemo(\n () => ({\n homepageRef,\n homeworkRef,\n individualHomeworkRef,\n recentChaptersRef,\n startJourney,\n }),\n [startJourney],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, []);\n\n return data;\n};\n"],"names":["useHomePageJourney","journeyId","JOURNEY_ID_STUDENT","homepageRef","useRef","homeworkRef","individualHomeworkRef","recentChaptersRef","timerRefs","nextCoachmark","setJourney","endJourney","addCoachmark","useJourney","handleLastStep","useCallback","userId","isStudent","courseValue","jsx","FlexView","RecentChapters","IndicatorType","jsxs","Text","Button","startJourney","hwDetails","studentId","stream","userType","items","nodeType","title","subtext","testChapterName","getTopicsFromItems","isDynamicSheet","homepageSteps","Fragment","ELementWrapper","HWCardList","HomeworkCard","delayBeforeStart","data","useMemo","useEffect","timer"],"mappings":";;;;;;;;;;;;;AAoBO,MAAMA,KAAqB,MAAM;AACtC,QAAMC,IAAYC,EAAmB,kBAE/BC,IAAcC,EAAuB,IAAI,GACzCC,IAAcD,EAAuB,IAAI,GACzCE,IAAwBF,EAAuB,IAAI,GACnDG,IAAoBH,EAAuB,IAAI,GAC/CI,IAAYJ,EAAwC,CAAA,CAAE,GACtD,EAAE,eAAAK,GAAe,YAAAC,GAAY,YAAAC,GAAY,cAAAC,EAAA,IAAiBC,KAE1DC,IAAiBC;AAAA,IACrB,CAACC,GAAgBC,GAAoBC,MAAwB;AAC3D,MAAIX,EAAkB,WACpBK,EAAaV,EAAmB,kBAAkB;AAAA,QAChD,+BAA+BK;AAAA,QAC/B,oBACE,gBAAAY,EAACC,GAAS,EAAA,SAAS,IACjB,UAAA,gBAAAD;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,WAAWL;AAAA,YACX,cAAcE;AAAA,YACd,UAAUD,IAAY,YAAY;AAAA,YAClC,gBAAgB,MAAM;AAAA,UAAA;AAAA,QAAA,GAE1B;AAAA,QAEF,UAAU;AAAA,QACV,MAAMK,EAAc;AAAA,QACpB,WAAW;AAAA,UACT,aACG,gBAAAC,EAAAH,GAAA,EAAS,cAAc,MAAM,iBAAgB,cAC5C,UAAA;AAAA,YAAC,gBAAAD,EAAAK,GAAA,EAAK,WAAU,YAAW,UAA6C,iDAAA;AAAA,YACxE,gBAAAL;AAAA,cAACM;AAAA,cAAA;AAAA,gBACC,OAAM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AAAoB,EAAU,MACD,MAAM;AACX,IAAAtC,EAAU,QAAQ,QAAQ,CAASuC,MAAA,aAAaA,CAAK,CAAC,GACtDvC,EAAU,UAAU;EAAC,GAEtB,CAAE,CAAA,GAEEoC;AACT;"}
|
@@ -1,165 +0,0 @@
|
|
1
|
-
import { jsxs as u, jsx as e, Fragment as x } from "react/jsx-runtime";
|
2
|
-
import { memo as H, useCallback as l, useEffect as L } from "react";
|
3
|
-
import { IMAGES as X } from "../../../../assets/images/images.js";
|
4
|
-
import D from "../../../ui/arrow-tooltip/arrow-tooltip.js";
|
5
|
-
import S from "../../../ui/buttons/button/button.js";
|
6
|
-
import T from "../../../ui/layout/flex-view.js";
|
7
|
-
import j from "../../../ui/loader/app-loader/app-loader.js";
|
8
|
-
import _ from "../../../ui/separator/separator.js";
|
9
|
-
import N from "../../../ui/text/text.js";
|
10
|
-
import { MILESTONE_WIDGET_MIN_HEIGHT as v } from "../../constants.js";
|
11
|
-
import { useGetTestHelpData as G } from "../../milestone-list-container/api/get-tests-list.js";
|
12
|
-
import { TESTS_CREATION_ANALYTICS_EVENTS as R } from "../tests-creation/tests-creation-analytics-events.js";
|
13
|
-
import W from "./test-list-view.js";
|
14
|
-
const re = H((c) => {
|
15
|
-
const {
|
16
|
-
isChaptersAvailable: g,
|
17
|
-
isDraftMilestone: E,
|
18
|
-
isMilestoneActive: d,
|
19
|
-
userType: b,
|
20
|
-
studentId: m,
|
21
|
-
userMilestoneId: t,
|
22
|
-
canUpdatePlan: I
|
23
|
-
} = c, { onCreateMilestoneTest: i, onTestPreview: o, onTestStart: n, onTestReview: s } = c, {
|
24
|
-
get: A,
|
25
|
-
data: r,
|
26
|
-
isProcessingFailed: p,
|
27
|
-
isProcessed: f,
|
28
|
-
isStale: C,
|
29
|
-
isProcessing: w
|
30
|
-
} = G(), y = !I || !g || !d || d && E, k = d && !g ? "Chapters need to be assigned" : E ? "Allowed after plan is published" : "Plan is completed", h = l(() => {
|
31
|
-
A(t, void 0, {
|
32
|
-
studentId: m
|
33
|
-
});
|
34
|
-
}, [A, m, t]);
|
35
|
-
L(() => {
|
36
|
-
!w && (!f && !p || C) && h();
|
37
|
-
}, [h, f, w, p, C]);
|
38
|
-
const $ = l(() => {
|
39
|
-
if (typeof i == "function") {
|
40
|
-
i == null || i(t, ((r == null ? void 0 : r.length) || 0) + 1);
|
41
|
-
return;
|
42
|
-
}
|
43
|
-
throw new Error("No callback provided. If provided it must be a function");
|
44
|
-
}, [i, t, r]), M = l(
|
45
|
-
(a) => {
|
46
|
-
if (typeof o == "function") {
|
47
|
-
o == null || o(a, t);
|
48
|
-
return;
|
49
|
-
}
|
50
|
-
throw new Error("No callback provided. If provided it must be a function");
|
51
|
-
},
|
52
|
-
[o, t]
|
53
|
-
), O = l(
|
54
|
-
(a) => {
|
55
|
-
if (typeof n == "function") {
|
56
|
-
n == null || n(a);
|
57
|
-
return;
|
58
|
-
}
|
59
|
-
throw new Error("No callback provided. If provided it must be a function");
|
60
|
-
},
|
61
|
-
[n]
|
62
|
-
), P = l(
|
63
|
-
(a) => {
|
64
|
-
if (typeof s == "function") {
|
65
|
-
s == null || s(a, t);
|
66
|
-
return;
|
67
|
-
}
|
68
|
-
throw new Error("No callback provided. If provided it must be a function");
|
69
|
-
},
|
70
|
-
[s, t]
|
71
|
-
);
|
72
|
-
return p ? /* @__PURE__ */ u(
|
73
|
-
T,
|
74
|
-
{
|
75
|
-
$flexGapX: 1.5,
|
76
|
-
$alignItems: "center",
|
77
|
-
$justifyContent: "center",
|
78
|
-
$height: "100%",
|
79
|
-
$background: "WHITE",
|
80
|
-
children: [
|
81
|
-
/* @__PURE__ */ e(N, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
|
82
|
-
/* @__PURE__ */ e(
|
83
|
-
S,
|
84
|
-
{
|
85
|
-
widthX: 14,
|
86
|
-
size: "small",
|
87
|
-
shape: "square",
|
88
|
-
renderAs: "primary",
|
89
|
-
label: "Try again",
|
90
|
-
onClick: h
|
91
|
-
}
|
92
|
-
)
|
93
|
-
]
|
94
|
-
}
|
95
|
-
) : f ? r != null && r.length ? /* @__PURE__ */ e(
|
96
|
-
W,
|
97
|
-
{
|
98
|
-
...c,
|
99
|
-
onNodeAttempt: O,
|
100
|
-
onNodeView: M,
|
101
|
-
onNodeReview: P,
|
102
|
-
milestoneId: t,
|
103
|
-
sheets: r,
|
104
|
-
userType: b,
|
105
|
-
studentId: m,
|
106
|
-
onCreateNewTest: $,
|
107
|
-
canUpdatedPlan: I,
|
108
|
-
isMilestoneActive: d
|
109
|
-
}
|
110
|
-
) : /* @__PURE__ */ u(
|
111
|
-
T,
|
112
|
-
{
|
113
|
-
$gapX: 6.75,
|
114
|
-
$alignItems: "center",
|
115
|
-
$justifyContent: "center",
|
116
|
-
$background: "WHITE",
|
117
|
-
$height: v,
|
118
|
-
children: [
|
119
|
-
/* @__PURE__ */ e("img", { src: X.EMPTY_MIX_TESTS, alt: "empty_mix_tests" }),
|
120
|
-
/* @__PURE__ */ e(_, { heightX: 2 }),
|
121
|
-
b === "TEACHER" ? /* @__PURE__ */ u(x, { children: [
|
122
|
-
/* @__PURE__ */ e(
|
123
|
-
D,
|
124
|
-
{
|
125
|
-
renderAs: "primary",
|
126
|
-
position: "bottom",
|
127
|
-
hidden: !y,
|
128
|
-
tooltipItem: k,
|
129
|
-
children: /* @__PURE__ */ e(
|
130
|
-
S,
|
131
|
-
{
|
132
|
-
widthX: 10,
|
133
|
-
renderAs: "primary",
|
134
|
-
shape: "square",
|
135
|
-
size: "small",
|
136
|
-
label: "Create a Test",
|
137
|
-
onClick: $,
|
138
|
-
disabled: y,
|
139
|
-
analyticsLabel: R.CUSTOM_TEST_CREATION_STARTED,
|
140
|
-
analyticsProps: {
|
141
|
-
milestone_id: t
|
142
|
-
}
|
143
|
-
}
|
144
|
-
)
|
145
|
-
}
|
146
|
-
),
|
147
|
-
/* @__PURE__ */ e(_, { heightX: 2 })
|
148
|
-
] }) : /* @__PURE__ */ e(N, { $renderAs: "ab2-bold", $color: "BLACK_T_87", children: "Wait for the teacher to create a test" })
|
149
|
-
]
|
150
|
-
}
|
151
|
-
) : /* @__PURE__ */ e(
|
152
|
-
T,
|
153
|
-
{
|
154
|
-
$height: v,
|
155
|
-
$alignItems: "center",
|
156
|
-
$justifyContent: "center",
|
157
|
-
$background: "WHITE",
|
158
|
-
children: /* @__PURE__ */ e(j, { height: "100%" })
|
159
|
-
}
|
160
|
-
);
|
161
|
-
});
|
162
|
-
export {
|
163
|
-
re as default
|
164
|
-
};
|
165
|
-
//# sourceMappingURL=test-list-container.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"test-list-container.js","sources":["../../../../../src/features/milestone/milestone-tests/test-list-v2/test-list-container.tsx"],"sourcesContent":["import type { INodeDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\nimport type { ITestsListProps } from './types';\n\nimport { memo, useCallback, useEffect, type FC } from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { MILESTONE_WIDGET_MIN_HEIGHT } from '../../constants';\nimport { useGetTestHelpData } from '../../milestone-list-container/api/get-tests-list';\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../tests-creation/tests-creation-analytics-events';\nimport TestSheetsList from './test-list-view';\n\nconst MilestoneTestsList: FC<ITestsListProps> = memo(props => {\n const {\n isChaptersAvailable,\n isDraftMilestone,\n isMilestoneActive,\n userType,\n studentId,\n userMilestoneId,\n canUpdatePlan,\n } = props;\n const { onCreateMilestoneTest, onTestPreview, onTestStart, onTestReview } = props;\n\n const {\n get: getTestHelpData,\n data,\n isProcessingFailed,\n isProcessed,\n isStale,\n isProcessing,\n } = useGetTestHelpData();\n\n const isTestSheetCreationDisabled =\n !canUpdatePlan ||\n !isChaptersAvailable ||\n !isMilestoneActive ||\n (isMilestoneActive && isDraftMilestone);\n const testCreationCtaTooltipText =\n isMilestoneActive && !isChaptersAvailable\n ? 'Chapters need to be assigned'\n : isDraftMilestone\n ? 'Allowed after plan is published'\n : 'Plan is completed';\n\n const handleOnTryAgain = useCallback(() => {\n getTestHelpData(userMilestoneId, undefined, {\n studentId,\n });\n }, [getTestHelpData, studentId, userMilestoneId]);\n\n useEffect(() => {\n if (!isProcessing && ((!isProcessed && !isProcessingFailed) || isStale)) {\n handleOnTryAgain();\n }\n }, [handleOnTryAgain, isProcessed, isProcessing, isProcessingFailed, isStale]);\n\n const handleOnCreateMilestoneTest = useCallback(() => {\n if (typeof onCreateMilestoneTest === 'function') {\n onCreateMilestoneTest?.(userMilestoneId, (data?.length || 0) + 1);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [onCreateMilestoneTest, userMilestoneId, data]);\n\n const handleOnTestPreview = useCallback(\n (sheetData: INodeDataProps) => {\n if (typeof onTestPreview === 'function') {\n onTestPreview?.(sheetData, userMilestoneId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestPreview, userMilestoneId],\n );\n\n const handleOnTestStart = useCallback(\n (sheetData: INodeDataProps) => {\n if (typeof onTestStart === 'function') {\n onTestStart?.(sheetData);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestStart],\n );\n\n const handleOnTestReview = useCallback(\n (sheetData: INodeDataProps) => {\n if (typeof onTestReview === 'function') {\n onTestReview?.(sheetData, userMilestoneId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n },\n [onTestReview, userMilestoneId],\n );\n\n if (isProcessingFailed) {\n return (\n <FlexView\n $flexGapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $height=\"100%\"\n $background=\"WHITE\"\n >\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={handleOnTryAgain}\n />\n </FlexView>\n );\n }\n\n if (isProcessed) {\n if (data?.length) {\n return (\n <TestSheetsList\n {...props}\n onNodeAttempt={handleOnTestStart}\n onNodeView={handleOnTestPreview}\n onNodeReview={handleOnTestReview}\n milestoneId={userMilestoneId}\n sheets={data}\n userType={userType}\n studentId={studentId}\n onCreateNewTest={handleOnCreateMilestoneTest}\n canUpdatedPlan={canUpdatePlan}\n isMilestoneActive={isMilestoneActive}\n />\n );\n }\n\n return (\n <FlexView\n $gapX={6.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n >\n <img src={IMAGES.EMPTY_MIX_TESTS} alt=\"empty_mix_tests\" />\n <Separator heightX={2} />\n {userType === 'TEACHER' ? (\n <>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n hidden={!isTestSheetCreationDisabled}\n tooltipItem={testCreationCtaTooltipText}\n >\n <Button\n widthX={10}\n renderAs=\"primary\"\n shape=\"square\"\n size=\"small\"\n label=\"Create a Test\"\n onClick={handleOnCreateMilestoneTest}\n disabled={isTestSheetCreationDisabled}\n analyticsLabel={TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_CREATION_STARTED}\n analyticsProps={{\n milestone_id: userMilestoneId,\n }}\n />\n </ArrowTooltip>\n <Separator heightX={2} />\n </>\n ) : (\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_87\">\n Wait for the teacher to create a test\n </Text>\n )}\n </FlexView>\n );\n }\n\n return (\n <FlexView\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n >\n <AppLoader height=\"100%\" />\n </FlexView>\n );\n});\n\nexport default MilestoneTestsList;\n"],"names":["MilestoneTestsList","memo","props","isChaptersAvailable","isDraftMilestone","isMilestoneActive","userType","studentId","userMilestoneId","canUpdatePlan","onCreateMilestoneTest","onTestPreview","onTestStart","onTestReview","getTestHelpData","data","isProcessingFailed","isProcessed","isStale","isProcessing","useGetTestHelpData","isTestSheetCreationDisabled","testCreationCtaTooltipText","handleOnTryAgain","useCallback","useEffect","handleOnCreateMilestoneTest","handleOnTestPreview","sheetData","handleOnTestStart","handleOnTestReview","jsxs","FlexView","jsx","Text","Button","TestSheetsList","MILESTONE_WIDGET_MIN_HEIGHT","IMAGES","Separator","Fragment","ArrowTooltip","TESTS_CREATION_ANALYTICS_EVENTS","AppLoader"],"mappings":";;;;;;;;;;;;;AAiBM,MAAAA,KAA0CC,EAAK,CAASC,MAAA;AACtD,QAAA;AAAA,IACJ,qBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,eAAAC;AAAA,EACE,IAAAP,GACE,EAAE,uBAAAQ,GAAuB,eAAAC,GAAe,aAAAC,GAAa,cAAAC,MAAiBX,GAEtE;AAAA,IACJ,KAAKY;AAAA,IACL,MAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,cAAAC;AAAA,MACEC,EAAmB,GAEjBC,IACJ,CAACZ,KACD,CAACN,KACD,CAACE,KACAA,KAAqBD,GAClBkB,IACJjB,KAAqB,CAACF,IAClB,iCACAC,IACE,oCACA,qBAEFmB,IAAmBC,EAAY,MAAM;AACzC,IAAAV,EAAgBN,GAAiB,QAAW;AAAA,MAC1C,WAAAD;AAAA,IAAA,CACD;AAAA,EACA,GAAA,CAACO,GAAiBP,GAAWC,CAAe,CAAC;AAEhD,EAAAiB,EAAU,MAAM;AACd,IAAI,CAACN,MAAkB,CAACF,KAAe,CAACD,KAAuBE,MAC5CK;EACnB,GACC,CAACA,GAAkBN,GAAaE,GAAcH,GAAoBE,CAAO,CAAC;AAEvE,Q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SAAS,EAAG,CAAA;AAAA,QAAA,EAAA,CACzB,IAEC,gBAAAN,EAAAC,GAAA,EAAK,WAAU,YAAW,QAAO,cAAa,UAE/C,yCAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAON,gBAAAD;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,SAASK;AAAA,MACT,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,aAAY;AAAA,MAEZ,UAAA,gBAAAJ,EAACU,GAAU,EAAA,QAAO,OAAO,CAAA;AAAA,IAAA;AAAA,EAAA;AAG/B,CAAC;"}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { styled as t } from "styled-components";
|
2
|
-
import o from "../../../ui/layout/flex-view.js";
|
3
|
-
const i = t(o)`
|
4
|
-
position: sticky;
|
5
|
-
bottom: 0;
|
6
|
-
margin-left: auto;
|
7
|
-
`, s = t(o)(({ theme: e }) => {
|
8
|
-
const { colors: r } = e;
|
9
|
-
return `
|
10
|
-
border-radius: 50%;
|
11
|
-
box-shadow: 0px 10px 20px 0px ${r.BLACK_T_15};
|
12
|
-
`;
|
13
|
-
}), a = t.div`
|
14
|
-
display: grid;
|
15
|
-
grid-template-columns: repeat(3, 200px);
|
16
|
-
grid-gap: 32px;
|
17
|
-
justify-content: center;
|
18
|
-
padding: 32px 0;
|
19
|
-
`;
|
20
|
-
export {
|
21
|
-
s as IconButtonCover,
|
22
|
-
i as IconContainer,
|
23
|
-
a as TestSheetItemWrapper
|
24
|
-
};
|
25
|
-
//# sourceMappingURL=test-list-view-styled.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"test-list-view-styled.js","sources":["../../../../../src/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.ts"],"sourcesContent":["import { styled } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst IconContainer = styled(FlexView)`\n position: sticky;\n bottom: 0;\n margin-left: auto;\n`;\n\nconst IconButtonCover = styled(FlexView)(({ theme }) => {\n const { colors } = theme;\n\n return `\n border-radius: 50%;\n box-shadow: 0px 10px 20px 0px ${colors.BLACK_T_15};\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, IconButtonCover, TestSheetItemWrapper };\n"],"names":["IconContainer","styled","FlexView","IconButtonCover","theme","colors","TestSheetItemWrapper"],"mappings":";;AAIM,MAAAA,IAAgBC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAM/BC,IAAkBF,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAE,QAAY;AAChD,QAAA,EAAE,QAAAC,EAAW,IAAAD;AAEZ,SAAA;AAAA;AAAA,sCAE6BC,EAAO,UAAU;AAAA;AAEvD,CAAC,GAEKC,IAAuBL,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|