@cuemath/leap 2.8.60-aa3 → 2.8.60-ag1
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 +9 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/alarm.js +41 -0
- package/dist/assets/line-icons/icons/alarm.js.map +1 -0
- package/dist/assets/line-icons/icons/bin2.js +7 -8
- package/dist/assets/line-icons/icons/bin2.js.map +1 -1
- package/dist/assets/line-icons/icons/dart.js +23 -0
- package/dist/assets/line-icons/icons/dart.js.map +1 -0
- package/dist/assets/line-icons/icons/exclamation.js +26 -0
- package/dist/assets/line-icons/icons/exclamation.js.map +1 -0
- package/dist/assets/line-icons/icons/home2.js +25 -0
- package/dist/assets/line-icons/icons/home2.js.map +1 -0
- package/dist/assets/line-icons/icons/important.js +23 -0
- package/dist/assets/line-icons/icons/important.js.map +1 -0
- package/dist/assets/line-icons/icons/puzzle.js +25 -0
- package/dist/assets/line-icons/icons/puzzle.js.map +1 -0
- package/dist/assets/line-icons/icons/recap.js +32 -0
- package/dist/assets/line-icons/icons/recap.js.map +1 -0
- package/dist/assets/line-icons/icons/skip-colored.js +43 -0
- package/dist/assets/line-icons/icons/skip-colored.js.map +1 -0
- package/dist/assets/line-icons/icons/status.js +41 -0
- package/dist/assets/line-icons/icons/status.js.map +1 -0
- package/dist/assets/line-icons/icons/testtube.js +33 -0
- package/dist/assets/line-icons/icons/testtube.js.map +1 -0
- package/dist/constants/api.js +3 -2
- package/dist/constants/api.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +98 -33
- 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 +76 -47
- 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 +65 -70
- package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions.js +18 -18
- 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 +10 -10
- 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-v2/api/chapter.js +10 -0
- package/dist/features/chapters-v2/api/chapter.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +112 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +26 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +69 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +90 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +97 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +52 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +103 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +13 -0
- package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +153 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +16 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card.js +12 -0
- package/dist/features/chapters-v2/comps/node-card/node-card.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +32 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +31 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +164 -0
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +184 -0
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -0
- package/dist/features/chapters-v2/comps/tag/tag-styled.js +13 -0
- package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/tag/tag.js +28 -0
- package/dist/features/chapters-v2/comps/tag/tag.js.map +1 -0
- package/dist/features/chapters-v2/constants/block-constants.js +20 -0
- package/dist/features/chapters-v2/constants/block-constants.js.map +1 -0
- package/dist/features/chapters-v2/constants/node-constants.js +15 -0
- package/dist/features/chapters-v2/constants/node-constants.js.map +1 -0
- package/dist/features/chapters-v2/utils/index.js +41 -0
- package/dist/features/chapters-v2/utils/index.js.map +1 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js +105 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -0
- package/dist/features/cue-canvas/cue-canvas-provider.js +8 -9
- package/dist/features/cue-canvas/cue-canvas-provider.js.map +1 -1
- package/dist/features/homework/card-menu-options.js +23 -0
- package/dist/features/homework/card-menu-options.js.map +1 -0
- package/dist/features/homework/homework-card.js +209 -0
- package/dist/features/homework/homework-card.js.map +1 -0
- package/dist/features/homework/styles.js +114 -0
- package/dist/features/homework/styles.js.map +1 -0
- 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/chapters-selection-step/chapters-selection-step-styled.js +12 -4
- 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 +128 -105
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
- package/dist/features/milestone/create/milestone-create.js +49 -43
- package/dist/features/milestone/create/milestone-create.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 +51 -53
- 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 +42 -40
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/goal-edit-container.js +64 -62
- package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/milestone-edit-container.js +54 -52
- package/dist/features/milestone/edit/milestone-edit-container.js.map +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 +9 -17
- 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.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +136 -104
- 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/goals/goal-action-ctas.js +107 -123
- 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 +157 -176
- 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 +24 -10
- 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 +76 -83
- 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 +10 -22
- 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-styled.js +70 -37
- 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 +114 -176
- 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-rank.js +29 -16
- 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 +19 -23
- 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 +23 -35
- 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 +96 -100
- 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 +114 -112
- 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 +165 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +25 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +82 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +16 -18
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
- package/dist/features/recent-chapters/api/get-recent-chapters.js +9 -0
- package/dist/features/recent-chapters/api/get-recent-chapters.js.map +1 -0
- package/dist/features/recent-chapters/recent-chapters-styled.js +16 -0
- package/dist/features/recent-chapters/recent-chapters-styled.js.map +1 -0
- package/dist/features/recent-chapters/recent-chapters.js +40 -0
- package/dist/features/recent-chapters/recent-chapters.js.map +1 -0
- package/dist/features/sheet-v2/resource-list/resource-list.js +49 -0
- package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -0
- package/dist/features/sheets/lessons-list/lesson-item/lesson-item-cta-info.js +41 -41
- package/dist/features/sheets/lessons-list/lesson-item/lesson-item-cta-info.js.map +1 -1
- package/dist/features/sheets/resources-list/resource-item/resource-item.js +20 -20
- package/dist/features/sheets/resources-list/resource-item/resource-item.js.map +1 -1
- 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/student-actions/student-actions.js +33 -33
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +4 -3
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.js +30 -30
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/sheets/utils/is-v3-worksheet.js +14 -9
- package/dist/features/sheets/utils/is-v3-worksheet.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +30 -29
- 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 +28 -14
- package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
- package/dist/features/ui/context-menu/context-menu.js +30 -15
- package/dist/features/ui/context-menu/context-menu.js.map +1 -1
- package/dist/features/ui/theme/button.js +22 -107
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/index.d.ts +223 -27
- package/dist/index.js +489 -470
- package/dist/index.js.map +1 -1
- package/dist/static/chapter-header-bg-2.c8d96894.svg +1 -0
- package/dist/static/node-custom-test-bg.d3b757be.svg +1 -0
- package/dist/static/node-learn-bg.b61f815c.svg +1 -0
- package/dist/static/node-practice-bg.16cbaf2a.svg +1 -0
- package/dist/static/node-project-bg.e6a33e28.svg +1 -0
- package/dist/static/node-puzzle-bg.3422135c.svg +1 -0
- package/dist/static/node-recap-bg.546154e4.svg +1 -0
- package/dist/static/node-test-prep-bg.42c0b9c4.svg +1 -0
- package/dist/static/node-video-bg.3df3f73a.svg +1 -0
- package/package.json +2 -4
- package/dist/assets/line-icons/icons/closed-eye.js +0 -23
- package/dist/assets/line-icons/icons/closed-eye.js.map +0 -1
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +0 -92
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +0 -1
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +0 -25
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +0 -13
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +0 -38
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +0 -53
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +0 -25
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +0 -71
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +0 -31
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +0 -38
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +0 -79
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +0 -18
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +0 -51
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +0 -11
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +0 -135
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +0 -1
- package/dist/library/polypad.js +0 -24965
- package/dist/library/polypad.js.map +0 -1
@@ -1,53 +1,118 @@
|
|
1
|
-
import e from "styled-components";
|
2
|
-
import
|
3
|
-
import
|
4
|
-
|
1
|
+
import e, { keyframes as l, css as d } from "styled-components";
|
2
|
+
import o from "../../../ui/layout/flex-view.js";
|
3
|
+
import h from "../../../ui/text/text.js";
|
4
|
+
const g = l`
|
5
|
+
0% {
|
6
|
+
transform: translate(100%, -100%) skewX(45deg);
|
7
|
+
opacity: 0;
|
8
|
+
}
|
9
|
+
|
10
|
+
100% {
|
11
|
+
transform: translate(-150%, 100%) skewX(45deg);
|
12
|
+
opacity: 1;
|
13
|
+
}
|
14
|
+
`, u = e(o)`
|
15
|
+
transition: scale 0.3s ease-in-out;
|
16
|
+
`, x = e(o)`
|
17
|
+
position: absolute;
|
18
|
+
width: 100%;
|
19
|
+
height: 100%;
|
20
|
+
border-radius: 50%;
|
21
|
+
overflow: hidden;
|
22
|
+
|
23
|
+
&::after {
|
24
|
+
content: '';
|
25
|
+
position: absolute;
|
26
|
+
top: 0;
|
27
|
+
right: 0;
|
28
|
+
z-index: 1;
|
29
|
+
width: 40%;
|
30
|
+
height: 150%;
|
31
|
+
background: linear-gradient(
|
32
|
+
to right,
|
33
|
+
rgba(255, 255, 255, 0.7) 0%,
|
34
|
+
rgba(255, 255, 255, 0.1) 35%,
|
35
|
+
rgba(255, 255, 255, 0.7) 40%,
|
36
|
+
rgba(255, 255, 255, 0.7) 80%,
|
37
|
+
rgba(255, 255, 255, 0) 100%
|
38
|
+
);
|
39
|
+
opacity: 0;
|
40
|
+
transform: translate(100%, -100%) skew(45deg);
|
41
|
+
pointer-events: none;
|
42
|
+
}
|
43
|
+
`, m = e.svg(({ theme: t }) => `
|
5
44
|
position: absolute;
|
6
45
|
z-index: ${t.zIndex.CHAPTER_PROGRESS_SVG};
|
7
46
|
inset: 50%;
|
8
|
-
transform: translate(-50%, -50%);
|
9
|
-
`)
|
10
|
-
|
11
|
-
|
12
|
-
const { GREY_2: n, BLACK: a } = t.colors, { gutter: s } = t.layout, i = s * 22.5, l = o ? i - r : r;
|
47
|
+
transform: translate(-50%, -50%) rotate(-90deg);
|
48
|
+
`), w = e.circle(
|
49
|
+
({ theme: t, $progressCircle: r, $progress: s }) => {
|
50
|
+
const { GREY_2: n, BLACK: p } = t.colors, { gutter: a } = t.layout, i = a * 18.625, c = r ? i - s : s;
|
13
51
|
return `
|
14
52
|
stroke-dasharray: ${i};
|
15
|
-
stroke-dashoffset: ${
|
16
|
-
stroke: ${
|
53
|
+
stroke-dashoffset: ${c};
|
54
|
+
stroke: ${r ? p : n};
|
17
55
|
|
18
|
-
stroke-width: ${
|
56
|
+
stroke-width: ${a * 0.125}px;
|
19
57
|
fill: none;
|
20
58
|
`;
|
21
59
|
}
|
22
|
-
)
|
23
|
-
const
|
24
|
-
|
60
|
+
), $ = e.img(({ theme: t }) => {
|
61
|
+
const { gutter: r } = t.layout;
|
62
|
+
return `
|
63
|
+
display: block;
|
64
|
+
width: ${r * 6}px;
|
65
|
+
height: ${r * 6}px;
|
66
|
+
border-radius: 50%;
|
67
|
+
`;
|
68
|
+
}), y = e.div(({ theme: t }) => {
|
69
|
+
const { layout: r } = t;
|
25
70
|
return `
|
26
|
-
|
27
|
-
|
28
|
-
|
71
|
+
position: absolute;
|
72
|
+
top: 5px;
|
73
|
+
right: 5px;
|
74
|
+
z-index: 2;
|
75
|
+
|
76
|
+
width: ${r.gutter * 1.25}px;
|
77
|
+
height: ${r.gutter * 1.25}px;
|
29
78
|
border-radius: 50%;
|
79
|
+
background: ${t.colors.WHITE_1};
|
80
|
+
outline: 1px solid ${t.colors.BLACK_1};
|
30
81
|
`;
|
31
|
-
}),
|
82
|
+
}), C = e(h)`
|
32
83
|
display: -webkit-box;
|
33
84
|
-webkit-box-orient: vertical;
|
34
85
|
-webkit-line-clamp: 2;
|
35
86
|
text-overflow: ellipsis;
|
36
87
|
overflow: hidden;
|
37
|
-
`,
|
38
|
-
|
39
|
-
|
40
|
-
}) =>
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
88
|
+
`, v = e(o)`
|
89
|
+
cursor: pointer;
|
90
|
+
position: relative;
|
91
|
+
box-shadow: inset 0px 0px 0px 0.5px ${({ theme: t }) => t.colors.BLACK_T_15};
|
92
|
+
aspect-ratio: 1;
|
93
|
+
|
94
|
+
&:hover {
|
95
|
+
background: ${({ theme: t, $bgColor: r }) => r ? t.colors[r] : "none"};
|
96
|
+
|
97
|
+
${u} {
|
98
|
+
scale: 1.05;
|
99
|
+
}
|
100
|
+
|
101
|
+
${x}::after {
|
102
|
+
${d`
|
103
|
+
animation: ${g} 1.2s ease-out forwards;
|
104
|
+
`}
|
105
|
+
}
|
106
|
+
}
|
107
|
+
`;
|
48
108
|
export {
|
49
|
-
|
50
|
-
|
51
|
-
|
109
|
+
$ as ChapterImage,
|
110
|
+
u as ChapterImageWrapper,
|
111
|
+
v as ChapterItemWrapper,
|
112
|
+
C as ChapterName,
|
113
|
+
m as ChapterProgressSVG,
|
114
|
+
w as ChapterProgressSVGCircle,
|
115
|
+
x as ChapterProgressWrapper,
|
116
|
+
y as StyledCheckIconWrapper
|
52
117
|
};
|
53
118
|
//# sourceMappingURL=chapter-item-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapter-item-styled.js","sources":["../../../../../src/features/chapters/chapters-list/chapter-item/chapter-item-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\nconst ChapterProgressSVG = styled.svg(({ theme }) => {\n return `\n position: absolute;\n z-index: ${theme.zIndex.CHAPTER_PROGRESS_SVG};\n inset: 50%;\n transform: translate(-50%, -50%);\n `;\n});\n\ninterface IChapterProgressSVGCircleProps {\n $progressCircle?: boolean;\n $progress: number;\n}\n\nconst ChapterProgressSVGCircle = styled.circle<IChapterProgressSVGCircleProps>(\n ({ theme, $progressCircle, $progress }) => {\n const { GREY_2, BLACK } = theme.colors;\n const { gutter } = theme.layout;\n\n const strokeDashArray = gutter *
|
1
|
+
{"version":3,"file":"chapter-item-styled.js","sources":["../../../../../src/features/chapters/chapters-list/chapter-item/chapter-item-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../../../ui/types';\n\nimport styled, { css, keyframes } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\nconst shimmerEffect = keyframes`\n 0% {\n transform: translate(100%, -100%) skewX(45deg);\n opacity: 0;\n }\n\n 100% {\n transform: translate(-150%, 100%) skewX(45deg);\n opacity: 1;\n }\n`;\n\nconst ChapterImageWrapper = styled(FlexView)`\n transition: scale 0.3s ease-in-out;\n`;\n\nconst ChapterProgressWrapper = styled(FlexView)`\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n overflow: hidden;\n\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n width: 40%;\n height: 150%;\n background: linear-gradient(\n to right,\n rgba(255, 255, 255, 0.7) 0%,\n rgba(255, 255, 255, 0.1) 35%,\n rgba(255, 255, 255, 0.7) 40%,\n rgba(255, 255, 255, 0.7) 80%,\n rgba(255, 255, 255, 0) 100%\n );\n opacity: 0;\n transform: translate(100%, -100%) skew(45deg);\n pointer-events: none;\n }\n`;\n\nconst ChapterProgressSVG = styled.svg(({ theme }) => {\n return `\n position: absolute;\n z-index: ${theme.zIndex.CHAPTER_PROGRESS_SVG};\n inset: 50%;\n transform: translate(-50%, -50%) rotate(-90deg);\n `;\n});\n\ninterface IChapterProgressSVGCircleProps {\n $progressCircle?: boolean;\n $progress: number;\n}\n\nconst ChapterProgressSVGCircle = styled.circle<IChapterProgressSVGCircleProps>(\n ({ theme, $progressCircle, $progress }) => {\n const { GREY_2, BLACK } = theme.colors;\n const { gutter } = theme.layout;\n\n const strokeDashArray = gutter * 18.625;\n const strokeDashOffset = $progressCircle ? strokeDashArray - $progress : $progress;\n\n return `\n stroke-dasharray: ${strokeDashArray};\n stroke-dashoffset: ${strokeDashOffset};\n stroke: ${$progressCircle ? BLACK : GREY_2};\n\n stroke-width: ${gutter * 0.125}px;\n fill: none;\n `;\n },\n);\n\nconst ChapterImage = styled.img(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n display: block;\n width: ${gutter * 6}px;\n height: ${gutter * 6}px;\n border-radius: 50%;\n `;\n});\n\nconst StyledCheckIconWrapper = styled.div(({ theme }) => {\n const { layout } = theme;\n\n return `\n position: absolute;\n top: 5px;\n right: 5px;\n z-index: 2;\n\n width: ${layout.gutter * 1.25}px;\n height: ${layout.gutter * 1.25}px;\n border-radius: 50%;\n background: ${theme.colors.WHITE_1};\n outline: 1px solid ${theme.colors.BLACK_1};\n `;\n});\n\nconst ChapterName = styled(Text)`\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n`;\n\ninterface IChapterItemWrapperProps {\n $bgColor?: TColorNames;\n}\n\nconst ChapterItemWrapper = styled(FlexView)<IChapterItemWrapperProps>`\n cursor: pointer;\n position: relative;\n box-shadow: inset 0px 0px 0px 0.5px ${({ theme }) => theme.colors.BLACK_T_15};\n aspect-ratio: 1;\n\n &:hover {\n background: ${({ theme, $bgColor }) => ($bgColor ? theme.colors[$bgColor] : 'none')};\n\n ${ChapterImageWrapper} {\n scale: 1.05;\n }\n\n ${ChapterProgressWrapper}::after {\n ${css`\n animation: ${shimmerEffect} 1.2s ease-out forwards;\n `}\n }\n }\n`;\n\nexport {\n ChapterImageWrapper,\n ChapterProgressWrapper,\n ChapterImage,\n ChapterItemWrapper,\n ChapterName,\n ChapterProgressSVG,\n ChapterProgressSVGCircle,\n StyledCheckIconWrapper,\n};\n"],"names":["shimmerEffect","keyframes","ChapterImageWrapper","styled","FlexView","ChapterProgressWrapper","ChapterProgressSVG","theme","ChapterProgressSVGCircle","$progressCircle","$progress","GREY_2","BLACK","gutter","strokeDashArray","strokeDashOffset","ChapterImage","StyledCheckIconWrapper","layout","ChapterName","Text","ChapterItemWrapper","$bgColor","css"],"mappings":";;;AAOA,MAAMA,IAAgBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAYhBC,IAAsBC,EAAOC,CAAQ;AAAA;AAAA,GAIrCC,IAAyBF,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GA6BxCE,IAAqBH,EAAO,IAAI,CAAC,EAAE,OAAAI,QAChC;AAAA;AAAA,eAEMA,EAAM,OAAO,oBAAoB;AAAA;AAAA;AAAA,GAI/C,GAOK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ACpBkB;AAAA,qBACavB,CAAa;AAAA,OAC3B;AAAA;AAAA;AAAA;"}
|
@@ -1,58 +1,87 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as C, useState as x, useRef as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
2
|
+
import { memo as C, useState as x, useRef as I, useCallback as w, useLayoutEffect as T } from "react";
|
3
|
+
import y from "../../../../assets/line-icons/icons/check2.js";
|
4
|
+
import _ from "../../../ui/arrow-tooltip/arrow-tooltip.js";
|
5
|
+
import S from "../../../ui/layout/flex-view.js";
|
6
|
+
import { ChapterItemWrapper as b, ChapterImageWrapper as k, ChapterProgressWrapper as P, ChapterProgressSVG as W, ChapterProgressSVGCircle as l, ChapterImage as j, StyledCheckIconWrapper as A, ChapterName as H } from "./chapter-item-styled.js";
|
7
|
+
const R = C(
|
8
|
+
({ milestoneId: r, chapter: o, onChapterClick: a, itemIndex: p }) => {
|
9
|
+
const {
|
10
|
+
name: n,
|
11
|
+
image_url: h,
|
12
|
+
progress_stat: m,
|
13
|
+
image_hue: g
|
14
|
+
} = o, { completed: c = 0, total: d = 0 } = m || {}, [$, u] = x(!1), t = I(null), s = c > 0 ? Math.floor((c / d || 1) * 100) : 0, f = w(() => {
|
15
|
+
a(o, r);
|
16
|
+
}, [o, r, a]);
|
17
|
+
return T(() => {
|
18
|
+
t.current && t.current.scrollHeight > t.current.clientHeight && u(!0);
|
19
|
+
}, [t]), /* @__PURE__ */ i(
|
20
|
+
b,
|
17
21
|
{
|
18
|
-
|
19
|
-
$
|
20
|
-
$
|
21
|
-
$
|
22
|
-
$
|
23
|
-
$
|
24
|
-
onClick:
|
25
|
-
id: `milestone-chapter-${t}-${i}`,
|
22
|
+
id: `milestone-chapter-${r || ""}-${p}`,
|
23
|
+
$alignItems: "center",
|
24
|
+
$gapX: 1,
|
25
|
+
$gutterX: 1,
|
26
|
+
$flexGap: 8,
|
27
|
+
$background: "WHITE_1",
|
28
|
+
onClick: f,
|
26
29
|
className: "goal-widget-chapter-item",
|
30
|
+
$bgColor: `${g}_1`,
|
27
31
|
children: [
|
28
|
-
/* @__PURE__ */
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
32
|
+
/* @__PURE__ */ i(
|
33
|
+
k,
|
34
|
+
{
|
35
|
+
$width: "fit-content",
|
36
|
+
$position: "relative",
|
37
|
+
$justifyContent: "center",
|
38
|
+
$alignItems: "center",
|
39
|
+
children: [
|
40
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ i(W, { width: "96px", height: "96px", children: [
|
41
|
+
/* @__PURE__ */ e(l, { $progress: 0, r: "47", cx: "48", cy: "48" }),
|
42
|
+
/* @__PURE__ */ e(
|
43
|
+
l,
|
44
|
+
{
|
45
|
+
$progressCircle: !0,
|
46
|
+
$progress: s * 2.98,
|
47
|
+
r: "47",
|
48
|
+
cx: "48",
|
49
|
+
cy: "48"
|
50
|
+
}
|
51
|
+
)
|
52
|
+
] }) }),
|
53
|
+
/* @__PURE__ */ e(j, { src: h, alt: "Chapter Image" }),
|
54
|
+
s === 100 && /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(y, { width: 20, height: 20 }) })
|
55
|
+
]
|
56
|
+
}
|
57
|
+
),
|
58
|
+
/* @__PURE__ */ e(S, { $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ e(
|
59
|
+
_,
|
60
|
+
{
|
61
|
+
renderAs: "primary",
|
62
|
+
position: "bottom",
|
63
|
+
tooltipItem: n,
|
64
|
+
hidden: !$,
|
65
|
+
widthX: 21.75,
|
66
|
+
zIndex: 5,
|
67
|
+
children: /* @__PURE__ */ e(
|
68
|
+
H,
|
69
|
+
{
|
70
|
+
ref: t,
|
71
|
+
$renderAs: "ab2",
|
72
|
+
$color: "BLACK_T_87",
|
73
|
+
$align: "center",
|
74
|
+
children: n
|
75
|
+
}
|
76
|
+
)
|
77
|
+
}
|
78
|
+
) })
|
50
79
|
]
|
51
80
|
}
|
52
81
|
);
|
53
82
|
}
|
54
83
|
);
|
55
84
|
export {
|
56
|
-
|
85
|
+
R as default
|
57
86
|
};
|
58
87
|
//# sourceMappingURL=chapter-item.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapter-item.js","sources":["../../../../../src/features/chapters/chapters-list/chapter-item/chapter-item.tsx"],"sourcesContent":["import type { IChapterItemProps } from './chapter-item-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useLayoutEffect, useRef, useState, memo } from 'react';\
|
1
|
+
{"version":3,"file":"chapter-item.js","sources":["../../../../../src/features/chapters/chapters-list/chapter-item/chapter-item.tsx"],"sourcesContent":["import type { IChapterItemProps } from './chapter-item-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useLayoutEffect, useRef, useState, memo } from 'react';\n\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../ui/layout/flex-view';\nimport * as Styled from './chapter-item-styled';\n\nconst ChapterItem: FC<IChapterItemProps> = memo(\n ({ milestoneId, chapter, onChapterClick, itemIndex }) => {\n const {\n name,\n image_url: imageUrl,\n progress_stat: chapterProgressStat,\n image_hue: imageHue,\n } = chapter;\n const { completed = 0, total = 0 } = chapterProgressStat || {};\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n\n const completionPercentage = completed > 0 ? Math.floor((completed / total || 1) * 100) : 0;\n\n const handleOnChapterClick = useCallback(() => {\n onChapterClick(chapter, milestoneId);\n }, [chapter, milestoneId, onChapterClick]);\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, [titleTextRef]);\n\n return (\n <Styled.ChapterItemWrapper\n id={`milestone-chapter-${milestoneId || ''}-${itemIndex}`}\n $alignItems=\"center\"\n $gapX={1}\n $gutterX={1}\n $flexGap={8}\n $background=\"WHITE_1\"\n onClick={handleOnChapterClick}\n className=\"goal-widget-chapter-item\"\n $bgColor={`${imageHue}_1`}\n >\n <Styled.ChapterImageWrapper\n $width=\"fit-content\"\n $position=\"relative\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <Styled.ChapterProgressWrapper>\n <Styled.ChapterProgressSVG width=\"96px\" height=\"96px\">\n <Styled.ChapterProgressSVGCircle $progress={0} r=\"47\" cx=\"48\" cy=\"48\" />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progress={completionPercentage * 2.98}\n r=\"47\"\n cx=\"48\"\n cy=\"48\"\n />\n </Styled.ChapterProgressSVG>\n </Styled.ChapterProgressWrapper>\n\n <Styled.ChapterImage src={imageUrl} alt=\"Chapter Image\" />\n\n {completionPercentage === 100 && (\n <Styled.StyledCheckIconWrapper>\n <Check2Icon width={20} height={20} />\n </Styled.StyledCheckIconWrapper>\n )}\n </Styled.ChapterImageWrapper>\n\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={name}\n hidden={!showTitleTooltip}\n widthX={21.75}\n zIndex={5}\n >\n <Styled.ChapterName\n ref={titleTextRef}\n $renderAs=\"ab2\"\n $color=\"BLACK_T_87\"\n $align=\"center\"\n >\n {name}\n </Styled.ChapterName>\n </ArrowTooltip>\n </FlexView>\n </Styled.ChapterItemWrapper>\n );\n },\n);\n\nexport default ChapterItem;\n"],"names":["ChapterItem","memo","milestoneId","chapter","onChapterClick","itemIndex","name","imageUrl","chapterProgressStat","imageHue","completed","total","showTitleTooltip","setShowTitleTooltip","useState","titleTextRef","useRef","completionPercentage","handleOnChapterClick","useCallback","useLayoutEffect","jsxs","Styled.ChapterItemWrapper","Styled.ChapterImageWrapper","jsx","Styled.ChapterProgressWrapper","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Styled.ChapterImage","Styled.StyledCheckIconWrapper","Check2Icon","FlexView","ArrowTooltip","Styled.ChapterName"],"mappings":";;;;;;AAUA,MAAMA,IAAqCC;AAAA,EACzC,CAAC,EAAE,aAAAC,GAAa,SAAAC,GAAS,gBAAAC,GAAgB,WAAAC,QAAgB;AACjD,UAAA;AAAA,MACJ,MAAAC;AAAA,MACA,WAAWC;AAAA,MACX,eAAeC;AAAA,MACf,WAAWC;AAAA,IACT,IAAAN,GACE,EAAE,WAAAO,IAAY,GAAG,OAAAC,IAAQ,EAAE,IAAIH,KAAuB,IACtD,CAACI,GAAkBC,CAAmB,IAAIC,EAAS,EAAK,GACxDC,IAAeC,EAAuB,IAAI,GAE1CC,IAAuBP,IAAY,IAAI,KAAK,OAAOA,IAAYC,KAAS,KAAK,GAAG,IAAI,GAEpFO,IAAuBC,EAAY,MAAM;AAC7C,MAAAf,EAAeD,GAASD,CAAW;AAAA,IAClC,GAAA,CAACC,GAASD,GAAaE,CAAc,CAAC;AAEzC,WAAAgB,EAAgB,MAAM;AACpB,MACEL,EAAa,WACbA,EAAa,QAAQ,eAAeA,EAAa,QAAQ,gBAEzDF,EAAoB,EAAI;AAAA,IAC1B,GACC,CAACE,CAAY,CAAC,GAGf,gBAAAM;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,IAAI,qBAAqBpB,KAAe,EAAE,IAAIG,CAAS;AAAA,QACvD,aAAY;AAAA,QACZ,OAAO;AAAA,QACP,UAAU;AAAA,QACV,UAAU;AAAA,QACV,aAAY;AAAA,QACZ,SAASa;AAAA,QACT,WAAU;AAAA,QACV,UA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;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
@@ -1,14 +1,15 @@
|
|
1
1
|
import r from "styled-components";
|
2
2
|
import { MILESTONE_WIDGET_MIN_HEIGHT as o } from "../../milestone/constants.js";
|
3
|
-
import
|
4
|
-
const s = r(
|
3
|
+
import i from "../../ui/layout/flex-view.js";
|
4
|
+
const s = r(i)`
|
5
5
|
position: relative;
|
6
6
|
min-height: ${o}px;
|
7
7
|
`, n = r.div`
|
8
8
|
display: grid;
|
9
|
-
grid-template-columns: repeat(
|
9
|
+
grid-template-columns: repeat(4, 1fr);
|
10
10
|
align-content: start;
|
11
|
-
|
11
|
+
`;
|
12
|
+
r.div(({ theme: t }) => `
|
12
13
|
position: absolute;
|
13
14
|
bottom: ${t.layout.gutter}px;
|
14
15
|
right: ${t.layout.gutter}px;
|
@@ -16,7 +17,6 @@ const s = r(p)`
|
|
16
17
|
border-radius: 50%;
|
17
18
|
`);
|
18
19
|
export {
|
19
|
-
d as AddChapterIconWrapper,
|
20
20
|
s as ChaptersListContainer,
|
21
21
|
n as ChaptersWrapper
|
22
22
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapters-list-styled.js","sources":["../../../../src/features/chapters/chapters-list/chapters-list-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { MILESTONE_WIDGET_MIN_HEIGHT } from '../../milestone/constants';\nimport FlexView from '../../ui/layout/flex-view';\n\nconst ChaptersListContainer = styled(FlexView)`\n position: relative;\n min-height: ${MILESTONE_WIDGET_MIN_HEIGHT}px;\n`;\n\nconst ChaptersWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(
|
1
|
+
{"version":3,"file":"chapters-list-styled.js","sources":["../../../../src/features/chapters/chapters-list/chapters-list-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { MILESTONE_WIDGET_MIN_HEIGHT } from '../../milestone/constants';\nimport FlexView from '../../ui/layout/flex-view';\n\nconst ChaptersListContainer = styled(FlexView)`\n position: relative;\n min-height: ${MILESTONE_WIDGET_MIN_HEIGHT}px;\n`;\n\nconst ChaptersWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n align-content: start;\n`;\n\nconst AddChapterIconWrapper = styled.div(({ theme }) => {\n return `\n position: absolute;\n bottom: ${theme.layout.gutter}px;\n right: ${theme.layout.gutter}px;\n box-shadow: 0px 10px 20px 0px ${theme.colors.BLACK_T_20};\n border-radius: 50%;\n `;\n});\n\nexport { ChaptersListContainer, ChaptersWrapper, AddChapterIconWrapper };\n"],"names":["ChaptersListContainer","styled","FlexView","MILESTONE_WIDGET_MIN_HEIGHT","ChaptersWrapper","theme"],"mappings":";;;AAKM,MAAAA,IAAwBC,EAAOC,CAAQ;AAAA;AAAA,gBAE7BC,CAA2B;AAAA,GAGrCC,IAAkBH,EAAO;AAAA;AAAA;AAAA;AAAA;AAMDA,EAAO,IAAI,CAAC,EAAE,OAAAI,QACnC;AAAA;AAAA,cAEKA,EAAM,OAAO,MAAM;AAAA,aACpBA,EAAM,OAAO,MAAM;AAAA,oCACIA,EAAM,OAAO,UAAU;AAAA;AAAA,GAG1D;"}
|
@@ -1,84 +1,79 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as
|
1
|
+
import { jsxs as m, jsx as r, Fragment as A } from "react/jsx-runtime";
|
2
|
+
import { memo as T, useCallback as b } from "react";
|
3
3
|
import { IMAGES as g } from "../../../assets/images/images.js";
|
4
|
-
import k from "
|
5
|
-
import x from "../../ui/
|
6
|
-
import E from "../../ui/buttons/button/button.js";
|
7
|
-
import I from "../../ui/buttons/icon-button/icon-button.js";
|
4
|
+
import k from "../../ui/arrow-tooltip/arrow-tooltip.js";
|
5
|
+
import x from "../../ui/buttons/button/button.js";
|
8
6
|
import { useUIContext as $ } from "../../ui/context/context.js";
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import { ChaptersListContainer as
|
13
|
-
const
|
14
|
-
({ milestoneId: t, canUpdatePlan:
|
15
|
-
const { isGoalCreation:
|
16
|
-
|
7
|
+
import l from "../../ui/separator/separator.js";
|
8
|
+
import y from "../../ui/text/text.js";
|
9
|
+
import E from "./chapter-item/chapter-item.js";
|
10
|
+
import { ChaptersListContainer as c, ChaptersWrapper as X } from "./chapters-list-styled.js";
|
11
|
+
const I = T(
|
12
|
+
({ milestoneId: t, canUpdatePlan: d, chapters: o, ...h }) => {
|
13
|
+
const { isGoalCreation: i, userType: a, onChapterClick: C, onAddChapter: e, isMilestoneActive: n } = h, { onClick: s } = $(), f = b(() => {
|
14
|
+
s({
|
17
15
|
label: "add_chapter_icon",
|
18
16
|
props: {
|
19
17
|
milestone_id: t
|
20
18
|
}
|
21
|
-
}), e == null || e({ milestoneId: t, isGoalCreation:
|
22
|
-
}, [t,
|
23
|
-
return
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
X,
|
28
|
-
{
|
29
|
-
milestoneId: t,
|
30
|
-
userType: o,
|
31
|
-
chapter: l,
|
32
|
-
onChapterClick: f,
|
33
|
-
itemIndex: u
|
34
|
-
},
|
35
|
-
_
|
36
|
-
);
|
37
|
-
}) }),
|
38
|
-
A && /* @__PURE__ */ r(S, { children: /* @__PURE__ */ r(
|
39
|
-
I,
|
19
|
+
}), e == null || e({ milestoneId: t, isGoalCreation: i });
|
20
|
+
}, [t, i, e, s]);
|
21
|
+
return o.length ? /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(X, { children: o.map((p, u) => {
|
22
|
+
const { id: _ } = p;
|
23
|
+
return /* @__PURE__ */ r(
|
24
|
+
E,
|
40
25
|
{
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
}
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
26
|
+
milestoneId: t,
|
27
|
+
userType: a,
|
28
|
+
chapter: p,
|
29
|
+
onChapterClick: C,
|
30
|
+
itemIndex: u
|
31
|
+
},
|
32
|
+
_
|
33
|
+
);
|
34
|
+
}) }) }) : /* @__PURE__ */ m(
|
35
|
+
c,
|
36
|
+
{
|
37
|
+
$gapX: 6.75,
|
38
|
+
$alignItems: "center",
|
39
|
+
$justifyContent: "center",
|
40
|
+
$background: "WHITE",
|
41
|
+
children: [
|
42
|
+
/* @__PURE__ */ r("img", { src: g.EMPTY_MIX_TESTS, alt: "empty_mix_tests" }),
|
43
|
+
/* @__PURE__ */ r(l, { heightX: 2 }),
|
44
|
+
a === "TEACHER" ? /* @__PURE__ */ m(A, { children: [
|
45
|
+
/* @__PURE__ */ r(
|
46
|
+
k,
|
61
47
|
{
|
62
|
-
widthX: 10,
|
63
48
|
renderAs: "primary",
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
49
|
+
position: "bottom",
|
50
|
+
hidden: n,
|
51
|
+
tooltipItem: "Plan is completed",
|
52
|
+
children: /* @__PURE__ */ r(
|
53
|
+
x,
|
54
|
+
{
|
55
|
+
widthX: 10,
|
56
|
+
renderAs: "primary",
|
57
|
+
shape: "square",
|
58
|
+
size: "small",
|
59
|
+
label: "Add chapter",
|
60
|
+
onClick: f,
|
61
|
+
disabled: !n || !d,
|
62
|
+
analyticsProps: {
|
63
|
+
milestone_id: t
|
64
|
+
}
|
65
|
+
}
|
66
|
+
)
|
72
67
|
}
|
73
|
-
)
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
68
|
+
),
|
69
|
+
/* @__PURE__ */ r(l, { heightX: 2 })
|
70
|
+
] }) : /* @__PURE__ */ r(y, { $renderAs: "ab2-bold", $color: "BLACK_T_87", children: "Wait for the teacher to add a chapter" })
|
71
|
+
]
|
72
|
+
}
|
73
|
+
);
|
79
74
|
}
|
80
|
-
),
|
75
|
+
), O = I;
|
81
76
|
export {
|
82
|
-
|
77
|
+
O as default
|
83
78
|
};
|
84
79
|
//# sourceMappingURL=chapters-list.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapters-list.js","sources":["../../../../src/features/chapters/chapters-list/chapters-list.tsx"],"sourcesContent":["import type { IChaptersListProps } from './chapters-list-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback } from 'react';\n\nimport { IMAGES } from '../../../assets/images/images';\nimport
|
1
|
+
{"version":3,"file":"chapters-list.js","sources":["../../../../src/features/chapters/chapters-list/chapters-list.tsx"],"sourcesContent":["import type { IChaptersListProps } from './chapters-list-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback } 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 { useUIContext } from '../../ui/context/context';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport ChapterItem from './chapter-item/chapter-item';\nimport * as Styled from './chapters-list-styled';\n\nconst ChaptersList: FC<IChaptersListProps> = memo(\n ({ milestoneId, canUpdatePlan, chapters, ...restChaptersList }) => {\n const { isGoalCreation, userType, onChapterClick, onAddChapter, isMilestoneActive } =\n restChaptersList;\n\n const { onClick: trackOnClick } = useUIContext();\n\n const handleOnAddChapter = useCallback(() => {\n trackOnClick({\n label: 'add_chapter_icon',\n props: {\n milestone_id: milestoneId,\n },\n });\n onAddChapter?.({ milestoneId, isGoalCreation });\n }, [milestoneId, isGoalCreation, onAddChapter, trackOnClick]);\n\n if (!chapters.length) {\n return (\n <Styled.ChaptersListContainer\n $gapX={6.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\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={isMilestoneActive}\n tooltipItem=\"Plan is completed\"\n >\n <Button\n widthX={10}\n renderAs=\"primary\"\n shape=\"square\"\n size=\"small\"\n label=\"Add chapter\"\n onClick={handleOnAddChapter}\n disabled={!isMilestoneActive || !canUpdatePlan}\n analyticsProps={{\n milestone_id: milestoneId,\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 add a chapter\n </Text>\n )}\n </Styled.ChaptersListContainer>\n );\n }\n\n return (\n <Styled.ChaptersListContainer>\n <Styled.ChaptersWrapper>\n {chapters.map((chapter, idx) => {\n const { id } = chapter;\n\n return (\n <ChapterItem\n key={id}\n milestoneId={milestoneId}\n userType={userType}\n chapter={chapter}\n onChapterClick={onChapterClick}\n itemIndex={idx}\n />\n );\n })}\n </Styled.ChaptersWrapper>\n </Styled.ChaptersListContainer>\n );\n },\n);\n\nexport default ChaptersList;\n"],"names":["ChaptersList","memo","milestoneId","canUpdatePlan","chapters","restChaptersList","isGoalCreation","userType","onChapterClick","onAddChapter","isMilestoneActive","trackOnClick","useUIContext","handleOnAddChapter","useCallback","jsx","Styled.ChaptersListContainer","Styled.ChaptersWrapper","chapter","idx","id","ChapterItem","jsxs","IMAGES","Separator","Fragment","ArrowTooltip","Button","Text","ChaptersList$1"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAAuCC;AAAA,EAC3C,CAAC,EAAE,aAAAC,GAAa,eAAAC,GAAe,UAAAC,GAAU,GAAGC,QAAuB;AACjE,UAAM,EAAE,gBAAAC,GAAgB,UAAAC,GAAU,gBAAAC,GAAgB,cAAAC,GAAc,mBAAAC,EAC9D,IAAAL,GAEI,EAAE,SAASM,EAAa,IAAIC,EAAa,GAEzCC,IAAqBC,EAAY,MAAM;AAC9B,MAAAH,EAAA;AAAA,QACX,OAAO;AAAA,QACP,OAAO;AAAA,UACL,cAAcT;AAAA,QAChB;AAAA,MAAA,CACD,GACcO,KAAA,QAAAA,EAAA,E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