@cuemath/leap 2.9.9 → 2.9.11-as1
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/bin2.js +7 -8
- 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/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/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/lottie/lottie.js +9 -1
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/constants/api.js +3 -2
- package/dist/constants/api.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +3 -3
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +13 -11
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +99 -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 +92 -49
- 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 +64 -70
- package/dist/features/chapters/chapters-list/chapters-list.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 +35 -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 +83 -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 +98 -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 +51 -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 +129 -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 +159 -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-option.js +30 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.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 +9 -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 +189 -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 +194 -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 +14 -0
- package/dist/features/chapters-v2/constants/node-constants.js.map +1 -0
- package/dist/features/chapters-v2/utils/index.js +45 -0
- package/dist/features/chapters-v2/utils/index.js.map +1 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js +169 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -0
- package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js +4 -4
- package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js.map +1 -1
- package/dist/features/circle-games/sign-up/constants.js +7 -7
- package/dist/features/circle-games/sign-up/constants.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +12 -6
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/homework/card-menu-option.js +28 -0
- package/dist/features/homework/card-menu-option.js.map +1 -0
- package/dist/features/homework/card-menu-options.js +22 -0
- package/dist/features/homework/card-menu-options.js.map +1 -0
- package/dist/features/homework/card-title.js +16 -0
- package/dist/features/homework/card-title.js.map +1 -0
- package/dist/features/homework/homework-analytics-events.js +10 -0
- package/dist/features/homework/homework-analytics-events.js.map +1 -0
- package/dist/features/homework/homework-card-view.js +143 -0
- package/dist/features/homework/homework-card-view.js.map +1 -0
- package/dist/features/homework/homework-card.js +245 -0
- package/dist/features/homework/homework-card.js.map +1 -0
- package/dist/features/homework/hw-card-list/api/get-homeworks.js +10 -0
- package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -0
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js +63 -0
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +1 -0
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +157 -0
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -0
- package/dist/features/homework/hw-card-list/hw-card-list.js +67 -0
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -0
- package/dist/features/homework/node-progress.js +29 -0
- package/dist/features/homework/node-progress.js.map +1 -0
- package/dist/features/homework/styles.js +130 -0
- package/dist/features/homework/styles.js.map +1 -0
- package/dist/features/homework/utils.js +48 -0
- package/dist/features/homework/utils.js.map +1 -0
- 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/hooks/use-chapter-journey.js +173 -0
- package/dist/features/journey/hooks/use-chapter-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js +268 -0
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/recent-chapters-mock.js +513 -0
- package/dist/features/journey/hooks/use-home-page-journey/recent-chapters-mock.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/styles.js +23 -0
- package/dist/features/journey/hooks/use-home-page-journey/styles.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +22 -0
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/use-home-page-journey.js +270 -0
- package/dist/features/journey/hooks/use-home-page-journey/use-home-page-journey.js.map +1 -0
- package/dist/features/journey/journey-id/journey-id-student.js +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-teacher.js +5 -0
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -0
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +584 -0
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -0
- package/dist/features/journey/use-journey/journey-context-provider.js +36 -28
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +10 -5
- 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 +42 -49
- 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 +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/comps/sheets-list/sheets-list-styled.js +14 -20
- 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 +26 -50
- package/dist/features/milestone/create/comps/sheets-list/sheets-list.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/create/utils/index.js +33 -38
- 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 +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/goal-edit-helpers.js +50 -53
- package/dist/features/milestone/edit/goal-edit-helpers.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 +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 +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 +138 -105
- 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 +80 -86
- 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 +17 -25
- 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 +110 -113
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +8 -8
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.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 +116 -113
- 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 +87 -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/api/test-sheet-assign.js +5 -5
- package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +46 -50
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/constants.js +10 -9
- package/dist/features/post-game-stats/digital-meter/constants.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter.js +88 -86
- package/dist/features/post-game-stats/digital-meter/digital-meter.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/helper.js +3 -13
- package/dist/features/post-game-stats/digital-meter/helper.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 +39 -0
- package/dist/features/recent-chapters/recent-chapters.js.map +1 -0
- package/dist/features/sheet-v2/resource-list/resource-list.js +45 -0
- package/dist/features/sheet-v2/resource-list/resource-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 +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/trial-session/comps/learning-plan/index.js.map +1 -1
- package/dist/features/ui/animated-arc/animated-arc-constants.js +5 -0
- package/dist/features/ui/animated-arc/animated-arc-constants.js.map +1 -0
- package/dist/features/ui/animated-arc/animated-arc-helpers.js +14 -0
- package/dist/features/ui/animated-arc/animated-arc-helpers.js.map +1 -0
- package/dist/features/ui/animated-arc/animated-arc-styled.js +33 -0
- package/dist/features/ui/animated-arc/animated-arc-styled.js.map +1 -0
- package/dist/features/ui/animated-arc/animated-arc.js +49 -0
- package/dist/features/ui/animated-arc/animated-arc.js.map +1 -0
- package/dist/features/ui/animated-arc/constants.js +5 -0
- package/dist/features/ui/animated-arc/constants.js.map +1 -0
- 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 +37 -19
- package/dist/features/ui/context-menu/context-menu.js.map +1 -1
- package/dist/features/ui/image/image.js +12 -12
- package/dist/features/ui/image/image.js.map +1 -1
- package/dist/features/ui/inputs/base-input/base-input-styled.js +77 -67
- package/dist/features/ui/inputs/base-input/base-input-styled.js.map +1 -1
- package/dist/features/ui/inputs/base-input/base-input.js +49 -47
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input.js +14 -12
- package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +48 -31
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/text/text.js +29 -27
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/button.js +41 -7
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/features/ui/theme/input.js +67 -14
- package/dist/features/ui/theme/input.js.map +1 -1
- package/dist/index.d.ts +371 -35
- package/dist/index.js +449 -423
- package/dist/index.js.map +1 -1
- package/dist/node_modules/date-fns/differenceInDays.js +17 -0
- package/dist/node_modules/date-fns/differenceInDays.js.map +1 -0
- package/dist/static/chapter-header-bg-2.c8d96894.svg +1 -0
- package/dist/static/competitive-arena.b9c40801.json +1 -0
- package/dist/static/learn.71b13323.json +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/dist/static/practice.158dd488.json +1 -0
- package/dist/static/project.eb665827.json +1 -0
- package/dist/static/puzzle.b298c7e4.json +1 -0
- package/dist/static/recap.0dd2c1e2.json +1 -0
- package/dist/static/test.803d6036.json +1 -0
- package/dist/static/video.b41451e2.json +1 -0
- package/package.json +1 -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/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc-styled.js +0 -17
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc-styled.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc.js +0 -50
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/constants.js +0 -6
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/constants.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/features/trial-session/comps/learning-plan/index.tsx"],"sourcesContent":["import type { IChapterDataProps } from '../../../chapters/chapter/chapter-types';\n\nimport throttle from 'lodash.throttle';\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport { useGetChapterData } from '../../../chapters/api/chapter';\nimport Chapter from '../../../chapters/chapter/chapter';\nimport MilestoneList from '../../../milestone/milestone-list-container/milestone-list-container';\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Text from '../../../ui/text/text';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport * as Styled from './learning-plan-styled';\nimport { useLearningPlanScrollSync } from './use-learning-plan-scroll-sync';\n\nconst LearningPlan: React.FC = () => {\n const { trialHomeData, studentId, teacherId, formData, isTeacher, updateSlideConfig } =\n useTrialSessionContext();\n const {\n demo_info: { student_classroom_id: studentClassroomId, stream },\n } = trialHomeData || {};\n const { name = '', chapterId } = formData || {};\n\n const containerRef = useRef<HTMLDivElement>(null);\n const scrollPointsRef = useRef<number[]>([]);\n const isSendingScrollPointsRef = useRef(false);\n\n const {\n publishScrollEvents,\n closeChannel,\n scrollPoints: receivedScrollPoints,\n } = useLearningPlanScrollSync(studentClassroomId);\n\n const {\n get: getChapterData,\n data: chapterData,\n isProcessing,\n isProcessingFailed,\n error,\n } = useGetChapterData();\n\n const fetchChapter = useCallback(() => {\n if (chapterId && studentId) {\n getChapterData(chapterId, undefined, {\n studentId,\n }).then(() => {\n const scrollElement = containerRef.current;\n\n scrollElement?.scrollTo({\n top: 0,\n behavior: 'smooth',\n });\n });\n }\n }, [getChapterData, studentId, chapterId]);\n\n const handleOnChapterClick = useCallback(\n (chapter: IChapterDataProps) => {\n updateSlideConfig({\n chapterId: chapter.id,\n });\n },\n [updateSlideConfig],\n );\n\n const handleOnBackIconClick = useCallback(() => {\n updateSlideConfig({\n chapterId: undefined,\n });\n }, [updateSlideConfig]);\n\n const sendScrollPoints = useCallback(() => {\n if (scrollPointsRef.current.length === 0 || isSendingScrollPointsRef.current) return;\n\n isSendingScrollPointsRef.current = true;\n\n if (publishScrollEvents) {\n publishScrollEvents({\n eventName: 'TRIAL_SESSION_GOAL_PLAN_SCROLL',\n eventPayload: {\n scrollPoints: scrollPointsRef.current,\n },\n });\n }\n\n scrollPointsRef.current = [];\n isSendingScrollPointsRef.current = false;\n }, [publishScrollEvents]);\n\n const throttleSend = useMemo(() => throttle(sendScrollPoints, 500), [sendScrollPoints]);\n\n const handleScroll = useCallback(() => {\n const scrollPoint = containerRef.current?.scrollTop || 0;\n\n scrollPointsRef.current.push(scrollPoint);\n\n throttleSend();\n }, [throttleSend]);\n\n useEffect(() => {\n fetchChapter();\n }, [fetchChapter]);\n\n useEffect(() => {\n if (containerRef.current) {\n if ((chapterData && isTeacher) || isTeacher) {\n const scrollElement = containerRef.current;\n\n scrollElement.addEventListener('scroll', handleScroll);\n\n return () => {\n if (scrollElement) {\n scrollElement.removeEventListener('scroll', handleScroll);\n }\n };\n }\n }\n }, [isTeacher, chapterData, handleScroll]);\n\n useEffect(() => {\n const scrollElement = containerRef.current;\n\n if (\n receivedScrollPoints &&\n Array.isArray(receivedScrollPoints) &&\n !isTeacher &&\n scrollElement\n ) {\n const averageScroll = Math.floor(\n receivedScrollPoints.reduce((a, b) => a + b, 0) / receivedScrollPoints.length,\n );\n\n scrollElement.scrollTo({\n top: averageScroll,\n behavior: 'smooth',\n });\n }\n }, [receivedScrollPoints, isTeacher]);\n\n useEffect(() => {\n return () => {\n closeChannel();\n };\n }, [closeChannel]);\n\n if (isProcessing) {\n return <AppLoader height=\"100%\" />;\n }\n\n if (isProcessingFailed) {\n return (\n <FlexView $height=\"100%\" $flexGapX={1.5} $alignItems=\"center\" $justifyContent=\"center\">\n <Text $renderAs=\"h6\">{error?.message || 'Oops! Something went wrong.'}</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapter}\n />\n </FlexView>\n );\n }\n\n return (\n <Styled.Container ref={containerRef} $isScrollable={isTeacher}>\n <Styled.Wrapper\n $clickable={isTeacher}\n $gutterX={2}\n $isScrollable={isTeacher}\n id=\"milestone-list-element-container\"\n >\n {chapterId && chapterData ? (\n <>\n <Styled.BackIconWrapper>\n <Styled.BackIcon $clickable={isTeacher} onClick={handleOnBackIconClick} />\n </Styled.BackIconWrapper>\n\n <Styled.ChapterWrapper>\n <Chapter\n user_type={isTeacher ? 'TEACHER' : 'STUDENT'}\n teacherId={teacherId}\n {...chapterData}\n loading={isProcessing}\n />\n </Styled.ChapterWrapper>\n </>\n ) : (\n <MilestoneList\n userType={isTeacher ? 'TEACHER' : 'STUDENT'}\n studentName={name}\n studentId={studentId}\n studentClassroomId={studentClassroomId}\n milestoneType=\"DRAFT\"\n onChapterClick={handleOnChapterClick}\n courseStream={stream}\n />\n )}\n </Styled.Wrapper>\n </Styled.Container>\n );\n};\n\nexport default LearningPlan;\n"],"names":["LearningPlan","trialHomeData","studentId","teacherId","formData","isTeacher","updateSlideConfig","useTrialSessionContext","studentClassroomId","stream","name","chapterId","containerRef","useRef","scrollPointsRef","isSendingScrollPointsRef","publishScrollEvents","closeChannel","receivedScrollPoints","useLearningPlanScrollSync","getChapterData","chapterData","isProcessing","isProcessingFailed","error","useGetChapterData","fetchChapter","useCallback","scrollElement","handleOnChapterClick","chapter","handleOnBackIconClick","sendScrollPoints","throttleSend","useMemo","throttle","handleScroll","scrollPoint","_a","useEffect","averageScroll","a","b","jsx","AppLoader","jsxs","FlexView","Text","Button","Styled.Container","Styled.Wrapper","Fragment","Styled.BackIconWrapper","Styled.BackIcon","Styled.ChapterWrapper","Chapter","MilestoneList"],"mappings":";;;;;;;;;;;;;AAgBA,MAAMA,KAAyB,MAAM;AAC7B,QAAA,EAAE,eAAAC,GAAe,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,WAAAC,GAAW,mBAAAC,MAChEC,KACI;AAAA,IACJ,WAAW,EAAE,sBAAsBC,GAAoB,QAAAC,EAAO;AAAA,EAAA,IAC5DR,KAAiB,CAAA,GACf,EAAE,MAAAS,IAAO,IAAI,WAAAC,EAAU,IAAIP,KAAY,CAAA,GAEvCQ,IAAeC,EAAuB,IAAI,GAC1CC,IAAkBD,EAAiB,CAAA,CAAE,GACrCE,IAA2BF,EAAO,EAAK,GAEvC;AAAA,IACJ,qBAAAG;AAAA,IACA,cAAAC;AAAA,IACA,cAAcC;AAAA,EAAA,IACZC,EAA0BX,CAAkB,GAE1C;AAAA,IACJ,KAAKY;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,OAAAC;AAAA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AAA,IAAA;AAAA,MACC,YAAY7C;AAAA,MACZ,UAAU;AAAA,MACV,eAAeA;AAAA,MACf,IAAG;AAAA,MAEF,UAAAM,KAAaU,IAEV,gBAAAwB,EAAAM,GAAA,EAAA,UAAA;AAAA,QAAC,gBAAAR,EAAAS,GAAA,EACC,UAAC,gBAAAT,EAAAU,GAAA,EAAgB,YAAYhD,GAAW,SAAS0B,EAAA,CAAuB,EAC1E,CAAA;AAAA,QAEA,gBAAAY,EAACW,GAAA,EACC,UAAA,gBAAAX;AAAA,UAACY;AAAA,UAAA;AAAA,YACC,WAAWlD,IAAY,YAAY;AAAA,YACnC,WAAAF;AAAA,YACC,GAAGkB;AAAA,YACJ,SAASC;AAAA,UAAA;AAAA,QAAA,GAEb;AAAA,MAAA,EAAA,CACF,IAEA,gBAAAqB;AAAA,QAACa;AAAA,QAAA;AAAA,UACC,UAAUnD,IAAY,YAAY;AAAA,UAClC,aAAaK;AAAA,UACb,WAAAR;AAAA,UACA,oBAAAM;AAAA,UACA,eAAc;AAAA,UACd,gBAAgBqB;AAAA,UAChB,cAAcpB;AAAA,QAAA;AAAA,MAChB;AAAA,IAAA;AAAA,EAGN,EAAA,CAAA;AAEJ;"}
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/features/trial-session/comps/learning-plan/index.tsx"],"sourcesContent":["import type { IChapterDataProps } from '../../../chapters/chapter/chapter-types';\n\nimport throttle from 'lodash.throttle';\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport { useGetChapterData } from '../../../chapters/api/chapter';\nimport Chapter from '../../../chapters/chapter/chapter';\nimport MilestoneList from '../../../milestone/milestone-list-container/milestone-list-container';\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Text from '../../../ui/text/text';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport * as Styled from './learning-plan-styled';\nimport { useLearningPlanScrollSync } from './use-learning-plan-scroll-sync';\n\nconst LearningPlan: React.FC = () => {\n const { trialHomeData, studentId, teacherId, formData, isTeacher, updateSlideConfig } =\n useTrialSessionContext();\n const {\n demo_info: { student_classroom_id: studentClassroomId, stream },\n } = trialHomeData || {};\n const { name = '', chapterId } = formData || {};\n\n const containerRef = useRef<HTMLDivElement>(null);\n const scrollPointsRef = useRef<number[]>([]);\n const isSendingScrollPointsRef = useRef(false);\n\n const {\n publishScrollEvents,\n closeChannel,\n scrollPoints: receivedScrollPoints,\n } = useLearningPlanScrollSync(studentClassroomId);\n\n const {\n get: getChapterData,\n data: chapterData,\n isProcessing,\n isProcessingFailed,\n error,\n } = useGetChapterData();\n\n const fetchChapter = useCallback(() => {\n if (chapterId && studentId) {\n getChapterData(chapterId, undefined, {\n studentId,\n }).then(() => {\n const scrollElement = containerRef.current;\n\n scrollElement?.scrollTo({\n top: 0,\n behavior: 'smooth',\n });\n });\n }\n }, [getChapterData, studentId, chapterId]);\n\n const handleOnChapterClick = useCallback(\n (chapter: IChapterDataProps) => {\n updateSlideConfig({\n chapterId: chapter.id,\n });\n },\n [updateSlideConfig],\n );\n\n const handleOnBackIconClick = useCallback(() => {\n updateSlideConfig({\n chapterId: undefined,\n });\n }, [updateSlideConfig]);\n\n const sendScrollPoints = useCallback(() => {\n if (scrollPointsRef.current.length === 0 || isSendingScrollPointsRef.current) return;\n\n isSendingScrollPointsRef.current = true;\n\n if (publishScrollEvents) {\n publishScrollEvents({\n eventName: 'TRIAL_SESSION_GOAL_PLAN_SCROLL',\n eventPayload: {\n scrollPoints: scrollPointsRef.current,\n },\n });\n }\n\n scrollPointsRef.current = [];\n isSendingScrollPointsRef.current = false;\n }, [publishScrollEvents]);\n\n const throttleSend = useMemo(() => throttle(sendScrollPoints, 500), [sendScrollPoints]);\n\n const handleScroll = useCallback(() => {\n const scrollPoint = containerRef.current?.scrollTop || 0;\n\n scrollPointsRef.current.push(scrollPoint);\n\n throttleSend();\n }, [throttleSend]);\n\n useEffect(() => {\n fetchChapter();\n }, [fetchChapter]);\n\n useEffect(() => {\n if (containerRef.current) {\n if ((chapterData && isTeacher) || isTeacher) {\n const scrollElement = containerRef.current;\n\n scrollElement.addEventListener('scroll', handleScroll);\n\n return () => {\n if (scrollElement) {\n scrollElement.removeEventListener('scroll', handleScroll);\n }\n };\n }\n }\n }, [isTeacher, chapterData, handleScroll]);\n\n useEffect(() => {\n const scrollElement = containerRef.current;\n\n if (\n receivedScrollPoints &&\n Array.isArray(receivedScrollPoints) &&\n !isTeacher &&\n scrollElement\n ) {\n const averageScroll = Math.floor(\n receivedScrollPoints.reduce((a, b) => a + b, 0) / receivedScrollPoints.length,\n );\n\n scrollElement.scrollTo({\n top: averageScroll,\n behavior: 'smooth',\n });\n }\n }, [receivedScrollPoints, isTeacher]);\n\n useEffect(() => {\n return () => {\n closeChannel();\n };\n }, [closeChannel]);\n\n if (isProcessing) {\n return <AppLoader height=\"100%\" />;\n }\n\n if (isProcessingFailed) {\n return (\n <FlexView $height=\"100%\" $flexGapX={1.5} $alignItems=\"center\" $justifyContent=\"center\">\n <Text $renderAs=\"h6\">{error?.message || 'Oops! Something went wrong.'}</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapter}\n />\n </FlexView>\n );\n }\n\n return (\n <Styled.Container ref={containerRef} $isScrollable={isTeacher}>\n <Styled.Wrapper\n $clickable={isTeacher}\n $gutterX={2}\n $isScrollable={isTeacher}\n id=\"milestone-list-element-container\"\n >\n {chapterId && chapterData ? (\n <>\n <Styled.BackIconWrapper>\n <Styled.BackIcon $clickable={isTeacher} onClick={handleOnBackIconClick} />\n </Styled.BackIconWrapper>\n\n <Styled.ChapterWrapper>\n <Chapter\n user_type={isTeacher ? 'TEACHER' : 'STUDENT'}\n teacherId={teacherId}\n {...chapterData}\n loading={isProcessing}\n />\n </Styled.ChapterWrapper>\n </>\n ) : (\n <MilestoneList\n userType={isTeacher ? 'TEACHER' : 'STUDENT'}\n studentName={name}\n studentId={studentId}\n studentClassroomId={studentClassroomId}\n milestoneType=\"DRAFT\"\n onChapterClick={handleOnChapterClick}\n courseStream={stream}\n />\n )}\n </Styled.Wrapper>\n </Styled.Container>\n );\n};\n\nexport default LearningPlan;\n"],"names":["LearningPlan","trialHomeData","studentId","teacherId","formData","isTeacher","updateSlideConfig","useTrialSessionContext","studentClassroomId","stream","name","chapterId","containerRef","useRef","scrollPointsRef","isSendingScrollPointsRef","publishScrollEvents","closeChannel","receivedScrollPoints","useLearningPlanScrollSync","getChapterData","chapterData","isProcessing","isProcessingFailed","error","useGetChapterData","fetchChapter","useCallback","scrollElement","handleOnChapterClick","chapter","handleOnBackIconClick","sendScrollPoints","throttleSend","useMemo","throttle","handleScroll","scrollPoint","_a","useEffect","averageScroll","a","b","jsx","AppLoader","jsxs","FlexView","Text","Button","Styled.Container","Styled.Wrapper","Fragment","Styled.BackIconWrapper","Styled.BackIcon","Styled.ChapterWrapper","Chapter","MilestoneList"],"mappings":";;;;;;;;;;;;;AAgBA,MAAMA,KAAyB,MAAM;AAC7B,QAAA,EAAE,eAAAC,GAAe,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,WAAAC,GAAW,mBAAAC,MAChEC,KACI;AAAA,IACJ,WAAW,EAAE,sBAAsBC,GAAoB,QAAAC,EAAO;AAAA,EAAA,IAC5DR,KAAiB,CAAA,GACf,EAAE,MAAAS,IAAO,IAAI,WAAAC,EAAU,IAAIP,KAAY,CAAA,GAEvCQ,IAAeC,EAAuB,IAAI,GAC1CC,IAAkBD,EAAiB,CAAA,CAAE,GACrCE,IAA2BF,EAAO,EAAK,GAEvC;AAAA,IACJ,qBAAAG;AAAA,IACA,cAAAC;AAAA,IACA,cAAcC;AAAA,EAAA,IACZC,EAA0BX,CAAkB,GAE1C;AAAA,IACJ,KAAKY;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,OAAAC;AAAA,MACEC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AAA;AAAA,MACC,YAAY7C;AAAA,MACZ,UAAU;AAAA,MACV,eAAeA;AAAA,MACf,IAAG;AAAA,MAEF,UAAAM,KAAaU,IAEV,gBAAAwB,EAAAM,GAAA,EAAA,UAAA;AAAA,QAAC,gBAAAR,EAAAS,GAAA,EACC,UAAC,gBAAAT,EAAAU,GAAA,EAAgB,YAAYhD,GAAW,SAAS0B,EAAA,CAAuB,EAC1E,CAAA;AAAA,QAEA,gBAAAY,EAACW,GAAA,EACC,UAAA,gBAAAX;AAAA,UAACY;AAAA,UAAA;AAAA,YACC,WAAWlD,IAAY,YAAY;AAAA,YACnC,WAAAF;AAAA,YACC,GAAGkB;AAAA,YACJ,SAASC;AAAA,UAAA;AAAA,QAAA,GAEb;AAAA,MAAA,EAAA,CACF,IAEA,gBAAAqB;AAAA,QAACa;AAAAA,QAAA;AAAA,UACC,UAAUnD,IAAY,YAAY;AAAA,UAClC,aAAaK;AAAA,UACb,WAAAR;AAAA,UACA,oBAAAM;AAAA,UACA,eAAc;AAAA,UACd,gBAAgBqB;AAAA,UAChB,cAAcpB;AAAA,QAAA;AAAA,MAChB;AAAA,IAAA;AAAA,EAGN,EAAA,CAAA;AAEJ;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"animated-arc-constants.js","sources":["../../../../src/features/ui/animated-arc/animated-arc-constants.ts"],"sourcesContent":["export const RAINBOW_COLOR_ANIMATION_DURATION = 43 / 30; // 43 frames;\n"],"names":["RAINBOW_COLOR_ANIMATION_DURATION"],"mappings":"AAAO,MAAMA,IAAmC;"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
const r = (o, a, t, s) => {
|
2
|
+
const n = (s - 90) * (Math.PI / 180);
|
3
|
+
return {
|
4
|
+
x: o + t * Math.cos(n),
|
5
|
+
y: a + t * Math.sin(n)
|
6
|
+
};
|
7
|
+
}, M = (o, a, t, s, n) => {
|
8
|
+
const $ = s + n, c = r(o, a, t, s), e = r(o, a, t, $), d = n > 180 ? 1 : 0;
|
9
|
+
return `M ${c.x} ${c.y} A ${t} ${t} 0 ${d} 1 ${e.x} ${e.y}`;
|
10
|
+
};
|
11
|
+
export {
|
12
|
+
M as describeArc
|
13
|
+
};
|
14
|
+
//# sourceMappingURL=animated-arc-helpers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"animated-arc-helpers.js","sources":["../../../../src/features/ui/animated-arc/animated-arc-helpers.ts"],"sourcesContent":["const polarToCartesian = (cx: number, cy: number, r: number, angleDeg: number) => {\n const angleRad = (angleDeg - 90) * (Math.PI / 180);\n\n return {\n x: cx + r * Math.cos(angleRad),\n y: cy + r * Math.sin(angleRad),\n };\n};\n\nexport const describeArc = (\n cx: number,\n cy: number,\n r: number,\n startAngle: number,\n sweepAngle: number,\n) => {\n const endAngle = startAngle + sweepAngle;\n const start = polarToCartesian(cx, cy, r, startAngle);\n const end = polarToCartesian(cx, cy, r, endAngle);\n const largeArcFlag = sweepAngle > 180 ? 1 : 0;\n\n return `M ${start.x} ${start.y} A ${r} ${r} 0 ${largeArcFlag} 1 ${end.x} ${end.y}`;\n};\n"],"names":["polarToCartesian","cx","cy","r","angleDeg","angleRad","describeArc","startAngle","sweepAngle","endAngle","start","end","largeArcFlag"],"mappings":"AAAA,MAAMA,IAAmB,CAACC,GAAYC,GAAYC,GAAWC,MAAqB;AAChF,QAAMC,KAAYD,IAAW,OAAO,KAAK,KAAK;AAEvC,SAAA;AAAA,IACL,GAAGH,IAAKE,IAAI,KAAK,IAAIE,CAAQ;AAAA,IAC7B,GAAGH,IAAKC,IAAI,KAAK,IAAIE,CAAQ;AAAA,EAAA;AAEjC,GAEaC,IAAc,CACzBL,GACAC,GACAC,GACAI,GACAC,MACG;AACH,QAAMC,IAAWF,IAAaC,GACxBE,IAAQV,EAAiBC,GAAIC,GAAIC,GAAGI,CAAU,GAC9CI,IAAMX,EAAiBC,GAAIC,GAAIC,GAAGM,CAAQ,GAC1CG,IAAeJ,IAAa,MAAM,IAAI;AAE5C,SAAO,KAAKE,EAAM,CAAC,IAAIA,EAAM,CAAC,MAAMP,CAAC,IAAIA,CAAC,MAAMS,CAAY,MAAMD,EAAI,CAAC,IAAIA,EAAI,CAAC;AAClF;"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import r, { keyframes as e } from "styled-components";
|
2
|
+
import { RAINBOW_COLOR_ANIMATION_DURATION as n } from "./animated-arc-constants.js";
|
3
|
+
const s = e`
|
4
|
+
0% {
|
5
|
+
stroke: #FFB700;
|
6
|
+
color: #FFB700;
|
7
|
+
}
|
8
|
+
33% {
|
9
|
+
stroke: #FF884C;
|
10
|
+
color: #FF884C;
|
11
|
+
}
|
12
|
+
66% {
|
13
|
+
stroke: #FF80F4;
|
14
|
+
color: #FF80F4;
|
15
|
+
}
|
16
|
+
100% {
|
17
|
+
stroke: #33CCFF;
|
18
|
+
color: #33CCFF;
|
19
|
+
}
|
20
|
+
`, a = r.svg`
|
21
|
+
position: absolute;
|
22
|
+
z-index: 1;
|
23
|
+
pointer-events: none;
|
24
|
+
`, c = r.path`
|
25
|
+
stroke: ${({ theme: o, stroke: t }) => o.colors[t]};
|
26
|
+
animation: ${({ $showAnimatedRainbowArc: o }) => o ? s : "undefined"}
|
27
|
+
${n}s ease infinite forwards;
|
28
|
+
`;
|
29
|
+
export {
|
30
|
+
c as Path,
|
31
|
+
a as Svg
|
32
|
+
};
|
33
|
+
//# sourceMappingURL=animated-arc-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"animated-arc-styled.js","sources":["../../../../src/features/ui/animated-arc/animated-arc-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../types';\n\nimport styled, { keyframes } from 'styled-components';\n\nimport { RAINBOW_COLOR_ANIMATION_DURATION } from './animated-arc-constants';\n\nconst rainbowColorAnimation = keyframes`\n 0% {\n stroke: #FFB700;\n color: #FFB700;\n }\n 33% {\n stroke: #FF884C;\n color: #FF884C;\n }\n 66% {\n stroke: #FF80F4;\n color: #FF80F4;\n }\n 100% {\n stroke: #33CCFF;\n color: #33CCFF;\n }\n`;\n\nexport const Svg = styled.svg`\n position: absolute;\n z-index: 1;\n pointer-events: none;\n`;\n\nexport const Path = styled.path<{ stroke: TColorNames; $showAnimatedRainbowArc: boolean }>`\n stroke: ${({ theme, stroke }) => theme.colors[stroke]};\n animation: ${({ $showAnimatedRainbowArc }) =>\n $showAnimatedRainbowArc ? rainbowColorAnimation : 'undefined'}\n ${RAINBOW_COLOR_ANIMATION_DURATION}s ease infinite forwards;\n`;\n"],"names":["rainbowColorAnimation","keyframes","Svg","styled","Path","theme","stroke","$showAnimatedRainbowArc","RAINBOW_COLOR_ANIMATION_DURATION"],"mappings":";;AAMA,MAAMA,IAAwBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAmBjBC,IAAMC,EAAO;AAAA;AAAA;AAAA;AAAA,GAMbC,IAAOD,EAAO;AAAA,YACf,CAAC,EAAE,OAAAE,GAAO,QAAAC,EAAA,MAAaD,EAAM,OAAOC,CAAM,CAAC;AAAA,eACxC,CAAC,EAAE,yBAAAC,EAAA,MACZA,IAA0BP,IAAwB,WAAW;AAAA,MAC7DQ,CAAgC;AAAA;"}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
2
|
+
import { useRef as u, useMemo as A, useLayoutEffect as g } from "react";
|
3
|
+
import { describeArc as w } from "./animated-arc-helpers.js";
|
4
|
+
import { Svg as R, Path as k } from "./animated-arc-styled.js";
|
5
|
+
const b = ({
|
6
|
+
radius: e,
|
7
|
+
strokeWidth: i,
|
8
|
+
color: y,
|
9
|
+
targetAngle: a,
|
10
|
+
startAngle: c = 0,
|
11
|
+
duration: o = 2,
|
12
|
+
mode: s = "draw",
|
13
|
+
delay: n = 0,
|
14
|
+
showAnimatedRainbowArc: $ = !1
|
15
|
+
}) => {
|
16
|
+
const f = u(null), r = e, l = e - i / 2, h = A(
|
17
|
+
() => w(r, r, l, c, a),
|
18
|
+
[a, c, l, r]
|
19
|
+
);
|
20
|
+
return g(() => {
|
21
|
+
const t = f.current;
|
22
|
+
if (t) {
|
23
|
+
if (s === "draw") {
|
24
|
+
const m = t.getTotalLength();
|
25
|
+
t.style.strokeDasharray = `${m}`, t.style.strokeDashoffset = `${m}`, t.getBoundingClientRect(), requestAnimationFrame(() => {
|
26
|
+
t.style.transition = `stroke-dashoffset ${o}s linear ${n}s`, t.style.strokeDashoffset = "0";
|
27
|
+
});
|
28
|
+
}
|
29
|
+
s === "fade" && (t.style.opacity = "0", t.getBoundingClientRect(), requestAnimationFrame(() => {
|
30
|
+
t.style.transition = `opacity ${o} ease-in-out ${n}s`, t.style.opacity = "1";
|
31
|
+
}));
|
32
|
+
}
|
33
|
+
}, [h, s, o, n]), /* @__PURE__ */ p(R, { width: 2 * e, height: 2 * e, viewBox: `0 0 ${2 * e} ${2 * e}`, children: /* @__PURE__ */ p(
|
34
|
+
k,
|
35
|
+
{
|
36
|
+
ref: f,
|
37
|
+
d: h,
|
38
|
+
fill: "none",
|
39
|
+
stroke: y,
|
40
|
+
strokeWidth: i,
|
41
|
+
strokeLinecap: "butt",
|
42
|
+
$showAnimatedRainbowArc: $
|
43
|
+
}
|
44
|
+
) });
|
45
|
+
}, L = b;
|
46
|
+
export {
|
47
|
+
L as default
|
48
|
+
};
|
49
|
+
//# sourceMappingURL=animated-arc.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"animated-arc.js","sources":["../../../../src/features/ui/animated-arc/animated-arc.tsx"],"sourcesContent":["import type { IAnimatedArcProps } from './animated-arc-types';\n\nimport React, { useRef, useLayoutEffect, useMemo } from 'react';\n\nimport { describeArc } from './animated-arc-helpers';\nimport * as Styled from './animated-arc-styled';\n\nconst AnimatedArc: React.FC<IAnimatedArcProps> = ({\n radius,\n strokeWidth,\n color,\n targetAngle,\n startAngle = 0,\n duration = 2,\n mode = 'draw',\n delay = 0,\n showAnimatedRainbowArc = false,\n}) => {\n const pathRef = useRef<SVGPathElement>(null);\n\n const center = radius;\n const arcRadius = radius - strokeWidth / 2; // draw arc inside the visible bounds\n const arcPath = useMemo(\n () => describeArc(center, center, arcRadius, startAngle, targetAngle),\n [targetAngle, startAngle, arcRadius, center],\n );\n\n useLayoutEffect(() => {\n const path = pathRef.current;\n\n if (!path) return;\n\n if (mode === 'draw') {\n const length = path.getTotalLength();\n\n path.style.strokeDasharray = `${length}`;\n path.style.strokeDashoffset = `${length}`;\n path.getBoundingClientRect();\n\n requestAnimationFrame(() => {\n path.style.transition = `stroke-dashoffset ${duration}s linear ${delay}s`;\n path.style.strokeDashoffset = '0';\n });\n }\n\n if (mode === 'fade') {\n path.style.opacity = '0';\n path.getBoundingClientRect();\n\n requestAnimationFrame(() => {\n path.style.transition = `opacity ${duration} ease-in-out ${delay}s`;\n path.style.opacity = '1';\n });\n }\n }, [arcPath, mode, duration, delay]);\n\n return (\n <Styled.Svg width={2 * radius} height={2 * radius} viewBox={`0 0 ${2 * radius} ${2 * radius}`}>\n <Styled.Path\n ref={pathRef}\n d={arcPath}\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"butt\"\n $showAnimatedRainbowArc={showAnimatedRainbowArc}\n />\n </Styled.Svg>\n );\n};\n\nexport default AnimatedArc;\n"],"names":["AnimatedArc","radius","strokeWidth","color","targetAngle","startAngle","duration","mode","delay","showAnimatedRainbowArc","pathRef","useRef","center","arcRadius","arcPath","useMemo","describeArc","useLayoutEffect","path","length","Styled.Svg","jsx","Styled.Path","AnimatedArc$1"],"mappings":";;;;AAOA,MAAMA,IAA2C,CAAC;AAAA,EAChD,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,UAAAC,IAAW;AAAA,EACX,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,w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|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/features/ui/animated-arc/constants.ts"],"sourcesContent":["export const ARC_Z_INDEX = 1;\n\nexport const ADJUSTED_START_ANGLE = 150;\n"],"names":["ADJUSTED_START_ANGLE"],"mappings":"AAEO,MAAMA,IAAuB;"}
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import
|
3
|
-
import { useRef as
|
4
|
-
import { useTheme as
|
1
|
+
import { jsxs as I, Fragment as U, jsx as r } from "react/jsx-runtime";
|
2
|
+
import W from "../../../node_modules/lodash.throttle/index.js";
|
3
|
+
import { useRef as Y, useState as m, useCallback as $, useEffect as H } from "react";
|
4
|
+
import { useTheme as P } from "styled-components";
|
5
5
|
import C from "../layout/flex-view.js";
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import { TooltipBody as
|
9
|
-
import { computeTooltipNewCoOrdinates as
|
10
|
-
const
|
6
|
+
import V from "../portal/portal.js";
|
7
|
+
import Z from "../text/text.js";
|
8
|
+
import { TooltipBody as q } from "./arrow-tooltip-styled.js";
|
9
|
+
import { computeTooltipNewCoOrdinates as y } from "./arrow-tooltip-util.js";
|
10
|
+
const G = 8, J = 100, K = ({
|
11
11
|
isAnimated: O,
|
12
12
|
alwaysVisible: o = !1,
|
13
13
|
arrowColor: T,
|
14
|
-
arrowSize: h =
|
14
|
+
arrowSize: h = G,
|
15
15
|
arrowXCoOrdinates: g,
|
16
16
|
arrowYCoOrdinates: w,
|
17
17
|
backgroundColor: R,
|
@@ -27,61 +27,62 @@ const y = 8, G = 100, J = ({
|
|
27
27
|
tooltipYCoOrdinates: k,
|
28
28
|
width: F,
|
29
29
|
widthX: L,
|
30
|
-
zIndex: M
|
30
|
+
zIndex: M,
|
31
|
+
parentWidth: S
|
31
32
|
}) => {
|
32
|
-
const { arrowTooltip:
|
33
|
+
const { arrowTooltip: X } = P(), { tooltipVariants: a } = X, { backgroundColorName: _ } = a[i], u = Y(null), [j, p] = m(o), [v, z] = m(
|
33
34
|
null
|
34
35
|
), s = $(
|
35
36
|
(e, n) => {
|
36
|
-
|
37
|
+
z(e), p(n);
|
37
38
|
},
|
38
39
|
[]
|
39
|
-
),
|
40
|
+
), B = $(() => {
|
40
41
|
if (t || o)
|
41
42
|
return null;
|
42
43
|
s(null, !1);
|
43
|
-
}, [o, s, t]), d =
|
44
|
+
}, [o, s, t]), d = W(() => {
|
44
45
|
var f;
|
45
46
|
const { current: e } = u;
|
46
47
|
if (t || !e) return null;
|
47
|
-
const n = (f = e.children[0]) == null ? void 0 : f.getBoundingClientRect(),
|
48
|
-
return s(
|
49
|
-
},
|
50
|
-
return
|
48
|
+
const n = (f = e.children[0]) == null ? void 0 : f.getBoundingClientRect(), D = n ? y(c, n) : null;
|
49
|
+
return s(D, !0), null;
|
50
|
+
}, J);
|
51
|
+
return H(() => {
|
51
52
|
t && p(!1), o && d();
|
52
|
-
}, [o, t]), /* @__PURE__ */
|
53
|
+
}, [o, t]), /* @__PURE__ */ I(U, { children: [
|
53
54
|
/* @__PURE__ */ r(
|
54
55
|
C,
|
55
56
|
{
|
56
|
-
$width: "fit-content",
|
57
|
+
$width: S || "fit-content",
|
57
58
|
ref: u,
|
58
59
|
onMouseEnter: d,
|
59
|
-
onMouseLeave:
|
60
|
+
onMouseLeave: B,
|
60
61
|
children: /* @__PURE__ */ r(C, { children: x })
|
61
62
|
}
|
62
63
|
),
|
63
|
-
|
64
|
-
|
64
|
+
j && /* @__PURE__ */ r(V, { portalId: "tooltip-root", children: /* @__PURE__ */ r(
|
65
|
+
q,
|
65
66
|
{
|
66
67
|
$arrowSize: h,
|
67
68
|
$arrowXCoOrdinates: g,
|
68
69
|
$arrowYCoOrdinates: w,
|
69
70
|
$position: c,
|
70
71
|
$renderAs: i,
|
71
|
-
$tooltipCoOrdinates:
|
72
|
+
$tooltipCoOrdinates: v,
|
72
73
|
$tooltipOffset: E,
|
73
74
|
$tooltipXCoOrdinates: N,
|
74
75
|
$tooltipYCoOrdinates: k,
|
75
76
|
$width: F,
|
76
77
|
$widthX: L,
|
77
78
|
$zIndex: M,
|
78
|
-
$background:
|
79
|
+
$background: _,
|
79
80
|
$backgroundColor: R,
|
80
81
|
$arrowColor: T,
|
81
82
|
$borderColor: b,
|
82
83
|
$isAnimated: O,
|
83
84
|
children: typeof l == "string" ? /* @__PURE__ */ r(
|
84
|
-
|
85
|
+
Z,
|
85
86
|
{
|
86
87
|
$renderAs: A || "body3",
|
87
88
|
$color: a[i].textColorName,
|
@@ -92,8 +93,8 @@ const y = 8, G = 100, J = ({
|
|
92
93
|
}
|
93
94
|
) })
|
94
95
|
] });
|
95
|
-
},
|
96
|
+
}, co = K;
|
96
97
|
export {
|
97
|
-
|
98
|
+
co as default
|
98
99
|
};
|
99
100
|
//# sourceMappingURL=arrow-tooltip.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"arrow-tooltip.js","sources":["../../../../src/features/ui/arrow-tooltip/arrow-tooltip.tsx"],"sourcesContent":["import type {\n IArrowTooltipProps,\n THandleVisibleNCoOrdinatesProps,\n TTooltipCoOrdinatesProps,\n} from './arrow-tooltip-types';\n\nimport throttle from 'lodash.throttle';\nimport { useState, type FC, useCallback, useRef, useEffect } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\nimport Portal from '../portal/portal';\nimport Text from '../text/text';\nimport * as Styled from './arrow-tooltip-styled';\nimport { computeTooltipNewCoOrdinates } from './arrow-tooltip-util';\n\nconst DEFAULT_ARROW_SIZE = 8;\nconst THROTTLE_DURATION = 100;\n\nconst ArrowTooltip: FC<IArrowTooltipProps> = ({\n isAnimated,\n alwaysVisible = false,\n arrowColor,\n arrowSize = DEFAULT_ARROW_SIZE,\n arrowXCoOrdinates,\n arrowYCoOrdinates,\n backgroundColor,\n borderColor,\n children,\n hidden,\n position,\n renderAs,\n textVariant,\n tooltipItem,\n tooltipOffset,\n tooltipXCoOrdinates,\n tooltipYCoOrdinates,\n width,\n widthX,\n zIndex,\n}) => {\n const { arrowTooltip } = useTheme();\n const { tooltipVariants } = arrowTooltip;\n const { backgroundColorName } = tooltipVariants[renderAs];\n\n const tooltipWrapperRef = useRef<HTMLDivElement>(null);\n const [visible, setVisible] = useState(alwaysVisible);\n const [tooltipCoOrdinates, setTooltipCoOrdinates] = useState<TTooltipCoOrdinatesProps | null>(\n null,\n );\n\n const handleVisibleNCoOrdinates: THandleVisibleNCoOrdinatesProps = useCallback(\n (newCoOrdinates, visibility) => {\n setTooltipCoOrdinates(newCoOrdinates);\n setVisible(visibility);\n },\n [],\n );\n\n const handleVisibility = useCallback(() => {\n if (hidden || alwaysVisible) {\n return null;\n }\n\n handleVisibleNCoOrdinates(null, false);\n\n return;\n }, [alwaysVisible, handleVisibleNCoOrdinates, hidden]);\n\n const handleOnMouseEnter = throttle(() => {\n const { current } = tooltipWrapperRef;\n\n if (hidden || !current) return null;\n\n const boundingClientRect = current.children[0]?.getBoundingClientRect();\n const newCoOrdinates = boundingClientRect\n ? computeTooltipNewCoOrdinates(position, boundingClientRect)\n : null;\n\n handleVisibleNCoOrdinates(newCoOrdinates, true);\n\n return null;\n }, THROTTLE_DURATION);\n\n useEffect(() => {\n if (hidden) {\n setVisible(false);\n }\n\n if (alwaysVisible) {\n handleOnMouseEnter();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [alwaysVisible, hidden]);\n\n return (\n <>\n <FlexView\n $width
|
1
|
+
{"version":3,"file":"arrow-tooltip.js","sources":["../../../../src/features/ui/arrow-tooltip/arrow-tooltip.tsx"],"sourcesContent":["import type {\n IArrowTooltipProps,\n THandleVisibleNCoOrdinatesProps,\n TTooltipCoOrdinatesProps,\n} from './arrow-tooltip-types';\n\nimport throttle from 'lodash.throttle';\nimport { useState, type FC, useCallback, useRef, useEffect } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\nimport Portal from '../portal/portal';\nimport Text from '../text/text';\nimport * as Styled from './arrow-tooltip-styled';\nimport { computeTooltipNewCoOrdinates } from './arrow-tooltip-util';\n\nconst DEFAULT_ARROW_SIZE = 8;\nconst THROTTLE_DURATION = 100;\n\nconst ArrowTooltip: FC<IArrowTooltipProps> = ({\n isAnimated,\n alwaysVisible = false,\n arrowColor,\n arrowSize = DEFAULT_ARROW_SIZE,\n arrowXCoOrdinates,\n arrowYCoOrdinates,\n backgroundColor,\n borderColor,\n children,\n hidden,\n position,\n renderAs,\n textVariant,\n tooltipItem,\n tooltipOffset,\n tooltipXCoOrdinates,\n tooltipYCoOrdinates,\n width,\n widthX,\n zIndex,\n parentWidth,\n}) => {\n const { arrowTooltip } = useTheme();\n const { tooltipVariants } = arrowTooltip;\n const { backgroundColorName } = tooltipVariants[renderAs];\n\n const tooltipWrapperRef = useRef<HTMLDivElement>(null);\n const [visible, setVisible] = useState(alwaysVisible);\n const [tooltipCoOrdinates, setTooltipCoOrdinates] = useState<TTooltipCoOrdinatesProps | null>(\n null,\n );\n\n const handleVisibleNCoOrdinates: THandleVisibleNCoOrdinatesProps = useCallback(\n (newCoOrdinates, visibility) => {\n setTooltipCoOrdinates(newCoOrdinates);\n setVisible(visibility);\n },\n [],\n );\n\n const handleVisibility = useCallback(() => {\n if (hidden || alwaysVisible) {\n return null;\n }\n\n handleVisibleNCoOrdinates(null, false);\n\n return;\n }, [alwaysVisible, handleVisibleNCoOrdinates, hidden]);\n\n const handleOnMouseEnter = throttle(() => {\n const { current } = tooltipWrapperRef;\n\n if (hidden || !current) return null;\n\n const boundingClientRect = current.children[0]?.getBoundingClientRect();\n const newCoOrdinates = boundingClientRect\n ? computeTooltipNewCoOrdinates(position, boundingClientRect)\n : null;\n\n handleVisibleNCoOrdinates(newCoOrdinates, true);\n\n return null;\n }, THROTTLE_DURATION);\n\n useEffect(() => {\n if (hidden) {\n setVisible(false);\n }\n\n if (alwaysVisible) {\n handleOnMouseEnter();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [alwaysVisible, hidden]);\n\n return (\n <>\n <FlexView\n $width={parentWidth || 'fit-content'}\n ref={tooltipWrapperRef}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleVisibility}\n >\n <FlexView>{children}</FlexView>\n </FlexView>\n {visible && (\n <Portal portalId=\"tooltip-root\">\n <Styled.TooltipBody\n $arrowSize={arrowSize}\n $arrowXCoOrdinates={arrowXCoOrdinates}\n $arrowYCoOrdinates={arrowYCoOrdinates}\n $position={position}\n $renderAs={renderAs}\n $tooltipCoOrdinates={tooltipCoOrdinates}\n $tooltipOffset={tooltipOffset}\n $tooltipXCoOrdinates={tooltipXCoOrdinates}\n $tooltipYCoOrdinates={tooltipYCoOrdinates}\n $width={width}\n $widthX={widthX}\n $zIndex={zIndex}\n $background={backgroundColorName}\n $backgroundColor={backgroundColor}\n $arrowColor={arrowColor}\n $borderColor={borderColor}\n $isAnimated={isAnimated}\n >\n {typeof tooltipItem === 'string' ? (\n <Text\n $renderAs={textVariant || 'body3'}\n $color={tooltipVariants[renderAs].textColorName}\n $align=\"center\"\n >\n {tooltipItem}\n </Text>\n ) : (\n tooltipItem\n )}\n </Styled.TooltipBody>\n </Portal>\n )}\n </>\n );\n};\n\nexport default ArrowTooltip;\n"],"names":["DEFAULT_ARROW_SIZE","THROTTLE_DURATION","ArrowTooltip","isAnimated","alwaysVisible","arrowColor","arrowSize","arrowXCoOrdinates","arrowYCoOrdinates","backgroundColor","borderColor","children","hidden","position","renderAs","textVariant","tooltipItem","tooltipOffset","tooltipXCoOrdinates","tooltipYCoOrdinates","width","widthX","zIndex","parentWidth","arrowTooltip","useTheme","tooltipVariants","backgroundColorName","tooltipWrapperRef","useRef","visible","setVisible","useState","tooltipCoOrdinates","setTooltipCoOrdinates","handleVisibleNCoOrdinates","useCallback","newCoOrdinates","visibility","handleVisibility","handleOnMouseEnter","throttle","current","boundingClientRect","_a","computeTooltipNewCoOrdinates","useEffect","jsxs","Fragment","jsx","FlexView","Portal","Styled.TooltipBody","Text","ArrowTooltip$1"],"mappings":";;;;;;;;;AAgBA,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":["../../../../src/features/ui/constants/z-index.ts"],"sourcesContent":["const ZINDEX = {\n CHAPTER_CROWN_ICON: 4,\n CHAPTER_PLUS_ICON: 2,\n CHAPTER_PROGRESS_SVG:
|
1
|
+
{"version":3,"file":"z-index.js","sources":["../../../../src/features/ui/constants/z-index.ts"],"sourcesContent":["const ZINDEX = {\n CHAPTER_CROWN_ICON: 4,\n CHAPTER_PLUS_ICON: 2,\n CHAPTER_PROGRESS_SVG: 2,\n LPAR_SHEET_ITEM_BOTTOM_DASH_BOX: 1,\n LPAR_SHEET_ITEM_TOP_VERTICAL_ICON: 2,\n MODAL: 20,\n SAT_SUMMARY_SCORE: 25, //* SAT_SUMMARY_SCORE > MODAL\n CANVAS_SCRIBBLING: 26, //* CANVAS_SCRIBBLING > Learnosity\n TILE_CONTAINER: 30, //whiteboard\n QUESTION_TIPS: -1,\n DESMOS_CALCULATOR: 2,\n GOAL_CHAPTER_SHEETS_MENU: 4,\n} as const;\n\nexport { ZINDEX };\n"],"names":["ZINDEX"],"mappings":"AAAA,MAAMA,IAAS;AAAA,EACb,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,iCAAiC;AAAA,EACjC,mCAAmC;AAAA,EACnC,OAAO;AAAA,EACP,mBAAmB;AAAA;AAAA,EACnB,mBAAmB;AAAA;AAAA,EACnB,gBAAgB;AAAA;AAAA,EAChB,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,0BAA0B;AAC5B;"}
|
@@ -1,27 +1,41 @@
|
|
1
|
-
import
|
2
|
-
const
|
3
|
-
width:
|
1
|
+
import o from "styled-components";
|
2
|
+
const d = o.div`
|
3
|
+
width: auto;
|
4
4
|
height: fit-content;
|
5
5
|
position: relative;
|
6
6
|
border-radius: 50%;
|
7
|
-
`,
|
8
|
-
({
|
7
|
+
`, f = o.div(
|
8
|
+
({
|
9
|
+
$visible: t,
|
10
|
+
$menuOffset: a,
|
11
|
+
$startLeft: i,
|
12
|
+
$menuZIndex: s,
|
13
|
+
$placeTop: e,
|
14
|
+
$menuWidth: r,
|
15
|
+
$menuWidthX: n,
|
16
|
+
theme: p
|
17
|
+
}) => {
|
18
|
+
const { layout: u } = p;
|
19
|
+
return `
|
9
20
|
position: absolute;
|
10
|
-
|
11
|
-
${n ?
|
12
|
-
|
21
|
+
width: ${r ? `${r}` : "auto"}${typeof r == "number" ? "px" : ""};
|
22
|
+
${n ? `width: ${n * u.gutter}px;` : ""}
|
23
|
+
top: calc(${e ? "0% -" : "100% +"} ${a ?? 0}px);
|
24
|
+
${i ? "left: 0" : "right: 0"};
|
25
|
+
z-index: ${s ?? "unset"};
|
13
26
|
|
14
27
|
transform-origin: top;
|
15
|
-
transform: scaleY(${t ? 1 : 0}) rotate(${
|
28
|
+
transform: scaleY(${t ? 1 : 0}) rotate(${e ? 180 : 0}deg);
|
16
29
|
opacity: ${t ? 1 : 0};
|
17
30
|
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
|
18
|
-
|
19
|
-
|
31
|
+
`;
|
32
|
+
}
|
33
|
+
), $ = o.div(({ $placeTop: t }) => `
|
20
34
|
transform: rotate(${t ? 180 : 0}deg);
|
21
35
|
`);
|
22
36
|
export {
|
23
|
-
|
24
|
-
|
25
|
-
|
37
|
+
$ as MenuElementWrapper,
|
38
|
+
f as OptionsMenuWrapper,
|
39
|
+
d as TargetElementWrapper
|
26
40
|
};
|
27
41
|
//# sourceMappingURL=context-menu-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context-menu-styled.js","sources":["../../../../src/features/ui/context-menu/context-menu-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst TargetElementWrapper = styled.div`\n width:
|
1
|
+
{"version":3,"file":"context-menu-styled.js","sources":["../../../../src/features/ui/context-menu/context-menu-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst TargetElementWrapper = styled.div`\n width: auto;\n height: fit-content;\n position: relative;\n border-radius: 50%;\n`;\n\ninterface IOptionsMenuWrapperProps {\n $visible: boolean;\n $startLeft?: boolean;\n $menuOffset?: number;\n $menuZIndex?: number;\n $placeTop?: boolean;\n $menuWidth?: number | string;\n $menuWidthX?: number;\n}\n\nconst OptionsMenuWrapper = styled.div<IOptionsMenuWrapperProps>(\n ({\n $visible,\n $menuOffset,\n $startLeft,\n $menuZIndex,\n $placeTop,\n $menuWidth,\n $menuWidthX,\n theme,\n }) => {\n const { layout } = theme;\n\n return `\n position: absolute;\n width: ${$menuWidth ? `${$menuWidth}` : 'auto'}${typeof $menuWidth === 'number' ? 'px' : ''};\n ${$menuWidthX ? `width: ${$menuWidthX * layout.gutter}px;` : ''}\n top: calc(${$placeTop ? '0% -' : '100% +'} ${$menuOffset ?? 0}px);\n ${$startLeft ? 'left: 0' : 'right: 0'};\n z-index: ${$menuZIndex ?? 'unset'};\n\n transform-origin: top;\n transform: scaleY(${$visible ? 1 : 0}) rotate(${$placeTop ? 180 : 0}deg);\n opacity: ${$visible ? 1 : 0};\n transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;\n `;\n },\n);\n\ninterface IMenuElementWrapperProps {\n $placeTop?: boolean;\n}\n\nconst MenuElementWrapper = styled.div<IMenuElementWrapperProps>(({ $placeTop }) => {\n return `\n transform: rotate(${$placeTop ? 180 : 0}deg);\n `;\n});\n\nexport { TargetElementWrapper, OptionsMenuWrapper, MenuElementWrapper };\n"],"names":["TargetElementWrapper","styled","OptionsMenuWrapper","$visible","$menuOffset","$startLeft","$menuZIndex","$placeTop","$menuWidth","$menuWidthX","theme","layout","MenuElementWrapper"],"mappings":";AAEA,MAAMA,IAAuBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAiB9BC,IAAqBD,EAAO;AAAA,EAChC,CAAC;AAAA,IACC,UAAAE;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,MACI;AACE,UAAA,EAAE,QAAAC,EAAW,IAAAD;AAEZ,WAAA;AAAA;AAAA,aAEEF,IAAa,GAAGA,CAAU,KAAK,MAAM,GAAG,OAAOA,KAAe,WAAW,OAAO,EAAE;AAAA,MACzFC,IAAc,UAAUA,IAAcE,EAAO,MAAM,QAAQ,EAAE;AAAA,gBACnDJ,IAAY,SAAS,QAAQ,IAAIH,KAAe,CAAC;AAAA,MAC3DC,IAAa,YAAY,UAAU;AAAA,eAC1BC,KAAe,OAAO;AAAA;AAAA;AAAA,wBAGbH,IAAW,IAAI,CAAC,YAAYI,IAAY,MAAM,CAAC;AAAA,eACxDJ,IAAW,IAAI,CAAC;AAAA;AAAA;AAAA,EAG7B;AACF,GAMMS,IAAqBX,EAAO,IAA8B,CAAC,EAAE,WAAAM,QAC1D;AAAA,wBACeA,IAAY,MAAM,CAAC;AAAA,GAE1C;"}
|
@@ -1,27 +1,45 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import { TargetElementWrapper as
|
5
|
-
const
|
6
|
-
({
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
import { jsxs as x, jsx as n } from "react/jsx-runtime";
|
2
|
+
import { memo as a, useRef as W, useEffect as k } from "react";
|
3
|
+
import E from "../hooks/use-context-menu-click-handler.js";
|
4
|
+
import { TargetElementWrapper as j, OptionsMenuWrapper as O, MenuElementWrapper as R } from "./context-menu-styled.js";
|
5
|
+
const T = a(
|
6
|
+
({
|
7
|
+
targetElement: o,
|
8
|
+
menuElement: p,
|
9
|
+
menuOffset: c,
|
10
|
+
startLeft: f,
|
11
|
+
menuZIndex: u,
|
12
|
+
placeTop: t,
|
13
|
+
menuWidth: s,
|
14
|
+
menuWidthX: l,
|
15
|
+
handleOnMenuClick: $,
|
16
|
+
onMenuVisibilityChange: e
|
17
|
+
}) => {
|
18
|
+
const m = W(null), { menuVisible: r, onMenuClick: d } = E(
|
19
|
+
m,
|
20
|
+
$
|
21
|
+
);
|
22
|
+
return k(() => {
|
23
|
+
e == null || e(r);
|
24
|
+
}, [r, e]), /* @__PURE__ */ x(j, { ref: m, onClick: d, children: [
|
25
|
+
o,
|
26
|
+
/* @__PURE__ */ n(
|
27
|
+
O,
|
12
28
|
{
|
13
|
-
$menuOffset:
|
14
|
-
$visible:
|
15
|
-
$startLeft:
|
16
|
-
$menuZIndex:
|
17
|
-
$placeTop:
|
18
|
-
|
29
|
+
$menuOffset: c,
|
30
|
+
$visible: r,
|
31
|
+
$startLeft: f,
|
32
|
+
$menuZIndex: u,
|
33
|
+
$placeTop: t,
|
34
|
+
$menuWidth: s,
|
35
|
+
$menuWidthX: l,
|
36
|
+
children: /* @__PURE__ */ n(R, { $placeTop: t, children: p })
|
19
37
|
}
|
20
38
|
)
|
21
39
|
] });
|
22
40
|
}
|
23
|
-
),
|
41
|
+
), L = T;
|
24
42
|
export {
|
25
|
-
|
43
|
+
L as default
|
26
44
|
};
|
27
45
|
//# sourceMappingURL=context-menu.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { memo, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({
|
1
|
+
{"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { memo, useEffect, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({\n targetElement,\n menuElement,\n menuOffset,\n startLeft,\n menuZIndex,\n placeTop,\n menuWidth,\n menuWidthX,\n handleOnMenuClick,\n onMenuVisibilityChange,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(\n containerRef,\n handleOnMenuClick,\n );\n\n useEffect(() => {\n onMenuVisibilityChange?.(menuVisible);\n }, [menuVisible, onMenuVisibilityChange]);\n\n return (\n <Styled.TargetElementWrapper ref={containerRef} onClick={onMenuClick}>\n {targetElement}\n\n <Styled.OptionsMenuWrapper\n $menuOffset={menuOffset}\n $visible={menuVisible}\n $startLeft={startLeft}\n $menuZIndex={menuZIndex}\n $placeTop={placeTop}\n $menuWidth={menuWidth}\n $menuWidthX={menuWidthX}\n >\n <Styled.MenuElementWrapper $placeTop={placeTop}>{menuElement}</Styled.MenuElementWrapper>\n </Styled.OptionsMenuWrapper>\n </Styled.TargetElementWrapper>\n );\n },\n);\n\nexport default ContextMenu;\n"],"names":["ContextMenu","memo","targetElement","menuElement","menuOffset","startLeft","menuZIndex","placeTop","menuWidth","menuWidthX","handleOnMenuClick","onMenuVisibilityChange","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","useEffect","Styled.TargetElementWrapper","jsx","Styled.OptionsMenuWrapper","Styled.MenuElementWrapper","ContextMenu$1"],"mappings":";;;;AAQA,MAAMA,IAAqCC;AAAA,EACzC,CAAC;AAAA,IACC,eAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,wBAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAeC,EAAuB,IAAI,GAE1C,EAAE,aAAAC,GAAa,aAAAC,EAAA,IAAgBC;AAAA,MACnCJ;AAAA,MACAF;AAAA,IAAA;AAGF,WAAAO,EAAU,MAAM;AACd,MAAAN,KAAA,QAAAA,EAAyBG;AAAA,IAAW,GACnC,CAACA,GAAaH,CAAsB,CAAC,qBAGrCO,GAAA,EAA4B,KAAKN,GAAc,SAASG,GACtD,UAAA;AAAA,MAAAb;AAAA,MAED,gBAAAiB;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAahB;AAAA,UACb,UAAUU;AAAA,UACV,YAAYT;AAAA,UACZ,aAAaC;AAAA,UACb,WAAWC;AAAA,UACX,YAAYC;AAAA,UACZ,aAAaC;AAAA,UAEb,4BAACY,GAAA,EAA0B,WAAWd,GAAW,UAAYJ,GAAA;AAAA,QAAA;AAAA,MAC/D;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAmB,IAAetB;"}
|
@@ -1,30 +1,30 @@
|
|
1
1
|
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
2
2
|
import { memo as g, useState as f } from "react";
|
3
3
|
import t from "styled-components";
|
4
|
-
import { skeletonLoadingAnimation as
|
4
|
+
import { skeletonLoadingAnimation as c } from "../constants/style.js";
|
5
5
|
import i from "../layout/flex-view.js";
|
6
|
-
const
|
7
|
-
animation: ${
|
6
|
+
const p = t(i)`
|
7
|
+
animation: ${c} 2s linear infinite;
|
8
8
|
position: absolute;
|
9
9
|
left: 0;
|
10
10
|
right: 0;
|
11
11
|
top: 0;
|
12
12
|
bottom: 0;
|
13
|
-
`,
|
13
|
+
`, L = t(i)`
|
14
14
|
overflow: hidden;
|
15
15
|
position: relative;
|
16
|
-
`,
|
17
|
-
({ borderRadius:
|
16
|
+
`, u = g(
|
17
|
+
({ borderRadius: n = 0, borderColor: r, withLoader: a, ...o }) => {
|
18
18
|
const { width: s, height: d } = o, [m, l] = f(!0);
|
19
19
|
return /* @__PURE__ */ h(
|
20
|
-
|
20
|
+
L,
|
21
21
|
{
|
22
22
|
$width: s,
|
23
23
|
$height: d,
|
24
|
-
$borderColor:
|
25
|
-
$borderRadius:
|
24
|
+
$borderColor: r,
|
25
|
+
$borderRadius: n,
|
26
26
|
children: [
|
27
|
-
m && a && /* @__PURE__ */ e(
|
27
|
+
m && a && /* @__PURE__ */ e(p, { $inherit: !0 }),
|
28
28
|
/* @__PURE__ */ e("img", { onLoad: () => {
|
29
29
|
l(!1);
|
30
30
|
}, ...o })
|
@@ -32,8 +32,8 @@ const L = t(i)`
|
|
32
32
|
}
|
33
33
|
);
|
34
34
|
}
|
35
|
-
);
|
35
|
+
), F = u;
|
36
36
|
export {
|
37
|
-
|
37
|
+
F as default
|
38
38
|
};
|
39
39
|
//# sourceMappingURL=image.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"image.js","sources":["../../../../src/features/ui/image/image.tsx"],"sourcesContent":["import type { IImageProps } from './image-types';\n\nimport { useState, memo } from 'react';\nimport styled from 'styled-components';\n\nimport { skeletonLoadingAnimation } from '../constants/style';\nimport FlexView from '../layout/flex-view';\n\nconst LoadingFlexView = styled(FlexView)`\n animation: ${skeletonLoadingAnimation} 2s linear infinite;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst ImageWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nconst Image: React.FC<IImageProps> = memo(\n ({ borderRadius = 0, borderColor, withLoader, ...props }) => {\n const { width, height } = props;\n const [isLoading, setIsLoading] = useState(true);\n const handleImgLoaded = () => {\n setIsLoading(false);\n };\n const showLoader = isLoading && withLoader;\n\n return (\n <ImageWrapper\n $width={width}\n $height={height}\n $borderColor={borderColor}\n $borderRadius={borderRadius}\n >\n {showLoader && <LoadingFlexView $inherit={true} />}\n <img onLoad={handleImgLoaded} {...props} />\n </ImageWrapper>\n );\n },\n);\n\nexport default Image;\n"],"names":["LoadingFlexView","styled","FlexView","skeletonLoadingAnimation","ImageWrapper","Image","memo","borderRadius","borderColor","withLoader","props","width","height","isLoading","setIsLoading","useState","jsxs","jsx"],"mappings":";;;;;AAQA,MAAMA,IAAkBC,EAAOC,CAAQ;AAAA,eACxBC,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK9BG,IAA+BC;AAAA,EACnC,CAAC,EAAE,cAAAC,IAAe,GAAG,aAAAC,GAAa,YAAAC,GAAY,GAAGC,QAAY;AACrD,UAAA,EAAE,OAAAC,GAAO,QAAAC,EAAW,IAAAF,GACpB,CAACG,GAAWC,CAAY,IAAIC,EAAS,EAAI;AAO7C,WAAA,gBAAAC;AAAA,MAACZ;AAAA,MAAA;AAAA,QACC,QAAQO;AAAA,QACR,SAASC;AAAA,QACT,cAAcJ;AAAA,QACd,eAAeD;AAAA,QAEd,UAAA;AAAA,UATcM,KAAaJ,KASb,gBAAAQ,EAACjB,GAAgB,EAAA,UAAU,GAAM,CAAA;AAAA,UAC/C,gBAAAiB,EAAA,OAAA,EAAI,QAbe,MAAM;AAC5B,YAAAH,EAAa,EAAK;AAAA,UAAA,GAYe,GAAGJ,EAAO,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG/C;AACF;"}
|
1
|
+
{"version":3,"file":"image.js","sources":["../../../../src/features/ui/image/image.tsx"],"sourcesContent":["import type { IImageProps } from './image-types';\n\nimport { useState, memo } from 'react';\nimport styled from 'styled-components';\n\nimport { skeletonLoadingAnimation } from '../constants/style';\nimport FlexView from '../layout/flex-view';\n\nconst LoadingFlexView = styled(FlexView)`\n animation: ${skeletonLoadingAnimation} 2s linear infinite;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst ImageWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nconst Image: React.FC<IImageProps> = memo(\n ({ borderRadius = 0, borderColor, withLoader, ...props }) => {\n const { width, height } = props;\n const [isLoading, setIsLoading] = useState(true);\n const handleImgLoaded = () => {\n setIsLoading(false);\n };\n const showLoader = isLoading && withLoader;\n\n return (\n <ImageWrapper\n $width={width}\n $height={height}\n $borderColor={borderColor}\n $borderRadius={borderRadius}\n >\n {showLoader && <LoadingFlexView $inherit={true} />}\n <img onLoad={handleImgLoaded} {...props} />\n </ImageWrapper>\n );\n },\n);\n\nexport default Image;\n"],"names":["LoadingFlexView","styled","FlexView","skeletonLoadingAnimation","ImageWrapper","Image","memo","borderRadius","borderColor","withLoader","props","width","height","isLoading","setIsLoading","useState","jsxs","jsx","Image$1"],"mappings":";;;;;AAQA,MAAMA,IAAkBC,EAAOC,CAAQ;AAAA,eACxBC,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK9BG,IAA+BC;AAAA,EACnC,CAAC,EAAE,cAAAC,IAAe,GAAG,aAAAC,GAAa,YAAAC,GAAY,GAAGC,QAAY;AACrD,UAAA,EAAE,OAAAC,GAAO,QAAAC,EAAW,IAAAF,GACpB,CAACG,GAAWC,CAAY,IAAIC,EAAS,EAAI;AAO7C,WAAA,gBAAAC;AAAA,MAACZ;AAAA,MAAA;AAAA,QACC,QAAQO;AAAA,QACR,SAASC;AAAA,QACT,cAAcJ;AAAA,QACd,eAAeD;AAAA,QAEd,UAAA;AAAA,UATcM,KAAaJ,KASb,gBAAAQ,EAACjB,GAAgB,EAAA,UAAU,GAAM,CAAA;AAAA,UAC/C,gBAAAiB,EAAA,OAAA,EAAI,QAbe,MAAM;AAC5B,YAAAH,EAAa,EAAK;AAAA,UAAA,GAYe,GAAGJ,EAAO,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG/C;AACF,GAEAQ,IAAeb;"}
|