@cuemath/leap 3.3.28-af → 3.3.28
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/lottie/lottie.js +2 -2
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector-styled.js +6 -5
- package/dist/features/auth/account-selector/account-selector-styled.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +52 -58
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/account-selector/comps/compact-header/account-selector-header.js +31 -0
- package/dist/features/auth/account-selector/comps/compact-header/account-selector-header.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styled.js +1 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styled.js.map +1 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +6 -6
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
- package/dist/features/auth/comps/pill-button/pill-button.js +19 -19
- package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-list-styled.js +3 -2
- package/dist/features/auth/comps/user-list/user-list-styled.js.map +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js +5 -4
- package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
- package/dist/features/auth/pla-signup/signup-header/signup-header.js +1 -1
- package/dist/features/auth/pla-signup/signup-header/signup-header.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +24 -24
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
- package/dist/features/auth/signup-unavailable/signup-unavailable-styled.js +16 -0
- package/dist/features/auth/signup-unavailable/signup-unavailable-styled.js.map +1 -0
- package/dist/features/auth/signup-unavailable/signup-unavailable-view.js +62 -0
- package/dist/features/auth/signup-unavailable/signup-unavailable-view.js.map +1 -0
- package/dist/features/auth/signup-unavailable/signup-unavailable.js +17 -0
- package/dist/features/auth/signup-unavailable/signup-unavailable.js.map +1 -0
- package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js +6 -6
- package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js.map +1 -1
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +20 -21
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
- package/dist/features/circle-games/games/web-view/web-view-types.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/constants.js +7 -5
- package/dist/features/circle-games/hooks/use-circle-sounds/constants.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/helper.js +19 -0
- package/dist/features/circle-games/hooks/use-circle-sounds/helper.js.map +1 -0
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +104 -101
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
- package/dist/features/circle-games/sign-up/api/use-update-username-api/use-update-username-api.js +9 -0
- package/dist/features/circle-games/sign-up/api/use-update-username-api/use-update-username-api.js.map +1 -0
- package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps.js +12 -12
- package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps.js.map +1 -1
- package/dist/features/circle-games/sign-up/dal/update-username-dal/update-username-dal.js +38 -0
- package/dist/features/circle-games/sign-up/dal/update-username-dal/update-username-dal.js.map +1 -0
- package/dist/features/circle-games/sign-up/sign-up-types.js.map +1 -1
- package/dist/features/circle-games/sign-up/sign-up.js +156 -128
- package/dist/features/circle-games/sign-up/sign-up.js.map +1 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +23 -29
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +1 -1
- 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/use-journey/constants.js +18 -2
- package/dist/features/journey/use-journey/constants.js.map +1 -1
- package/dist/features/journey/use-journey/use-journey.js +10 -7
- package/dist/features/journey/use-journey/use-journey.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/add-custom-chapter.js +42 -40
- package/dist/features/milestone/create/comps/add-custom-chapter/add-custom-chapter.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js +70 -64
- package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js +54 -29
- package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js +48 -28
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +79 -76
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/utils.js +97 -94
- package/dist/features/milestone/create/comps/chapters-selection-step/utils.js.map +1 -1
- package/dist/features/milestone/create/comps/class-details-step/class-details-step.js +160 -143
- package/dist/features/milestone/create/comps/class-details-step/class-details-step.js.map +1 -1
- package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js +22 -12
- package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js.map +1 -1
- package/dist/features/milestone/create/comps/test-type-step/test-type-step.js +64 -59
- package/dist/features/milestone/create/comps/test-type-step/test-type-step.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-container.js +17 -15
- package/dist/features/milestone/create/milestone-create-container.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-helpers.js +170 -153
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-styled.js +1 -1
- package/dist/features/milestone/create/milestone-create-styled.js.map +1 -1
- package/dist/features/milestone/create/milestone-create.js +19 -17
- package/dist/features/milestone/create/milestone-create.js.map +1 -1
- package/dist/features/parent-dashboard/api/get-student-profile-summary.js +9 -0
- package/dist/features/parent-dashboard/api/get-student-profile-summary.js.map +1 -0
- package/dist/features/parent-dashboard/comps/compact-header/compact-header.js +16 -16
- package/dist/features/parent-dashboard/comps/compact-header/compact-header.js.map +1 -1
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs-constants.js +29 -13
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs-constants.js.map +1 -1
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction-styled.js +10 -0
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +44 -0
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +1 -0
- package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js +28 -0
- package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js.map +1 -0
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +34 -44
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
- package/dist/features/parent-dashboard/hooks/use-student-profile-summary-data.js +24 -0
- package/dist/features/parent-dashboard/hooks/use-student-profile-summary-data.js.map +1 -0
- package/dist/features/parent-dashboard/hooks/use-switch-user-journey.js +71 -0
- package/dist/features/parent-dashboard/hooks/use-switch-user-journey.js.map +1 -0
- package/dist/features/parent-dashboard/modals/help-and-support/help-and-support.js +40 -0
- package/dist/features/parent-dashboard/modals/help-and-support/help-and-support.js.map +1 -0
- package/dist/features/parent-dashboard/modals/student-login-info/student-login-info.js +44 -0
- package/dist/features/parent-dashboard/modals/student-login-info/student-login-info.js.map +1 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-helpers.js +32 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-helpers.js.map +1 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js +12 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js.map +1 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js +44 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js.map +1 -0
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js +13 -0
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js.map +1 -0
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js +28 -0
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js.map +1 -0
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-constants.js +43 -0
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-constants.js.map +1 -0
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +61 -0
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -0
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change.js +86 -0
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change.js.map +1 -0
- package/dist/features/parent-dashboard/parent-dashboard-styled.js +2 -2
- package/dist/features/parent-dashboard/parent-dashboard-styled.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-types.js +3 -2
- package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-view.js +143 -131
- package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
- package/dist/features/sentry/constants/ignored.js +10 -6
- package/dist/features/sentry/constants/ignored.js.map +1 -1
- package/dist/features/stickers/constants.js +235 -0
- package/dist/features/stickers/constants.js.map +1 -0
- package/dist/features/{ui/sticker-grid/sticker-grid-styles.js → stickers/sticker-selector/comps/sticker/sticker-styled.js} +15 -45
- package/dist/features/stickers/sticker-selector/comps/sticker/sticker-styled.js.map +1 -0
- package/dist/features/stickers/sticker-selector/comps/sticker/sticker.js +49 -0
- package/dist/features/stickers/sticker-selector/comps/sticker/sticker.js.map +1 -0
- package/dist/features/stickers/sticker-selector/comps/stiker-selector-grid/sticker-selector-grid-styled.js +28 -0
- package/dist/features/stickers/sticker-selector/comps/stiker-selector-grid/sticker-selector-grid-styled.js.map +1 -0
- package/dist/features/stickers/sticker-selector/comps/stiker-selector-grid/sticker-selector-grid.js +26 -0
- package/dist/features/stickers/sticker-selector/comps/stiker-selector-grid/sticker-selector-grid.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker-selector-styled.js +13 -0
- package/dist/features/stickers/sticker-selector/sticker-selector-styled.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js +86 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-animations.js +82 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-animations.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-cache.js +19 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-cache.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js +105 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js +37 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js +67 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js +8 -7
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +1 -1
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +27 -26
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +1 -1
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +16 -16
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +1 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js +40 -35
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals.js +25 -24
- package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js +15 -13
- package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/report-information/report-information.js +1 -1
- package/dist/features/trial-session/comps/session-report/report-information/report-information.js.map +1 -1
- package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js +60 -61
- package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js.map +1 -1
- package/dist/features/trial-session/comps/worksheet/worksheet.js +23 -23
- package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/trial-session/trial-session-view.js +71 -73
- package/dist/features/trial-session/trial-session-view.js.map +1 -1
- package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js +88 -75
- package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +55 -46
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +48 -15
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +46 -38
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/index.d.ts +223 -67
- package/dist/index.js +515 -493
- package/dist/index.js.map +1 -1
- package/dist/static/error.dd744fa5.json +1 -0
- package/dist/static/username.2c755605.json +1 -0
- package/package.json +1 -1
- package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +0 -1
- package/dist/features/ui/sticker-grid/sticker-grid.js +0 -24
- package/dist/features/ui/sticker-grid/sticker-grid.js.map +0 -1
- package/dist/features/ui/sticker-grid/sticker.js +0 -57
- package/dist/features/ui/sticker-grid/sticker.js.map +0 -1
- package/dist/features/ui/stickers/constants.js +0 -6
- package/dist/features/ui/stickers/constants.js.map +0 -1
- package/dist/features/ui/stickers/stickers-effects.js +0 -64
- package/dist/features/ui/stickers/stickers-effects.js.map +0 -1
- package/dist/features/ui/stickers/stickers-styled.js +0 -29
- package/dist/features/ui/stickers/stickers-styled.js.map +0 -1
- package/dist/features/ui/stickers/stickers-utils.js +0 -91
- package/dist/features/ui/stickers/stickers-utils.js.map +0 -1
- package/dist/features/ui/stickers/stickers.js +0 -40
- package/dist/features/ui/stickers/stickers.js.map +0 -1
- package/dist/static/error.cbe1ddde.json +0 -1
- package/dist/static/username.9e034d51.json +0 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { keyframes as i, css as t } from "styled-components";
|
|
2
|
+
import { randomizeDuration as a } from "./stickers-effects-helper.js";
|
|
3
|
+
const r = i`
|
|
4
|
+
0% {
|
|
5
|
+
opacity: 1;
|
|
6
|
+
visibility: visible;
|
|
7
|
+
}
|
|
8
|
+
80% {
|
|
9
|
+
opacity: 0.5;
|
|
10
|
+
}
|
|
11
|
+
100% {
|
|
12
|
+
opacity: 0;
|
|
13
|
+
visibility: visible;
|
|
14
|
+
}
|
|
15
|
+
`, e = i`
|
|
16
|
+
0% {
|
|
17
|
+
transform: translateY(0vh);
|
|
18
|
+
visibility: visible;
|
|
19
|
+
}
|
|
20
|
+
100% {
|
|
21
|
+
transform: translateY(-100vh);
|
|
22
|
+
visibility: visible;
|
|
23
|
+
}
|
|
24
|
+
`, n = i`
|
|
25
|
+
0% {
|
|
26
|
+
transform: translateY(0vh);
|
|
27
|
+
visibility: visible;
|
|
28
|
+
}
|
|
29
|
+
100% {
|
|
30
|
+
transform: translateY(100vh);
|
|
31
|
+
visibility: visible;
|
|
32
|
+
}
|
|
33
|
+
`, o = i`
|
|
34
|
+
0% {
|
|
35
|
+
transform: translateX(var(--from-x)) translateY(var(--from-y)) scale(1);
|
|
36
|
+
visibility: visible;
|
|
37
|
+
}
|
|
38
|
+
100% {
|
|
39
|
+
transform: translateX(0vw) translateY(0vh) scale(1.25);
|
|
40
|
+
visibility: visible;
|
|
41
|
+
}
|
|
42
|
+
`, l = i`
|
|
43
|
+
0% {
|
|
44
|
+
transform: translateX(0) translateY(0vh);
|
|
45
|
+
visibility: visible;
|
|
46
|
+
}
|
|
47
|
+
35% {
|
|
48
|
+
transform: translateX(0) translateY(-50vh) scale(1.25);
|
|
49
|
+
}
|
|
50
|
+
60% {
|
|
51
|
+
transform: translateX(var(--from-x)) translateY(var(--from-y)) scale(1.25);
|
|
52
|
+
}
|
|
53
|
+
100% {
|
|
54
|
+
transform: translateX(var(--from-x)) translateY(-110vh) scale(1.25);
|
|
55
|
+
visibility: visible;
|
|
56
|
+
}
|
|
57
|
+
`, v = {
|
|
58
|
+
"float-up": (s) => t`
|
|
59
|
+
animation:
|
|
60
|
+
${e} ${a(s)}ms ease-out forwards,
|
|
61
|
+
${r} ${a(s)}ms ease-in forwards;
|
|
62
|
+
`,
|
|
63
|
+
"fall-down": (s) => t`
|
|
64
|
+
animation:
|
|
65
|
+
${n} ${a(s)}ms ease-out forwards,
|
|
66
|
+
${r} ${a(s)}ms ease-in forwards;
|
|
67
|
+
`,
|
|
68
|
+
"burst-from-edges": (s) => t`
|
|
69
|
+
animation:
|
|
70
|
+
${o} ${a(s)}ms linear forwards,
|
|
71
|
+
${r} ${a(s)}ms ease-in forwards;
|
|
72
|
+
`,
|
|
73
|
+
"pop-expand": (s) => t`
|
|
74
|
+
animation:
|
|
75
|
+
${l} ${s}ms cubic-bezier(0.5, 0.1, 0.7, 1) forwards,
|
|
76
|
+
${r} ${s}ms ease-in forwards;
|
|
77
|
+
`
|
|
78
|
+
};
|
|
79
|
+
export {
|
|
80
|
+
v as effectAnimations
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=stickers-effects-animations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stickers-effects-animations.js","sources":["../../../../src/features/stickers/stickers-effects/stickers-effects-animations.ts"],"sourcesContent":["import type { IStickersProps } from './stickers-effects-types';\n\nimport { keyframes, css } from 'styled-components';\n\nimport { randomizeDuration } from './stickers-effects-helper';\n\nconst fadeOutEaseIn = keyframes`\n 0% {\n opacity: 1;\n visibility: visible;\n }\n 80% {\n opacity: 0.5;\n }\n 100% {\n opacity: 0;\n visibility: visible;\n }\n`;\n\nconst floatUp = keyframes`\n 0% {\n transform: translateY(0vh);\n visibility: visible;\n }\n 100% {\n transform: translateY(-100vh);\n visibility: visible;\n }\n`;\n\nconst fallDown = keyframes`\n 0% {\n transform: translateY(0vh);\n visibility: visible;\n }\n 100% {\n transform: translateY(100vh);\n visibility: visible;\n }\n`;\n\nconst burstFromEdges = keyframes`\n 0% {\n transform: translateX(var(--from-x)) translateY(var(--from-y)) scale(1);\n visibility: visible;\n }\n 100% {\n transform: translateX(0vw) translateY(0vh) scale(1.25);\n visibility: visible;\n }\n`;\n\nconst popExpand = keyframes`\n 0% {\n transform: translateX(0) translateY(0vh);\n visibility: visible;\n }\n 35% {\n transform: translateX(0) translateY(-50vh) scale(1.25);\n }\n 60% {\n transform: translateX(var(--from-x)) translateY(var(--from-y)) scale(1.25);\n }\n 100% {\n transform: translateX(var(--from-x)) translateY(-110vh) scale(1.25);\n visibility: visible;\n }\n`;\n\nexport const effectAnimations: Record<\n IStickersProps['effect'],\n (duration: number) => ReturnType<typeof css>\n> = {\n 'float-up': (duration: number) => css`\n animation:\n ${floatUp} ${randomizeDuration(duration)}ms ease-out forwards,\n ${fadeOutEaseIn} ${randomizeDuration(duration)}ms ease-in forwards;\n `,\n 'fall-down': (duration: number) => css`\n animation:\n ${fallDown} ${randomizeDuration(duration)}ms ease-out forwards,\n ${fadeOutEaseIn} ${randomizeDuration(duration)}ms ease-in forwards;\n `,\n 'burst-from-edges': (duration: number) => css`\n animation:\n ${burstFromEdges} ${randomizeDuration(duration)}ms linear forwards,\n ${fadeOutEaseIn} ${randomizeDuration(duration)}ms ease-in forwards;\n `,\n 'pop-expand': (duration: number) => css`\n animation:\n ${popExpand} ${duration}ms cubic-bezier(0.5, 0.1, 0.7, 1) forwards,\n ${fadeOutEaseIn} ${duration}ms ease-in forwards;\n `,\n};\n"],"names":["fadeOutEaseIn","keyframes","floatUp","fallDown","burstFromEdges","popExpand","effectAnimations","duration","css","randomizeDuration"],"mappings":";;AAMA,MAAMA,IAAgBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAchBC,IAAUD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWVE,IAAWF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWXG,IAAiBH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWjBI,IAAYJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAiBLK,IAGT;AAAA,EACF,YAAY,CAACC,MAAqBC;AAAA;AAAA,QAE5BN,CAAO,IAAIO,EAAkBF,CAAQ,CAAC;AAAA,QACtCP,CAAa,IAAIS,EAAkBF,CAAQ,CAAC;AAAA;AAAA,EAElD,aAAa,CAACA,MAAqBC;AAAA;AAAA,QAE7BL,CAAQ,IAAIM,EAAkBF,CAAQ,CAAC;AAAA,QACvCP,CAAa,IAAIS,EAAkBF,CAAQ,CAAC;AAAA;AAAA,EAElD,oBAAoB,CAACA,MAAqBC;AAAA;AAAA,QAEpCJ,CAAc,IAAIK,EAAkBF,CAAQ,CAAC;AAAA,QAC7CP,CAAa,IAAIS,EAAkBF,CAAQ,CAAC;AAAA;AAAA,EAElD,cAAc,CAACA,MAAqBC;AAAA;AAAA,QAE9BH,CAAS,IAAIE,CAAQ;AAAA,QACrBP,CAAa,IAAIO,CAAQ;AAAA;AAEjC;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
2
|
+
async function r(t) {
|
|
3
|
+
if (o.has(t))
|
|
4
|
+
return o.get(t);
|
|
5
|
+
if (n.has(t))
|
|
6
|
+
return n.get(t);
|
|
7
|
+
const i = fetch(t).then(async (e) => {
|
|
8
|
+
if (!e.ok) return null;
|
|
9
|
+
const a = t.endsWith(".lottie") ? await e.arrayBuffer() : await e.json();
|
|
10
|
+
return o.set(t, a), a;
|
|
11
|
+
}).catch((e) => (console.error("Lottie preload error:", e), null)).finally(() => {
|
|
12
|
+
n.delete(t);
|
|
13
|
+
});
|
|
14
|
+
return n.set(t, i), i;
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
r as preloadLottieFile
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=stickers-effects-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stickers-effects-cache.js","sources":["../../../../src/features/stickers/stickers-effects/stickers-effects-cache.ts"],"sourcesContent":["import type { Data } from '@lottiefiles/dotlottie-web';\n\nconst lottieCache = new Map<string, Data>();\nconst lottiePromises = new Map<string, Promise<Data | null>>();\n\nexport async function preloadLottieFile(url: string): Promise<Data | null> {\n if (lottieCache.has(url)) {\n return lottieCache.get(url)!;\n }\n\n if (lottiePromises.has(url)) {\n return lottiePromises.get(url)!;\n }\n\n const fetchPromise = fetch(url)\n .then(async res => {\n if (!res.ok) return null;\n\n const isLottieFile = url.endsWith('.lottie');\n const data = isLottieFile ? await res.arrayBuffer() : await res.json();\n\n lottieCache.set(url, data);\n\n return data;\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.error('Lottie preload error:', err);\n\n return null;\n })\n .finally(() => {\n lottiePromises.delete(url);\n });\n\n lottiePromises.set(url, fetchPromise);\n\n return fetchPromise;\n}\n"],"names":["lottieCache","lottiePromises","preloadLottieFile","url","fetchPromise","res","data","err"],"mappings":"AAEA,MAAMA,wBAAkB,OAClBC,wBAAqB;AAE3B,eAAsBC,EAAkBC,GAAmC;AACrE,MAAAH,EAAY,IAAIG,CAAG;AACd,WAAAH,EAAY,IAAIG,CAAG;AAGxB,MAAAF,EAAe,IAAIE,CAAG;AACjB,WAAAF,EAAe,IAAIE,CAAG;AAG/B,QAAMC,IAAe,MAAMD,CAAG,EAC3B,KAAK,OAAME,MAAO;AACb,QAAA,CAACA,EAAI,GAAW,QAAA;AAGd,UAAAC,IADeH,EAAI,SAAS,SAAS,IACf,MAAME,EAAI,gBAAgB,MAAMA,EAAI;AAEpD,WAAAL,EAAA,IAAIG,GAAKG,CAAI,GAElBA;AAAA,EAAA,CACR,EACA,MAAM,CAAOC,OAEJ,QAAA,MAAM,yBAAyBA,CAAG,GAEnC,KACR,EACA,QAAQ,MAAM;AACb,IAAAN,EAAe,OAAOE,CAAG;AAAA,EAAA,CAC1B;AAEY,SAAAF,EAAA,IAAIE,GAAKC,CAAY,GAE7BA;AACT;"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { STICKERS_DATA as k } from "../constants.js";
|
|
2
|
+
const b = (o, e) => {
|
|
3
|
+
const t = Math.ceil(e / 4), a = Math.floor(o / t), m = o % t, p = ["top", "right", "bottom", "left"][a] ?? "left", c = (m + 0.5) / t * 100, i = (Math.random() - 0.5) * 25, r = Math.min(Math.max(c + i, 0), 100), l = 45 + Math.random() * 10, s = 45 + Math.random() * 10;
|
|
4
|
+
let n = 0, h = 0;
|
|
5
|
+
switch (p) {
|
|
6
|
+
case "top":
|
|
7
|
+
n = r - l, h = -s + i;
|
|
8
|
+
break;
|
|
9
|
+
case "right":
|
|
10
|
+
n = 100 - l + i, h = r - s;
|
|
11
|
+
break;
|
|
12
|
+
case "bottom":
|
|
13
|
+
n = r - l, h = 100 - s + i;
|
|
14
|
+
break;
|
|
15
|
+
case "left":
|
|
16
|
+
n = -l + i, h = r - s;
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
fromX: `${n}vw`,
|
|
21
|
+
fromY: `${h}vh`,
|
|
22
|
+
x: l,
|
|
23
|
+
y: s
|
|
24
|
+
};
|
|
25
|
+
}, w = (o, e = 10) => {
|
|
26
|
+
const t = [];
|
|
27
|
+
let a = 0;
|
|
28
|
+
const m = o;
|
|
29
|
+
for (; t.length < o && a < m; ) {
|
|
30
|
+
const d = Math.floor(Math.random() * (100 - 2 * e) + e);
|
|
31
|
+
t.every((p) => Math.abs(p - d) >= e) && t.push(d), a++;
|
|
32
|
+
}
|
|
33
|
+
for (; t.length < o; )
|
|
34
|
+
t.push(Math.floor(Math.random() * (100 - 2 * e) + e));
|
|
35
|
+
return t;
|
|
36
|
+
};
|
|
37
|
+
function y({
|
|
38
|
+
count: o,
|
|
39
|
+
effect: e,
|
|
40
|
+
stickerId: t,
|
|
41
|
+
minSize: a,
|
|
42
|
+
maxSize: m
|
|
43
|
+
}) {
|
|
44
|
+
const d = 100 / o * 2, p = () => Math.random() * (m - a) + a, c = [], i = ["float-up", "fall-down"].includes(e) ? w(o, d) : [];
|
|
45
|
+
for (let r = 0; r < o; r++) {
|
|
46
|
+
const { emoji: l = "", lottieUrl: s } = k.find(({ id: f }) => f === t) || {}, n = p(), h = i[r], M = { id: t, sticker: l, size: n };
|
|
47
|
+
switch (e) {
|
|
48
|
+
case "float-up":
|
|
49
|
+
c.push({
|
|
50
|
+
...M,
|
|
51
|
+
x: h,
|
|
52
|
+
y: 110 + (Math.random() - 0.5) * n,
|
|
53
|
+
lottie: s
|
|
54
|
+
});
|
|
55
|
+
break;
|
|
56
|
+
case "fall-down":
|
|
57
|
+
c.push({
|
|
58
|
+
...M,
|
|
59
|
+
x: h,
|
|
60
|
+
y: -10 + (Math.random() - 0.5) * n,
|
|
61
|
+
lottie: s
|
|
62
|
+
});
|
|
63
|
+
break;
|
|
64
|
+
case "burst-from-edges": {
|
|
65
|
+
const { x: f, y: u, fromX: x, fromY: g } = b(r, o);
|
|
66
|
+
c.push({
|
|
67
|
+
...M,
|
|
68
|
+
x: f,
|
|
69
|
+
y: u,
|
|
70
|
+
fromX: x,
|
|
71
|
+
fromY: g,
|
|
72
|
+
size: n,
|
|
73
|
+
lottie: s
|
|
74
|
+
});
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
case "pop-expand":
|
|
78
|
+
c.push({
|
|
79
|
+
...M,
|
|
80
|
+
x: 50,
|
|
81
|
+
y: 100,
|
|
82
|
+
fromX: `${(Math.random() - 0.5) * 27.5}vw`,
|
|
83
|
+
fromY: `${-50 - Math.random() * 27.5}vh`,
|
|
84
|
+
lottie: s
|
|
85
|
+
});
|
|
86
|
+
break;
|
|
87
|
+
default:
|
|
88
|
+
c.push({
|
|
89
|
+
...M,
|
|
90
|
+
x: Math.random() * 100,
|
|
91
|
+
y: Math.random() * 100
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return c;
|
|
96
|
+
}
|
|
97
|
+
const P = (o, e = 0.2) => {
|
|
98
|
+
const t = o * e, a = o - t, m = o + t;
|
|
99
|
+
return Math.floor(Math.random() * (m - a + 1)) + a;
|
|
100
|
+
};
|
|
101
|
+
export {
|
|
102
|
+
y as generateStickerData,
|
|
103
|
+
P as randomizeDuration
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=stickers-effects-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stickers-effects-helper.js","sources":["../../../../src/features/stickers/stickers-effects/stickers-effects-helper.ts"],"sourcesContent":["import type { TStickerData, IGenerateStickersData } from './stickers-effects-types';\n\nimport { STICKERS_DATA } from '../constants';\n\nconst getBurstPosition = (\n index: number,\n total: number,\n): {\n fromX: string;\n fromY: string;\n x: number;\n y: number;\n} => {\n const countPerSide = Math.ceil(total / 4);\n const sideIndex = Math.floor(index / countPerSide);\n const pos = index % countPerSide;\n\n const sides = ['top', 'right', 'bottom', 'left'] as const;\n const side = sides[sideIndex] ?? 'left';\n\n const basePercent = ((pos + 0.5) / countPerSide) * 100;\n const jitter = (Math.random() - 0.5) * 25;\n const edgePercent = Math.min(Math.max(basePercent + jitter, 0), 100);\n\n const centerX = 45 + Math.random() * 10;\n const centerY = 45 + Math.random() * 10;\n\n let fromX = 0;\n let fromY = 0;\n\n switch (side) {\n case 'top':\n fromX = edgePercent - centerX;\n fromY = -centerY + jitter;\n break;\n case 'right':\n fromX = 100 - centerX + jitter;\n fromY = edgePercent - centerY;\n break;\n case 'bottom':\n fromX = edgePercent - centerX;\n fromY = 100 - centerY + jitter;\n break;\n case 'left':\n fromX = -centerX + jitter;\n fromY = edgePercent - centerY;\n break;\n }\n\n return {\n fromX: `${fromX}vw`,\n fromY: `${fromY}vh`,\n x: centerX,\n y: centerY,\n };\n};\n\nconst getRandomNonOverlappingPositions = (count: number, buffer = 10): number[] => {\n const used: number[] = [];\n let attempts = 0;\n const maxAttempts = count;\n\n while (used.length < count && attempts < maxAttempts) {\n const value = Math.floor(Math.random() * (100 - 2 * buffer) + buffer);\n\n if (used.every(v => Math.abs(v - value) >= buffer)) {\n used.push(value);\n }\n attempts++;\n }\n\n while (used.length < count) {\n used.push(Math.floor(Math.random() * (100 - 2 * buffer) + buffer));\n }\n\n return used;\n};\n\nexport function generateStickerData({\n count,\n effect,\n stickerId,\n minSize,\n maxSize,\n}: IGenerateStickersData): TStickerData[] {\n const buffer = (100 / count) * 2;\n const getSize = () => Math.random() * (maxSize - minSize) + minSize;\n const result: TStickerData[] = [];\n const xPositions = ['float-up', 'fall-down'].includes(effect)\n ? getRandomNonOverlappingPositions(count, buffer)\n : [];\n\n for (let i = 0; i < count; i++) {\n const { emoji: sticker = '', lottieUrl: lottie } =\n STICKERS_DATA.find(({ id }) => id === stickerId) || {};\n\n const size = getSize();\n const x = xPositions[i]!;\n const common = { id: stickerId, sticker, size };\n\n switch (effect) {\n case 'float-up':\n result.push({\n ...common,\n x,\n y: 110 + (Math.random() - 0.5) * size,\n lottie: lottie,\n });\n break;\n\n case 'fall-down':\n result.push({\n ...common,\n x,\n y: -10 + (Math.random() - 0.5) * size,\n lottie: lottie,\n });\n break;\n\n case 'burst-from-edges': {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { x, y, fromX, fromY } = getBurstPosition(i, count);\n\n result.push({\n ...common,\n x,\n y,\n fromX,\n fromY,\n size,\n lottie: lottie,\n });\n break;\n }\n\n case 'pop-expand':\n result.push({\n ...common,\n x: 50,\n y: 100,\n fromX: `${(Math.random() - 0.5) * 27.5}vw`,\n fromY: `${-50 - Math.random() * 27.5}vh`,\n lottie: lottie,\n });\n break;\n\n default:\n result.push({\n ...common,\n x: Math.random() * 100,\n y: Math.random() * 100,\n });\n }\n }\n\n return result;\n}\n\nexport const randomizeDuration = (base: number, variancePercent = 0.2): number => {\n const delta = base * variancePercent;\n const min = base - delta;\n const max = base + delta;\n\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\n"],"names":["getBurstPosition","index","total","countPerSide","sideIndex","pos","side","basePercent","jitter","edgePercent","centerX","centerY","fromX","fromY","getRandomNonOverlappingPositions","count","buffer","used","attempts","maxAttempts","value","v","generateStickerData","effect","stickerId","minSize","maxSize","getSize","result","xPositions","i","sticker","lottie","STICKERS_DATA","id","size","x","common","y","randomizeDuration","base","variancePercent","delta","min","max"],"mappings":"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"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import o, { css as n } from "styled-components";
|
|
2
|
+
import { effectAnimations as r } from "./stickers-effects-animations.js";
|
|
3
|
+
const d = o.div`
|
|
4
|
+
position: relative;
|
|
5
|
+
width: 100vw;
|
|
6
|
+
height: 100vh;
|
|
7
|
+
background: transparent;
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
`, h = o.div`
|
|
10
|
+
position: absolute;
|
|
11
|
+
z-index: 10;
|
|
12
|
+
|
|
13
|
+
left: ${({ x: i }) => `${i}%`};
|
|
14
|
+
top: ${({ y: i }) => `${i}%`};
|
|
15
|
+
width: ${({ size: i }) => `${i}px`};
|
|
16
|
+
height: ${({ size: i }) => `${i}px`};
|
|
17
|
+
font-size: ${({ size: i }) => `${i}px`};
|
|
18
|
+
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
visibility: hidden;
|
|
21
|
+
animation-fill-mode: both;
|
|
22
|
+
|
|
23
|
+
${({ effect: i, duration: $, delay: s = 0, fromX: t, fromY: e }) => n`
|
|
24
|
+
${r[i]($)}
|
|
25
|
+
animation-delay: ${s}ms;
|
|
26
|
+
|
|
27
|
+
${t && e && n`
|
|
28
|
+
--from-x: ${t};
|
|
29
|
+
--from-y: ${e};
|
|
30
|
+
`}
|
|
31
|
+
`}
|
|
32
|
+
`;
|
|
33
|
+
export {
|
|
34
|
+
d as Container,
|
|
35
|
+
h as Sticker
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=stickers-effects-styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stickers-effects-styled.js","sources":["../../../../src/features/stickers/stickers-effects/stickers-effects-styled.ts"],"sourcesContent":["import type { IStickersProps } from './stickers-effects-types';\n\nimport styled, { css } from 'styled-components';\n\nimport { effectAnimations } from './stickers-effects-animations';\n\nexport const Container = styled.div`\n position: relative;\n width: 100vw;\n height: 100vh;\n background: transparent;\n pointer-events: none;\n`;\n\nexport const Sticker = styled.div<{\n effect: IStickersProps['effect'];\n duration: number;\n delay?: number;\n fromX?: string;\n fromY?: string;\n x: number;\n y: number;\n size: number;\n}>`\n position: absolute;\n z-index: 10;\n\n left: ${({ x }) => `${x}%`};\n top: ${({ y }) => `${y}%`};\n width: ${({ size }) => `${size}px`};\n height: ${({ size }) => `${size}px`};\n font-size: ${({ size }) => `${size}px`};\n\n pointer-events: none;\n visibility: hidden;\n animation-fill-mode: both;\n\n ${({ effect, duration, delay = 0, fromX, fromY }) => css`\n ${effectAnimations[effect](duration)}\n animation-delay: ${delay}ms;\n\n ${fromX &&\n fromY &&\n css`\n --from-x: ${fromX};\n --from-y: ${fromY};\n `}\n `}\n`;\n"],"names":["Container","styled","Sticker","x","y","size","effect","duration","delay","fromX","fromY","css","effectAnimations"],"mappings":";;AAMO,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQnBC,IAAUD,EAAO;AAAA;AAAA;AAAA;AAAA,UAapB,CAAC,EAAE,GAAAE,EAAQ,MAAA,GAAGA,CAAC,GAAG;AAAA,SACnB,CAAC,EAAE,GAAAC,EAAQ,MAAA,GAAGA,CAAC,GAAG;AAAA,WAChB,CAAC,EAAE,MAAAC,EAAW,MAAA,GAAGA,CAAI,IAAI;AAAA,YACxB,CAAC,EAAE,MAAAA,EAAW,MAAA,GAAGA,CAAI,IAAI;AAAA,eACtB,CAAC,EAAE,MAAAA,EAAW,MAAA,GAAGA,CAAI,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMpC,CAAC,EAAE,QAAAC,GAAQ,UAAAC,GAAU,OAAAC,IAAQ,GAAG,OAAAC,GAAO,OAAAC,EAAY,MAAAC;AAAA,MACjDC,EAAiBN,CAAM,EAAEC,CAAQ,CAAC;AAAA,uBACjBC,CAAK;AAAA;AAAA,MAEtBC,KACFC,KACAC;AAAA,kBACcF,CAAK;AAAA,kBACLC,CAAK;AAAA,KAClB;AAAA,GACF;AAAA;"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as n, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { memo as p, useState as l, useEffect as d } from "react";
|
|
3
|
+
import E from "../../ui/dot-lottie-animations/dot-lottie-animation.js";
|
|
4
|
+
import { preloadLottieFile as F } from "./stickers-effects-cache.js";
|
|
5
|
+
import { generateStickerData as y } from "./stickers-effects-helper.js";
|
|
6
|
+
import { Container as z, Sticker as L } from "./stickers-effects-styled.js";
|
|
7
|
+
const T = p(({ url: t, sticker: i, size: o }) => {
|
|
8
|
+
const [r, f] = l(), [c, e] = l(!1), s = {
|
|
9
|
+
loop: !0,
|
|
10
|
+
autoplay: !0
|
|
11
|
+
};
|
|
12
|
+
return d(() => {
|
|
13
|
+
let a = !0;
|
|
14
|
+
if (t)
|
|
15
|
+
return F(t).then((m) => {
|
|
16
|
+
a && (m ? f(m) : e(!0));
|
|
17
|
+
}).catch(() => {
|
|
18
|
+
a && e(!0);
|
|
19
|
+
}), () => {
|
|
20
|
+
a = !1;
|
|
21
|
+
};
|
|
22
|
+
}, [t]), !t || c || !r ? /* @__PURE__ */ n(x, { children: i }) : /* @__PURE__ */ n(
|
|
23
|
+
E,
|
|
24
|
+
{
|
|
25
|
+
data: r,
|
|
26
|
+
width: o,
|
|
27
|
+
height: o,
|
|
28
|
+
settings: s,
|
|
29
|
+
onError: () => e(!0)
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}), $ = ({ stickerId: t, effect: i, count: o, duration: r }) => {
|
|
33
|
+
const [f, c] = l([]);
|
|
34
|
+
return d(() => {
|
|
35
|
+
const e = y({
|
|
36
|
+
count: o,
|
|
37
|
+
effect: i,
|
|
38
|
+
stickerId: t,
|
|
39
|
+
minSize: 48,
|
|
40
|
+
maxSize: 72
|
|
41
|
+
});
|
|
42
|
+
c(e);
|
|
43
|
+
const s = setTimeout(() => c([]), r);
|
|
44
|
+
return () => clearTimeout(s);
|
|
45
|
+
}, [i, o, r, t]), /* @__PURE__ */ n(z, { children: f.map((e, s) => {
|
|
46
|
+
const { id: a, sticker: m, lottie: h, x: k, y: S, size: u, fromX: D, fromY: g } = e;
|
|
47
|
+
return /* @__PURE__ */ n(
|
|
48
|
+
L,
|
|
49
|
+
{
|
|
50
|
+
effect: i,
|
|
51
|
+
duration: r,
|
|
52
|
+
delay: 500,
|
|
53
|
+
fromX: D,
|
|
54
|
+
fromY: g,
|
|
55
|
+
x: k,
|
|
56
|
+
y: S,
|
|
57
|
+
size: u,
|
|
58
|
+
children: /* @__PURE__ */ n(T, { url: h, sticker: m, size: u })
|
|
59
|
+
},
|
|
60
|
+
`${a}-${s}`
|
|
61
|
+
);
|
|
62
|
+
}) });
|
|
63
|
+
}, W = p($);
|
|
64
|
+
export {
|
|
65
|
+
W as default
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=stickers-effects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stickers-effects.js","sources":["../../../../src/features/stickers/stickers-effects/stickers-effects.tsx"],"sourcesContent":["import type { TStickerData, IStickersProps } from './stickers-effects-types';\nimport type { Data } from '@lottiefiles/dotlottie-web';\nimport type { FC } from 'react';\n\nimport React, { memo, useEffect, useState } from 'react';\n\nimport DotLottieAnimation from '../../ui/dot-lottie-animations/dot-lottie-animation';\nimport { preloadLottieFile } from './stickers-effects-cache';\nimport { generateStickerData } from './stickers-effects-helper';\nimport * as Styled from './stickers-effects-styled';\n\nconst StickerWithFallback: FC<{\n url?: string;\n sticker: string;\n size: number;\n}> = memo(({ url, sticker, size }) => {\n const [data, setData] = useState<Data>();\n const [failed, setFailed] = useState(false);\n const renderSettings = {\n loop: true,\n autoplay: true,\n };\n\n useEffect(() => {\n let isMounted = true;\n\n if (!url) return;\n\n preloadLottieFile(url)\n .then(result => {\n if (isMounted) {\n if (result) {\n setData(result);\n } else {\n setFailed(true);\n }\n }\n })\n .catch(() => {\n if (isMounted) setFailed(true);\n });\n\n return () => {\n isMounted = false;\n };\n }, [url]);\n\n if (!url || failed || !data) {\n return <>{sticker}</>;\n }\n\n return (\n <DotLottieAnimation\n data={data}\n width={size}\n height={size}\n settings={renderSettings}\n onError={() => setFailed(true)}\n />\n );\n});\n\nconst StickersEffects: React.FC<IStickersProps> = ({ stickerId, effect, count, duration }) => {\n const [stickersData, setStickersData] = useState<ReturnType<typeof generateStickerData>>([]);\n\n useEffect(() => {\n const stickerData = generateStickerData({\n count,\n effect,\n stickerId,\n minSize: 48,\n maxSize: 72,\n });\n\n setStickersData(stickerData);\n\n const timeout = setTimeout(() => setStickersData([]), duration);\n\n return () => clearTimeout(timeout);\n }, [effect, count, duration, stickerId]);\n\n return (\n <Styled.Container>\n {stickersData.map((data: TStickerData, i) => {\n const { id, sticker, lottie, x, y, size, fromX, fromY } = data;\n\n return (\n <Styled.Sticker\n key={`${id}-${i}`}\n effect={effect}\n duration={duration}\n delay={500}\n fromX={fromX}\n fromY={fromY}\n x={x}\n y={y}\n size={size}\n >\n <StickerWithFallback url={lottie} sticker={sticker} size={size} />\n </Styled.Sticker>\n );\n })}\n </Styled.Container>\n );\n};\n\nexport default memo(StickersEffects);\n"],"names":["StickerWithFallback","memo","url","sticker","size","data","setData","useState","failed","setFailed","renderSettings","useEffect","isMounted","preloadLottieFile","result","jsx","DotLottieAnimation","StickersEffects","stickerId","effect","count","duration","stickersData","setStickersData","stickerData","generateStickerData","timeout","Styled.Container","i","id","lottie","x","y","fromX","fromY","Styled.Sticker","stickersEffects"],"mappings":";;;;;;AAWA,MAAMA,IAIDC,EAAK,CAAC,EAAE,KAAAC,GAAK,SAAAC,GAAS,MAAAC,QAAW;AACpC,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAe,GACjC,CAACC,GAAQC,CAAS,IAAIF,EAAS,EAAK,GACpCG,IAAiB;AAAA,IACrB,MAAM;AAAA,IACN,UAAU;AAAA,EAAA;AA2BZ,SAxBAC,EAAU,MAAM;AACd,QAAIC,IAAY;AAEhB,QAAKV;AAEa,aAAAW,EAAAX,CAAG,EAClB,KAAK,CAAUY,MAAA;AACd,QAAIF,MACEE,IACFR,EAAQQ,CAAM,IAEdL,EAAU,EAAI;AAAA,MAElB,CACD,EACA,MAAM,MAAM;AACP,QAAAG,OAAqB,EAAI;AAAA,MAAA,CAC9B,GAEI,MAAM;AACC,QAAAA,IAAA;AAAA,MAAA;AAAA,EACd,GACC,CAACV,CAAG,CAAC,GAEJ,CAACA,KAAOM,KAAU,CAACH,2BACX,UAAQF,EAAA,CAAA,IAIlB,gBAAAY;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAX;AAAA,MACA,OAAOD;AAAA,MACP,QAAQA;AAAA,MACR,UAAUM;AAAA,MACV,SAAS,MAAMD,EAAU,EAAI;AAAA,IAAA;AAAA,EAAA;AAGnC,CAAC,GAEKQ,IAA4C,CAAC,EAAE,WAAAC,GAAW,QAAAC,GAAQ,OAAAC,GAAO,UAAAC,QAAe;AAC5F,QAAM,CAACC,GAAcC,CAAe,IAAIhB,EAAiD,CAAE,CAAA;AAE3F,SAAAI,EAAU,MAAM;AACd,UAAMa,IAAcC,EAAoB;AAAA,MACtC,OAAAL;AAAA,MACA,QAAAD;AAAA,MACA,WAAAD;AAAA,MACA,SAAS;AAAA,MACT,SAAS;AAAA,IAAA,CACV;AAED,IAAAK,EAAgBC,CAAW;AAE3B,UAAME,IAAU,WAAW,MAAMH,EAAgB,CAAE,CAAA,GAAGF,CAAQ;AAEvD,WAAA,MAAM,aAAaK,CAAO;AAAA,KAChC,CAACP,GAAQC,GAAOC,GAAUH,CAAS,CAAC,GAGrC,gBAAAH,EAACY,GAAA,EACE,YAAa,IAAI,CAACtB,GAAoBuB,MAAM;AACrC,UAAA,EAAE,IAAAC,GAAI,SAAA1B,GAAS,QAAA2B,GAAQ,GAAAC,GAAG,GAAAC,GAAG,MAAA5B,GAAM,OAAA6B,GAAO,OAAAC,EAAU,IAAA7B;AAGxD,WAAA,gBAAAU;AAAA,MAACoB;AAAAA,MAAA;AAAA,QAEC,QAAAhB;AAAA,QACA,UAAAE;AAAA,QACA,OAAO;AAAA,QACP,OAAAY;AAAA,QACA,OAAAC;AAAA,QACA,GAAAH;AAAA,QACA,GAAAC;AAAA,QACA,MAAA5B;AAAA,QAEA,UAAC,gBAAAW,EAAAf,GAAA,EAAoB,KAAK8B,GAAQ,SAAA3B,GAAkB,MAAAC,GAAY;AAAA,MAAA;AAAA,MAV3D,GAAGyB,CAAE,IAAID,CAAC;AAAA,IAAA;AAAA,EAapB,CAAA,EACH,CAAA;AAEJ,GAEeQ,IAAAnC,EAAKgB,CAAe;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GIF as e } from "../../../../../assets/gif/gif.js";
|
|
2
|
-
|
|
2
|
+
import { ESummaryType as t } from "../../../../parent-dashboard/parent-dashboard-types.js";
|
|
3
|
+
const n = [
|
|
3
4
|
{
|
|
4
5
|
title: "introduction & goals",
|
|
5
6
|
description: "Get to know your tutor and discuss your goals and expectations",
|
|
@@ -21,17 +22,17 @@ const i = [
|
|
|
21
22
|
textBG: "GREEN_6",
|
|
22
23
|
ctaLabel: "View Learning Plan"
|
|
23
24
|
}
|
|
24
|
-
],
|
|
25
|
+
], r = [
|
|
25
26
|
{
|
|
26
27
|
title: "created student profile",
|
|
27
|
-
|
|
28
|
+
type: t.STUDENT_PROFILE,
|
|
28
29
|
image: e.YOUR_GOALS_GRID_BG,
|
|
29
30
|
textBG: "ORANGE_6",
|
|
30
31
|
ctaLabel: "View Profile"
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
34
|
title: "Shared Learning insights",
|
|
34
|
-
|
|
35
|
+
type: t.INSIGHTS,
|
|
35
36
|
image: e.LEARNING_SESSION_GRID_BG,
|
|
36
37
|
textBG: "YELLOW_6",
|
|
37
38
|
ctaLabel: "View Insights"
|
|
@@ -42,11 +43,11 @@ const i = [
|
|
|
42
43
|
image: e.WAY_FORWARD_GRID_BG,
|
|
43
44
|
textBG: "GREEN_6",
|
|
44
45
|
ctaLabel: "View Learning Plan",
|
|
45
|
-
|
|
46
|
+
type: t.LEARNING_PLAN
|
|
46
47
|
}
|
|
47
48
|
];
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
r as sessionSummaryAfterDemo,
|
|
51
|
+
n as sessionSummaryData
|
|
51
52
|
};
|
|
52
53
|
//# sourceMappingURL=session-summary-constants.js.map
|
package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-summary-constants.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-summary/session-summary-constants.ts"],"sourcesContent":["import type { ISessionSummary } from './session-summary-types';\n\nimport { GIF } from '../../../../../assets/gif/gif';\n\nexport const sessionSummaryData: ISessionSummary[] = [\n {\n title: 'introduction & goals',\n description: 'Get to know your tutor and discuss your goals and expectations',\n image: GIF.YOUR_GOALS_GRID_BG,\n textBG: 'ORANGE_6',\n ctaLabel: 'View Profile',\n },\n {\n title: 'interactive sessions',\n description: 'Watch your child learn concepts and tackle problems with their tutorʼs guidance.',\n image: GIF.LEARNING_SESSION_GRID_BG,\n textBG: 'YELLOW_6',\n ctaLabel: 'View Insights',\n },\n {\n title: 'way forward',\n description: 'Get insights on your child’s learning and plan the journey ahead',\n image: GIF.WAY_FORWARD_GRID_BG,\n textBG: 'GREEN_6',\n ctaLabel: 'View Learning Plan',\n },\n];\n\nexport const sessionSummaryAfterDemo: ISessionSummary[] = [\n {\n title: 'created student profile',\n
|
|
1
|
+
{"version":3,"file":"session-summary-constants.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-summary/session-summary-constants.ts"],"sourcesContent":["import type { ISessionSummary } from './session-summary-types';\n\nimport { GIF } from '../../../../../assets/gif/gif';\nimport { ESummaryType } from '../../../../parent-dashboard/parent-dashboard-types';\n\nexport const sessionSummaryData: ISessionSummary[] = [\n {\n title: 'introduction & goals',\n description: 'Get to know your tutor and discuss your goals and expectations',\n image: GIF.YOUR_GOALS_GRID_BG,\n textBG: 'ORANGE_6',\n ctaLabel: 'View Profile',\n },\n {\n title: 'interactive sessions',\n description: 'Watch your child learn concepts and tackle problems with their tutorʼs guidance.',\n image: GIF.LEARNING_SESSION_GRID_BG,\n textBG: 'YELLOW_6',\n ctaLabel: 'View Insights',\n },\n {\n title: 'way forward',\n description: 'Get insights on your child’s learning and plan the journey ahead',\n image: GIF.WAY_FORWARD_GRID_BG,\n textBG: 'GREEN_6',\n ctaLabel: 'View Learning Plan',\n },\n];\n\nexport const sessionSummaryAfterDemo: ISessionSummary[] = [\n {\n title: 'created student profile',\n type: ESummaryType.STUDENT_PROFILE,\n image: GIF.YOUR_GOALS_GRID_BG,\n textBG: 'ORANGE_6',\n ctaLabel: 'View Profile',\n },\n {\n title: 'Shared Learning insights',\n type: ESummaryType.INSIGHTS,\n image: GIF.LEARNING_SESSION_GRID_BG,\n textBG: 'YELLOW_6',\n ctaLabel: 'View Insights',\n },\n {\n title: 'Created learning plan',\n description: 'Get insights on your child’s learning and plan the journey ahead',\n image: GIF.WAY_FORWARD_GRID_BG,\n textBG: 'GREEN_6',\n ctaLabel: 'View Learning Plan',\n type: ESummaryType.LEARNING_PLAN,\n },\n];\n"],"names":["sessionSummaryData","GIF","sessionSummaryAfterDemo","ESummaryType"],"mappings":";;AAKO,MAAMA,IAAwC;AAAA,EACnD;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOC,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOA,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOA,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AACF,GAEaC,IAA6C;AAAA,EACxD;AAAA,IACE,OAAO;AAAA,IACP,MAAMC,EAAa;AAAA,IACnB,OAAOF,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,MAAME,EAAa;AAAA,IACnB,OAAOF,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOA,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,MAAME,EAAa;AAAA,EACrB;AACF;"}
|
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { jsxs as $, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { memo as T, useCallback as l } from "react";
|
|
3
|
+
import { useTheme as b } from "styled-components";
|
|
4
|
+
import { ESummaryType as n } from "../../../../parent-dashboard/parent-dashboard-types.js";
|
|
5
|
+
import m from "../../../../ui/layout/flex-view.js";
|
|
6
|
+
import g from "../../../../ui/separator/separator.js";
|
|
6
7
|
import x from "../../../../ui/text/text.js";
|
|
7
|
-
import { EDeviceType as
|
|
8
|
-
import { sessionSummaryAfterDemo as
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
const
|
|
8
|
+
import { EDeviceType as S } from "../../../../ui/theme/constants.js";
|
|
9
|
+
import { sessionSummaryAfterDemo as v, sessionSummaryData as E } from "./session-summary-constants.js";
|
|
10
|
+
import I from "./summary-card/summary-card.js";
|
|
11
|
+
const A = T(({ isDemoDone: i, studentName: r, onViewSummary: o }) => {
|
|
12
|
+
const a = b().device <= S.MOBILE, c = l(
|
|
12
13
|
(e) => {
|
|
13
14
|
if (!e) return "";
|
|
14
|
-
if (e ===
|
|
15
|
+
if (e === n.STUDENT_PROFILE)
|
|
15
16
|
return `We understood your goals and expectations to create ${r}'s profile.`;
|
|
16
|
-
if (e ===
|
|
17
|
+
if (e === n.INSIGHTS)
|
|
17
18
|
return `With tutor’s guidance ${r} solved problems, helping us assess their math proficiency.`;
|
|
18
|
-
if (e ===
|
|
19
|
+
if (e === n.LEARNING_PLAN)
|
|
19
20
|
return `The plan will keep evolving based on ${r}'s progress and evolving needs.`;
|
|
20
21
|
},
|
|
21
22
|
[r]
|
|
22
|
-
),
|
|
23
|
+
), p = l(
|
|
23
24
|
(e) => {
|
|
24
25
|
o == null || o(e);
|
|
25
26
|
},
|
|
26
27
|
[o]
|
|
27
28
|
);
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ $(m, { children: [
|
|
29
30
|
/* @__PURE__ */ s(x, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: i ? "What happened in today’s session" : "What happens in the first session?" }),
|
|
30
|
-
/* @__PURE__ */ s(
|
|
31
|
-
/* @__PURE__ */ s(
|
|
32
|
-
({ title: e, description:
|
|
33
|
-
|
|
31
|
+
/* @__PURE__ */ s(g, { height: a ? 16 : 20 }),
|
|
32
|
+
/* @__PURE__ */ s(m, { $flexGapX: 1, $justifyContent: "center", $flexDirection: a ? "column" : "row", children: (i ? v : E).map(
|
|
33
|
+
({ title: e, description: f, image: h, textBG: d, ctaLabel: u, type: t }) => /* @__PURE__ */ s(
|
|
34
|
+
I,
|
|
34
35
|
{
|
|
35
36
|
title: e,
|
|
36
|
-
description:
|
|
37
|
-
image:
|
|
37
|
+
description: t && c(t) || f,
|
|
38
|
+
image: h,
|
|
38
39
|
textBG: d,
|
|
39
|
-
ctaLabel:
|
|
40
|
-
|
|
40
|
+
ctaLabel: u,
|
|
41
|
+
type: t,
|
|
41
42
|
isDemoDone: i,
|
|
42
|
-
onClick:
|
|
43
|
+
onClick: p
|
|
43
44
|
},
|
|
44
45
|
e
|
|
45
46
|
)
|
|
46
47
|
) })
|
|
47
48
|
] });
|
|
48
|
-
}),
|
|
49
|
+
}), H = A;
|
|
49
50
|
export {
|
|
50
|
-
|
|
51
|
+
H as default
|
|
51
52
|
};
|
|
52
53
|
//# sourceMappingURL=session-summary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-summary.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-summary/session-summary.tsx"],"sourcesContent":["import type { ISessionSummaryProps } from './session-summary-types';\n\nimport { memo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport { EDeviceType } from '../../../../ui/theme/constants';\nimport { sessionSummaryAfterDemo, sessionSummaryData } from './session-summary-constants';\nimport SessionSummaryCard from './summary-card/summary-card';\n\nconst SessionSummary = memo(({ isDemoDone, studentName, onViewSummary }: ISessionSummaryProps) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n const getDescription = useCallback(\n (
|
|
1
|
+
{"version":3,"file":"session-summary.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-summary/session-summary.tsx"],"sourcesContent":["import type { ISessionSummaryProps } from './session-summary-types';\n\nimport { memo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ESummaryType } from '../../../../parent-dashboard/parent-dashboard-types';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport { EDeviceType } from '../../../../ui/theme/constants';\nimport { sessionSummaryAfterDemo, sessionSummaryData } from './session-summary-constants';\nimport SessionSummaryCard from './summary-card/summary-card';\n\nconst SessionSummary = memo(({ isDemoDone, studentName, onViewSummary }: ISessionSummaryProps) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n const getDescription = useCallback(\n (type?: ESummaryType) => {\n if (!type) return '';\n\n if (type === ESummaryType.STUDENT_PROFILE) {\n return `We understood your goals and expectations to create ${studentName}'s profile.`;\n }\n\n if (type === ESummaryType.INSIGHTS) {\n return `With tutor’s guidance ${studentName} solved problems, helping us assess their math proficiency.`;\n }\n\n if (type === ESummaryType.LEARNING_PLAN) {\n return `The plan will keep evolving based on ${studentName}'s progress and evolving needs.`;\n }\n },\n [studentName],\n );\n\n const handleClick = useCallback(\n (key: ESummaryType) => {\n onViewSummary?.(key);\n },\n [onViewSummary],\n );\n\n return (\n <FlexView>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n {isDemoDone ? `What happened in today’s session` : `What happens in the first session?`}\n </Text>\n <Separator height={isMobile ? 16 : 20} />\n <FlexView $flexGapX={1} $justifyContent=\"center\" $flexDirection={isMobile ? 'column' : 'row'}>\n {(isDemoDone ? sessionSummaryAfterDemo : sessionSummaryData).map(\n ({ title, description, image, textBG, ctaLabel, type }) => (\n <SessionSummaryCard\n key={title}\n title={title}\n description={(type && getDescription(type)) || (description as string)}\n image={image}\n textBG={textBG}\n ctaLabel={ctaLabel}\n type={type}\n isDemoDone={isDemoDone}\n onClick={handleClick}\n />\n ),\n )}\n </FlexView>\n </FlexView>\n );\n});\n\nexport default SessionSummary;\n"],"names":["SessionSummary","memo","isDemoDone","studentName","onViewSummary","isMobile","useTheme","EDeviceType","getDescription","useCallback","type","ESummaryType","handleClick","key","FlexView","jsx","Text","Separator","sessionSummaryAfterDemo","sessionSummaryData","title","description","image","textBG","ctaLabel","SessionSummaryCard","SessionSummary$1"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAiBC,EAAK,CAAC,EAAE,YAAAC,GAAY,aAAAC,GAAa,eAAAC,QAA0C;AAE1F,QAAAC,IADQC,IACS,UAAUC,EAAY,QAEvCC,IAAiBC;AAAA,IACrB,CAACC,MAAwB;AACnB,UAAA,CAACA,EAAa,QAAA;AAEd,UAAAA,MAASC,EAAa;AACxB,eAAO,uDAAuDR,CAAW;AAGvE,UAAAO,MAASC,EAAa;AACxB,eAAO,yBAAyBR,CAAW;AAGzC,UAAAO,MAASC,EAAa;AACxB,eAAO,wCAAwCR,CAAW;AAAA,IAE9D;AAAA,IACA,CAACA,CAAW;AAAA,EAAA,GAGRS,IAAcH;AAAA,IAClB,CAACI,MAAsB;AACrB,MAAAT,KAAA,QAAAA,EAAgBS;AAAA,IAClB;AAAA,IACA,CAACT,CAAa;AAAA,EAAA;AAGhB,2BACGU,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAU,YAAW,mBAAkB,YAAW,QAAO,SAC5D,UAAad,IAAA,qCAAqC,sCACrD;AAAA,IACC,gBAAAa,EAAAE,GAAA,EAAU,QAAQZ,IAAW,KAAK,IAAI;AAAA,IACtC,gBAAAU,EAAAD,GAAA,EAAS,WAAW,GAAG,iBAAgB,UAAS,gBAAgBT,IAAW,WAAW,OACnF,WAAaH,IAAAgB,IAA0BC,GAAoB;AAAA,MAC3D,CAAC,EAAE,OAAAC,GAAO,aAAAC,GAAa,OAAAC,GAAO,QAAAC,GAAQ,UAAAC,GAAU,MAAAd,QAC9C,gBAAAK;AAAA,QAACU;AAAA,QAAA;AAAA,UAEC,OAAAL;AAAA,UACA,aAAcV,KAAQF,EAAeE,CAAI,KAAOW;AAAA,UAChD,OAAAC;AAAA,UACA,QAAAC;AAAA,UACA,UAAAC;AAAA,UACA,MAAAd;AAAA,UACA,YAAAR;AAAA,UACA,SAASU;AAAA,QAAA;AAAA,QARJQ;AAAA,MASP;AAAA,IAAA,GAGN;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC,GAEDM,IAAe1B;"}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as g, useCallback as p } from "react";
|
|
3
3
|
import { useTheme as u } from "styled-components";
|
|
4
4
|
import b from "../../../../../../assets/line-icons/icons/chevron-right.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import I from "../../../../../ui/buttons/clickable/clickable.js";
|
|
6
|
+
import w from "../../../../../ui/image/image.js";
|
|
7
7
|
import r from "../../../../../ui/layout/flex-view.js";
|
|
8
|
-
import
|
|
8
|
+
import x from "../../../../../ui/separator/separator.js";
|
|
9
9
|
import n from "../../../../../ui/text/text.js";
|
|
10
|
-
import { EDeviceType as
|
|
11
|
-
import { ImageWrapper as
|
|
12
|
-
const _ =
|
|
10
|
+
import { EDeviceType as T } from "../../../../../ui/theme/constants.js";
|
|
11
|
+
import { ImageWrapper as k } from "./summary-card-styled.js";
|
|
12
|
+
const _ = g(
|
|
13
13
|
({
|
|
14
14
|
title: l,
|
|
15
15
|
description: a,
|
|
16
16
|
image: h,
|
|
17
17
|
textBG: c,
|
|
18
|
-
ctaLabel:
|
|
19
|
-
|
|
20
|
-
isDemoDone:
|
|
18
|
+
ctaLabel: d,
|
|
19
|
+
type: o,
|
|
20
|
+
isDemoDone: $,
|
|
21
21
|
onClick: i
|
|
22
22
|
}) => {
|
|
23
|
-
const s = u().device <=
|
|
23
|
+
const s = u().device <= T.MOBILE, f = p(() => {
|
|
24
24
|
o && i && i(o);
|
|
25
25
|
}, [o, i]), m = /* @__PURE__ */ t(r, { $flex: 1, children: [
|
|
26
|
-
/* @__PURE__ */ e(
|
|
26
|
+
/* @__PURE__ */ e(k, { $height: 84, $width: "100%", $background: c, children: /* @__PURE__ */ e(w, { src: h, height: 84, width: "100%", withLoader: !1 }) }),
|
|
27
27
|
/* @__PURE__ */ t(r, { $gap: 12, $gutter: 16, $background: c, $flex: 1, children: [
|
|
28
28
|
/* @__PURE__ */ e(n, { $renderAs: "ac3-black", $renderOnMobileAs: "ac4-black", $color: "WHITE", children: l }),
|
|
29
|
-
/* @__PURE__ */ e(
|
|
29
|
+
/* @__PURE__ */ e(x, { height: s ? 8 : 12 }),
|
|
30
30
|
/* @__PURE__ */ e(n, { $renderAs: "ub3", $color: "WHITE", children: a })
|
|
31
31
|
] })
|
|
32
32
|
] }, l);
|
|
33
|
-
return
|
|
33
|
+
return $ && o && i ? /* @__PURE__ */ t(r, { $flex: 1, children: [
|
|
34
34
|
m,
|
|
35
|
-
/* @__PURE__ */ e(
|
|
35
|
+
/* @__PURE__ */ e(I, { label: o, onClick: f, children: /* @__PURE__ */ e(r, { $background: c, children: /* @__PURE__ */ t(
|
|
36
36
|
r,
|
|
37
37
|
{
|
|
38
38
|
$background: "BLACK_T_38",
|
|
@@ -42,7 +42,7 @@ const _ = p(
|
|
|
42
42
|
$alignItems: "center",
|
|
43
43
|
$justifyContent: "space-between",
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */ e(r, { $gutterX: 0.5, $flexDirection: "row", $alignItems: "center", children: /* @__PURE__ */ e(n, { $renderAs: "ac4", $color: "WHITE_1", children:
|
|
45
|
+
/* @__PURE__ */ e(r, { $gutterX: 0.5, $flexDirection: "row", $alignItems: "center", children: /* @__PURE__ */ e(n, { $renderAs: "ac4", $color: "WHITE_1", children: d }) }),
|
|
46
46
|
/* @__PURE__ */ e(b, { width: 24, height: 24, color: "WHITE" })
|
|
47
47
|
]
|
|
48
48
|
}
|
package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary-card.js","sources":["../../../../../../../src/features/trial-session/comps/pla/session-summary/summary-card/summary-card.tsx"],"sourcesContent":["import type { ISessionSummaryCardProps } from './summary-card-types';\n\nimport { memo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport ChevronRightIcon from '../../../../../../assets/line-icons/icons/chevron-right';\nimport Clickable from '../../../../../ui/buttons/clickable/clickable';\nimport Image from '../../../../../ui/image/image';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Separator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\nimport { EDeviceType } from '../../../../../ui/theme/constants';\nimport * as Styled from './summary-card-styled';\n\nconst SessionSummaryCard = memo(\n ({\n title,\n description,\n image,\n textBG,\n ctaLabel,\n
|
|
1
|
+
{"version":3,"file":"summary-card.js","sources":["../../../../../../../src/features/trial-session/comps/pla/session-summary/summary-card/summary-card.tsx"],"sourcesContent":["import type { ISessionSummaryCardProps } from './summary-card-types';\n\nimport { memo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport ChevronRightIcon from '../../../../../../assets/line-icons/icons/chevron-right';\nimport Clickable from '../../../../../ui/buttons/clickable/clickable';\nimport Image from '../../../../../ui/image/image';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Separator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\nimport { EDeviceType } from '../../../../../ui/theme/constants';\nimport * as Styled from './summary-card-styled';\n\nconst SessionSummaryCard = memo(\n ({\n title,\n description,\n image,\n textBG,\n ctaLabel,\n type,\n isDemoDone,\n onClick,\n }: ISessionSummaryCardProps) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n const handleClick = useCallback(() => {\n if (type && onClick) onClick(type);\n }, [type, onClick]);\n\n const CardContent = (\n <FlexView key={title} $flex={1}>\n <Styled.ImageWrapper $height={84} $width=\"100%\" $background={textBG}>\n <Image src={image} height={84} width=\"100%\" withLoader={false} />\n </Styled.ImageWrapper>\n <FlexView $gap={12} $gutter={16} $background={textBG} $flex={1}>\n <Text $renderAs=\"ac3-black\" $renderOnMobileAs=\"ac4-black\" $color=\"WHITE\">\n {title}\n </Text>\n <Separator height={isMobile ? 8 : 12} />\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n {description}\n </Text>\n </FlexView>\n </FlexView>\n );\n\n return isDemoDone && type && onClick ? (\n <FlexView $flex={1}>\n {CardContent}\n <Clickable label={type} onClick={handleClick}>\n <FlexView $background={textBG}>\n <FlexView\n $background=\"BLACK_T_38\"\n $gapX={0.5}\n $gutterX={0.5}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n >\n <FlexView $gutterX={0.5} $flexDirection=\"row\" $alignItems=\"center\">\n <Text $renderAs=\"ac4\" $color=\"WHITE_1\">\n {ctaLabel}\n </Text>\n </FlexView>\n <ChevronRightIcon width={24} height={24} color=\"WHITE\" />\n </FlexView>\n </FlexView>\n </Clickable>\n </FlexView>\n ) : (\n CardContent\n );\n },\n);\n\nexport default SessionSummaryCard;\n"],"names":["SessionSummaryCard","memo","title","description","image","textBG","ctaLabel","type","isDemoDone","onClick","isMobile","useTheme","EDeviceType","handleClick","useCallback","CardContent","jsxs","FlexView","jsx","Styled.ImageWrapper","Image","Text","Separator","Clickable","ChevronRightIcon"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAqBC;AAAA,EACzB,CAAC;AAAA,IACC,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,YAAAC;AAAA,IACA,SAAAC;AAAA,EAAA,MAC8B;AAExB,UAAAC,IADQC,IACS,UAAUC,EAAY,QAEvCC,IAAcC,EAAY,MAAM;AAChC,MAAAP,KAAQE,KAASA,EAAQF,CAAI;AAAA,IAAA,GAChC,CAACA,GAAME,CAAO,CAAC,GAEZM,IACJ,gBAAAC,EAACC,GAAqB,EAAA,OAAO,GAC3B,UAAA;AAAA,MAAA,gBAAAC,EAACC,GAAA,EAAoB,SAAS,IAAI,QAAO,QAAO,aAAad,GAC3D,4BAACe,GAAM,EAAA,KAAKhB,GAAO,QAAQ,IAAI,OAAM,QAAO,YAAY,GAAO,CAAA,GACjE;AAAA,MACA,gBAAAY,EAACC,KAAS,MAAM,IAAI,SAAS,IAAI,aAAaZ,GAAQ,OAAO,GAC3D,UAAA;AAAA,QAAA,gBAAAa,EAACG,KAAK,WAAU,aAAY,mBAAkB,aAAY,QAAO,SAC9D,UACHnB,EAAA,CAAA;AAAA,QACC,gBAAAgB,EAAAI,GAAA,EAAU,QAAQZ,IAAW,IAAI,IAAI;AAAA,0BACrCW,GAAK,EAAA,WAAU,OAAM,QAAO,SAC1B,UACHlB,GAAA;AAAA,MAAA,GACF;AAAA,IAAA,EAAA,GAZaD,CAaf;AAGF,WAAOM,KAAcD,KAAQE,IAC1B,gBAAAO,EAAAC,GAAA,EAAS,OAAO,GACd,UAAA;AAAA,MAAAF;AAAA,MACD,gBAAAG,EAACK,KAAU,OAAOhB,GAAM,SAASM,GAC/B,UAAA,gBAAAK,EAACD,GAAS,EAAA,aAAaZ,GACrB,UAAA,gBAAAW;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,aAAY;AAAA,UACZ,OAAO;AAAA,UACP,UAAU;AAAA,UACV,gBAAe;AAAA,UACf,aAAY;AAAA,UACZ,iBAAgB;AAAA,UAEhB,UAAA;AAAA,YAAA,gBAAAC,EAACD,GAAS,EAAA,UAAU,KAAK,gBAAe,OAAM,aAAY,UACxD,UAAC,gBAAAC,EAAAG,GAAA,EAAK,WAAU,OAAM,QAAO,WAC1B,YACH,CAAA,GACF;AAAA,8BACCG,GAAiB,EAAA,OAAO,IAAI,QAAQ,IAAI,OAAM,SAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,SAE3D,EACF,CAAA;AAAA,IAAA,EACF,CAAA,IAEAT;AAAA,EAEJ;AACF;"}
|