@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { memo as j, forwardRef as M, useRef as
|
|
2
|
+
import { memo as j, forwardRef as M, useRef as a, useState as g, useCallback as F, useEffect as O, useImperativeHandle as P, useLayoutEffect as z } from "react";
|
|
3
3
|
import { useTheme as D } from "styled-components";
|
|
4
4
|
import V from "../../../../assets/line-icons/icons/back2.js";
|
|
5
5
|
import X from "../../../../assets/line-icons/icons/next2.js";
|
|
@@ -23,23 +23,23 @@ const ne = {
|
|
|
23
23
|
children: I,
|
|
24
24
|
onGoBack: b,
|
|
25
25
|
onNext: v,
|
|
26
|
-
label:
|
|
27
|
-
showNext:
|
|
28
|
-
showPrevious:
|
|
26
|
+
label: l,
|
|
27
|
+
showNext: A,
|
|
28
|
+
showPrevious: S,
|
|
29
29
|
animation: r,
|
|
30
|
-
introFrames:
|
|
31
|
-
outroFrames:
|
|
30
|
+
introFrames: k,
|
|
31
|
+
outroFrames: w,
|
|
32
32
|
isNextLoading: i,
|
|
33
|
-
progressAngle:
|
|
33
|
+
progressAngle: u,
|
|
34
34
|
footerElement: m,
|
|
35
|
-
isNextDisabled:
|
|
35
|
+
isNextDisabled: x,
|
|
36
36
|
animationSrcMobile: R
|
|
37
37
|
}, W) => {
|
|
38
|
-
const t =
|
|
39
|
-
r && t.current && (t.current.playSegments(
|
|
38
|
+
const t = a(null), c = a(null), [p, E] = g(), [L, d] = g(!1), s = a(null), { device: T } = D(), n = T <= G.MOBILE, B = F(() => {
|
|
39
|
+
r && t.current && (t.current.playSegments(k, !0), d(!0));
|
|
40
40
|
}, [r]);
|
|
41
41
|
return O(() => () => {
|
|
42
|
-
|
|
42
|
+
s.current && clearTimeout(s.current);
|
|
43
43
|
}, [r]), P(W, () => ({
|
|
44
44
|
playOutroAndFadeOut: async () => new Promise((H) => {
|
|
45
45
|
var h, $;
|
|
@@ -47,10 +47,10 @@ const ne = {
|
|
|
47
47
|
var C;
|
|
48
48
|
H(), (C = t.current) == null || C.removeEventListener("complete", f);
|
|
49
49
|
};
|
|
50
|
-
(h = t.current) == null || h.playSegments(
|
|
50
|
+
(h = t.current) == null || h.playSegments(w, !0), s.current = setTimeout(() => d(!1), 400), ($ = t.current) == null || $.addEventListener("complete", f);
|
|
51
51
|
})
|
|
52
52
|
})), z(() => {
|
|
53
|
-
|
|
53
|
+
c.current && E(c.current.offsetHeight);
|
|
54
54
|
}, []), /* @__PURE__ */ o(
|
|
55
55
|
J,
|
|
56
56
|
{
|
|
@@ -60,13 +60,13 @@ const ne = {
|
|
|
60
60
|
$justifyContent: "center",
|
|
61
61
|
$width: "100%",
|
|
62
62
|
$height: "100%",
|
|
63
|
-
ref:
|
|
63
|
+
ref: c,
|
|
64
64
|
children: [
|
|
65
|
-
|
|
65
|
+
p && /* @__PURE__ */ e(
|
|
66
66
|
Y,
|
|
67
67
|
{
|
|
68
68
|
width: 1280,
|
|
69
|
-
height:
|
|
69
|
+
height: p,
|
|
70
70
|
src: n ? R ?? r : r,
|
|
71
71
|
ref: t,
|
|
72
72
|
onRender: B,
|
|
@@ -82,20 +82,20 @@ const ne = {
|
|
|
82
82
|
$alignItems: "center",
|
|
83
83
|
$justifyContent: "center",
|
|
84
84
|
children: [
|
|
85
|
-
|
|
85
|
+
u && /* @__PURE__ */ e(
|
|
86
86
|
K,
|
|
87
87
|
{
|
|
88
|
-
radius:
|
|
88
|
+
radius: n ? 145 : 200,
|
|
89
89
|
strokeWidth: 2,
|
|
90
90
|
color: "WHITE",
|
|
91
|
-
targetAngle:
|
|
91
|
+
targetAngle: u,
|
|
92
92
|
mode: "fade",
|
|
93
93
|
duration: 1
|
|
94
94
|
}
|
|
95
95
|
),
|
|
96
96
|
/* @__PURE__ */ o(U, { $isVisible: L, $width: "100%", children: [
|
|
97
|
-
|
|
98
|
-
/* @__PURE__ */ e(q, { $renderAs: "ab2", $color: "WHITE", $align: "center", children:
|
|
97
|
+
l && /* @__PURE__ */ o(N, { $gutterX: n ? 1.5 : 3.5, children: [
|
|
98
|
+
/* @__PURE__ */ e(q, { $renderAs: "ab2", $color: "WHITE", $align: "center", children: l }),
|
|
99
99
|
/* @__PURE__ */ e(_, { heightX: 1 })
|
|
100
100
|
] }),
|
|
101
101
|
/* @__PURE__ */ e(Z, { children: I })
|
|
@@ -104,7 +104,7 @@ const ne = {
|
|
|
104
104
|
}
|
|
105
105
|
),
|
|
106
106
|
m && /* @__PURE__ */ e(ee, { $alignItems: "center", $justifyContent: "center", children: m }),
|
|
107
|
-
|
|
107
|
+
S && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
|
|
108
108
|
y,
|
|
109
109
|
{
|
|
110
110
|
Icon: V,
|
|
@@ -115,7 +115,7 @@ const ne = {
|
|
|
115
115
|
size: "small"
|
|
116
116
|
}
|
|
117
117
|
) }),
|
|
118
|
-
|
|
118
|
+
A && /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e(
|
|
119
119
|
y,
|
|
120
120
|
{
|
|
121
121
|
size: "small",
|
|
@@ -124,7 +124,7 @@ const ne = {
|
|
|
124
124
|
analyticsLabel: "Next",
|
|
125
125
|
onClick: v,
|
|
126
126
|
busy: i,
|
|
127
|
-
disabled: i ||
|
|
127
|
+
disabled: i || x
|
|
128
128
|
}
|
|
129
129
|
) })
|
|
130
130
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circular-step-wrapper.js","sources":["../../../../../src/features/auth/signup/circular-step-wrapper/circular-step-wrapper.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { ICircularStepRef, ICircularStepWrapperProps } from './circular-step-wrapper-types';\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n memo,\n type Ref,\n} from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Back2Icon from '../../../../assets/line-icons/icons/back2';\nimport Next2Icon from '../../../../assets/line-icons/icons/next2';\nimport AnimatedArc from '../../../ui/animated-arc/animated-arc';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport * as Styled from './circular-step-wrapper-styled';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'canvas',\n rendererSettings: {\n preserveAspectRatio: 'xMidYMin slice',\n },\n};\n\nconst CircularStepWrapper = forwardRef<ICircularStepRef, ICircularStepWrapperProps>(\n (\n {\n children,\n onGoBack,\n onNext,\n label,\n showNext,\n showPrevious,\n animation,\n introFrames,\n outroFrames,\n isNextLoading,\n progressAngle,\n footerElement,\n isNextDisabled,\n animationSrcMobile,\n },\n ref: Ref<ICircularStepRef>,\n ) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const [containerHeight, setContainerHeight] = useState<number | undefined>();\n const [showContent, setShowContent] = useState(false);\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n const onLottieRender = useCallback(() => {\n if (animation && animationRef.current) {\n animationRef.current.playSegments(introFrames, true);\n setShowContent(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animation]);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, [animation]);\n\n useImperativeHandle(ref, () => ({\n playOutroAndFadeOut: async () => {\n return new Promise<void>(resolve => {\n const handleComplete = () => {\n resolve();\n animationRef.current?.removeEventListener('complete', handleComplete);\n };\n\n animationRef.current?.playSegments(outroFrames, true);\n timeoutRef.current = setTimeout(() => setShowContent(false), 400);\n animationRef.current?.addEventListener('complete', handleComplete);\n });\n },\n }));\n\n useLayoutEffect(() => {\n if (containerRef.current) {\n setContainerHeight(containerRef.current.offsetHeight);\n }\n }, []);\n\n return (\n <Styled.Container\n $flex={1}\n $flexDirection=\"column\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n ref={containerRef}\n >\n {containerHeight && (\n <LottieAnimation\n width={1280}\n height={containerHeight}\n src={isMobile ? animationSrcMobile ?? animation : animation}\n ref={animationRef}\n onRender={onLottieRender}\n settings={animationSettings}\n />\n )}\n <Styled.CircularStepContainer\n $width={isMobile ? 290 : 400}\n $height={isMobile ? 290 : 400}\n $background=\"REAL_BLACK\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {progressAngle && (\n <AnimatedArc\n radius={
|
|
1
|
+
{"version":3,"file":"circular-step-wrapper.js","sources":["../../../../../src/features/auth/signup/circular-step-wrapper/circular-step-wrapper.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { ICircularStepRef, ICircularStepWrapperProps } from './circular-step-wrapper-types';\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n memo,\n type Ref,\n} from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Back2Icon from '../../../../assets/line-icons/icons/back2';\nimport Next2Icon from '../../../../assets/line-icons/icons/next2';\nimport AnimatedArc from '../../../ui/animated-arc/animated-arc';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport * as Styled from './circular-step-wrapper-styled';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'canvas',\n rendererSettings: {\n preserveAspectRatio: 'xMidYMin slice',\n },\n};\n\nconst CircularStepWrapper = forwardRef<ICircularStepRef, ICircularStepWrapperProps>(\n (\n {\n children,\n onGoBack,\n onNext,\n label,\n showNext,\n showPrevious,\n animation,\n introFrames,\n outroFrames,\n isNextLoading,\n progressAngle,\n footerElement,\n isNextDisabled,\n animationSrcMobile,\n },\n ref: Ref<ICircularStepRef>,\n ) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const [containerHeight, setContainerHeight] = useState<number | undefined>();\n const [showContent, setShowContent] = useState(false);\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n const onLottieRender = useCallback(() => {\n if (animation && animationRef.current) {\n animationRef.current.playSegments(introFrames, true);\n setShowContent(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animation]);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, [animation]);\n\n useImperativeHandle(ref, () => ({\n playOutroAndFadeOut: async () => {\n return new Promise<void>(resolve => {\n const handleComplete = () => {\n resolve();\n animationRef.current?.removeEventListener('complete', handleComplete);\n };\n\n animationRef.current?.playSegments(outroFrames, true);\n timeoutRef.current = setTimeout(() => setShowContent(false), 400);\n animationRef.current?.addEventListener('complete', handleComplete);\n });\n },\n }));\n\n useLayoutEffect(() => {\n if (containerRef.current) {\n setContainerHeight(containerRef.current.offsetHeight);\n }\n }, []);\n\n return (\n <Styled.Container\n $flex={1}\n $flexDirection=\"column\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n ref={containerRef}\n >\n {containerHeight && (\n <LottieAnimation\n width={1280}\n height={containerHeight}\n src={isMobile ? animationSrcMobile ?? animation : animation}\n ref={animationRef}\n onRender={onLottieRender}\n settings={animationSettings}\n />\n )}\n <Styled.CircularStepContainer\n $width={isMobile ? 290 : 400}\n $height={isMobile ? 290 : 400}\n $background=\"REAL_BLACK\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {progressAngle && (\n <AnimatedArc\n radius={isMobile ? 145 : 200}\n strokeWidth={2}\n color=\"WHITE\"\n targetAngle={progressAngle}\n mode=\"fade\"\n duration={1}\n />\n )}\n <Styled.ContentWrapper $isVisible={showContent} $width=\"100%\">\n {label && (\n <FlexView $gutterX={isMobile ? 1.5 : 3.5}>\n <Text $renderAs=\"ab2\" $color=\"WHITE\" $align=\"center\">\n {label}\n </Text>\n <Separator heightX={1} />\n </FlexView>\n )}\n <Styled.InputContainer>{children}</Styled.InputContainer>\n </Styled.ContentWrapper>\n </Styled.CircularStepContainer>\n {footerElement && (\n <Styled.FooterWrapper $alignItems=\"center\" $justifyContent=\"center\">\n {footerElement}\n </Styled.FooterWrapper>\n )}\n {showPrevious && (\n <Styled.PrevButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"black-dark\"\n analyticsLabel=\"Prev\"\n onClick={onGoBack}\n disabled={isNextLoading}\n size=\"small\"\n />\n </Styled.PrevButtonWrapper>\n )}\n {showNext && (\n <Styled.NextButtonWrapper>\n <IconButton\n size=\"small\"\n Icon={Next2Icon}\n renderAs=\"secondary-dark\"\n analyticsLabel=\"Next\"\n onClick={onNext}\n busy={isNextLoading}\n disabled={isNextLoading || isNextDisabled}\n />\n </Styled.NextButtonWrapper>\n )}\n </Styled.Container>\n );\n },\n);\n\nexport default memo(CircularStepWrapper);\n"],"names":["animationSettings","CircularStepWrapper","forwardRef","children","onGoBack","onNext","label","showNext","showPrevious","animation","introFrames","outroFrames","isNextLoading","progressAngle","footerElement","isNextDisabled","animationSrcMobile","ref","animationRef","useRef","containerRef","containerHeight","setContainerHeight","useState","showContent","setShowContent","timeoutRef","device","useTheme","isMobile","EDeviceType","onLottieRender","useCallback","useEffect","useImperativeHandle","resolve","handleComplete","_a","_b","useLayoutEffect","jsxs","Styled.Container","jsx","LottieAnimation","Styled.CircularStepContainer","AnimatedArc","Styled.ContentWrapper","FlexView","Text","Separator","Styled.InputContainer","Styled.FooterWrapper","Styled.PrevButtonWrapper","IconButton","Back2Icon","Styled.NextButtonWrapper","Next2Icon","circularStepWrapper","memo"],"mappings":";;;;;;;;;;;;;AA2BA,MAAMA,KAAoB;AAAA,EACxB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,kBAAkB;AAAA,IAChB,qBAAqB;AAAA,EACvB;AACF,GAEMC,KAAsBC;AAAA,EAC1B,CACE;AAAA,IACE,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,KAEFC,MACG;AACG,UAAAC,IAAeC,EAAmC,IAAI,GACtDC,IAAeD,EAAuB,IAAI,GAC1C,CAACE,GAAiBC,CAAkB,IAAIC,EAA6B,GACrE,CAACC,GAAaC,CAAc,IAAIF,EAAS,EAAK,GAC9CG,IAAaP,EAA8B,IAAI,GAC/C,EAAE,QAAAQ,MAAWC,KACbC,IAAWF,KAAUG,EAAY,QAEjCC,IAAiBC,EAAY,MAAM;AACnC,MAAAvB,KAAaS,EAAa,YACfA,EAAA,QAAQ,aAAaR,GAAa,EAAI,GACnDe,EAAe,EAAI;AAAA,IACrB,GAEC,CAAChB,CAAS,CAAC;AAEd,WAAAwB,EAAU,MACD,MAAM;AACX,MAAIP,EAAW,WACb,aAAaA,EAAW,OAAO;AAAA,IACjC,GAED,CAACjB,CAAS,CAAC,GAEdyB,EAAoBjB,GAAK,OAAO;AAAA,MAC9B,qBAAqB,YACZ,IAAI,QAAc,CAAWkB,MAAA;;AAClC,cAAMC,IAAiB,MAAM;;AACnB,UAAAD,MACKE,IAAAnB,EAAA,YAAA,QAAAmB,EAAS,oBAAoB,YAAYD;AAAA,QAAc;AAGzD,SAAAC,IAAAnB,EAAA,YAAA,QAAAmB,EAAS,aAAa1B,GAAa,KAChDe,EAAW,UAAU,WAAW,MAAMD,EAAe,EAAK,GAAG,GAAG,IACnDa,IAAApB,EAAA,YAAA,QAAAoB,EAAS,iBAAiB,YAAYF;AAAA,MAAc,CAClE;AAAA,IAEH,EAAA,GAEFG,EAAgB,MAAM;AACpB,MAAInB,EAAa,WACIE,EAAAF,EAAa,QAAQ,YAAY;AAAA,IAExD,GAAG,CAAE,CAAA,GAGH,gBAAAoB;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,OAAO;AAAA,QACP,gBAAe;AAAA,QACf,aAAY;AAAA,QACZ,iBAAgB;AAAA,QAChB,QAAO;AAAA,QACP,SAAQ;AAAA,QACR,KAAKrB;AAAA,QAEJ,UAAA;AAAA,UACCC,KAAA,gBAAAqB;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,OAAO;AAAA,cACP,QAAQtB;AAAA,cACR,KAAKQ,IAAWb,KAAsBP,IAAYA;AAAA,cAClD,KAAKS;AAAA,cACL,UAAUa;AAAA,cACV,UAAU/B;AAAA,YAAA;AAAA,UACZ;AAAA,UAEF,gBAAAwC;AAAA,YAACI;AAAAA,YAAA;AAAA,cACC,QAAQf,IAAW,MAAM;AAAA,cACzB,SAASA,IAAW,MAAM;AAAA,cAC1B,aAAY;AAAA,cACZ,aAAY;AAAA,cACZ,iBAAgB;AAAA,cAEf,UAAA;AAAA,gBACChB,KAAA,gBAAA6B;AAAA,kBAACG;AAAA,kBAAA;AAAA,oBACC,QAAQhB,IAAW,MAAM;AAAA,oBACzB,aAAa;AAAA,oBACb,OAAM;AAAA,oBACN,aAAahB;AAAA,oBACb,MAAK;AAAA,oBACL,UAAU;AAAA,kBAAA;AAAA,gBACZ;AAAA,kCAEDiC,GAAA,EAAsB,YAAYtB,GAAa,QAAO,QACpD,UAAA;AAAA,kBAAAlB,KACE,gBAAAkC,EAAAO,GAAA,EAAS,UAAUlB,IAAW,MAAM,KACnC,UAAA;AAAA,oBAAA,gBAAAa,EAACM,KAAK,WAAU,OAAM,QAAO,SAAQ,QAAO,UACzC,UACH1C,EAAA,CAAA;AAAA,oBACA,gBAAAoC,EAACO,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,kBAAA,GACzB;AAAA,kBAED,gBAAAP,EAAAQ,GAAA,EAAuB,UAAA/C,GAAS;AAAA,gBAAA,GACnC;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,UACCW,uBACEqC,IAAA,EAAqB,aAAY,UAAS,iBAAgB,UACxD,UACHrC,GAAA;AAAA,UAEDN,KACC,gBAAAkC,EAACU,IAAA,EACC,UAAA,gBAAAV;AAAA,YAACW;AAAA,YAAA;AAAA,cACC,MAAMC;AAAA,cACN,UAAS;AAAA,cACT,gBAAe;AAAA,cACf,SAASlD;AAAA,cACT,UAAUQ;AAAA,cACV,MAAK;AAAA,YAAA;AAAA,UAAA,GAET;AAAA,UAEDL,KACC,gBAAAmC,EAACa,IAAA,EACC,UAAA,gBAAAb;AAAA,YAACW;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,MAAMG;AAAA,cACN,UAAS;AAAA,cACT,gBAAe;AAAA,cACf,SAASnD;AAAA,cACT,MAAMO;AAAA,cACN,UAAUA,KAAiBG;AAAA,YAAA;AAAA,UAAA,GAE/B;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF,GAEe0C,KAAAC,EAAKzD,EAAmB;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import e from "styled-components";
|
|
2
|
+
import r from "../../ui/layout/flex-view.js";
|
|
3
|
+
const m = e(r)(({ theme: t }) => `
|
|
4
|
+
width: 100%;
|
|
5
|
+
max-width: 480px;
|
|
6
|
+
${t.mediaQueries.minWidthSmallDesktop} {
|
|
7
|
+
max-width: 360px;
|
|
8
|
+
}
|
|
9
|
+
`), a = e(r)`
|
|
10
|
+
max-width: 360px;
|
|
11
|
+
`;
|
|
12
|
+
export {
|
|
13
|
+
a as HeaderWrapper,
|
|
14
|
+
m as Wrapper
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=signup-unavailable-styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signup-unavailable-styled.js","sources":["../../../../src/features/auth/signup-unavailable/signup-unavailable-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\n\nexport const Wrapper = styled(FlexView)(({ theme }) => {\n return `\n width: 100%;\n max-width: 480px;\n ${theme.mediaQueries.minWidthSmallDesktop} {\n max-width: 360px;\n }\n`;\n});\n\nexport const HeaderWrapper = styled(FlexView)`\n max-width: 360px;\n`;\n"],"names":["Wrapper","styled","FlexView","theme","HeaderWrapper"],"mappings":";;AAIO,MAAMA,IAAUC,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAClC;AAAA;AAAA;AAAA,IAGLA,EAAM,aAAa,oBAAoB;AAAA;AAAA;AAAA,CAI1C,GAEYC,IAAgBH,EAAOC,CAAQ;AAAA;AAAA;"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as d } from "react";
|
|
3
|
+
import { useTheme as $ } from "styled-components";
|
|
4
|
+
import m from "../../ui/buttons/text-button/text-button.js";
|
|
5
|
+
import i from "../../ui/layout/flex-view.js";
|
|
6
|
+
import o from "../../ui/separator/separator.js";
|
|
7
|
+
import n from "../../ui/text/text.js";
|
|
8
|
+
import { EDeviceType as h } from "../../ui/theme/constants.js";
|
|
9
|
+
import p from "../pla-signup/onboarding-guide/onboarding-guide.js";
|
|
10
|
+
import l from "../pla-signup/signup-header/signup-header.js";
|
|
11
|
+
import { HeaderWrapper as s, Wrapper as g } from "./signup-unavailable-styled.js";
|
|
12
|
+
const u = ({ onGoToLogin: a }) => {
|
|
13
|
+
const { device: c } = $(), r = c <= h.TABLET;
|
|
14
|
+
return /* @__PURE__ */ t(
|
|
15
|
+
i,
|
|
16
|
+
{
|
|
17
|
+
$alignItems: "center",
|
|
18
|
+
$flex: 1,
|
|
19
|
+
$height: "100%",
|
|
20
|
+
$justifyContent: "space-between",
|
|
21
|
+
$gapX: r ? 0 : 3,
|
|
22
|
+
$width: "100%",
|
|
23
|
+
children: [
|
|
24
|
+
r && /* @__PURE__ */ t(i, { $gapX: 1, $background: "BLACK_4", $width: "100%", $gutterX: 0.75, children: [
|
|
25
|
+
/* @__PURE__ */ e(s, { $gutterX: 0.25, $width: "100%", $alignSelf: "center", children: /* @__PURE__ */ e(l, {}) }),
|
|
26
|
+
/* @__PURE__ */ e(o, { heightX: 2 }),
|
|
27
|
+
/* @__PURE__ */ e(p, {}),
|
|
28
|
+
/* @__PURE__ */ e(o, { heightX: 1.25 })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ t(g, { $flex: 1, $alignSelf: "center", $justifyContent: "center", children: [
|
|
31
|
+
!r && /* @__PURE__ */ e(l, {}),
|
|
32
|
+
/* @__PURE__ */ t(
|
|
33
|
+
i,
|
|
34
|
+
{
|
|
35
|
+
$flex: 1,
|
|
36
|
+
$alignSelf: "center",
|
|
37
|
+
$justifyContent: "center",
|
|
38
|
+
$width: r ? "100%" : "auto",
|
|
39
|
+
$gutterX: r ? 2.5 : 0,
|
|
40
|
+
$gapX: r ? 1.5 : 5,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ e(n, { $renderAs: "ah3-bold", $renderOnMobileAs: "ah4-bold", $color: "WHITE", children: "Sorry! Signup is currently limited to select regions." }),
|
|
43
|
+
/* @__PURE__ */ e(o, { heightX: 1 }),
|
|
44
|
+
/* @__PURE__ */ e(n, { $renderAs: "ab3", $color: "WHITE_T_60", children: "We’re working hard to make our services available worldwide and hope to include your region soon." }),
|
|
45
|
+
/* @__PURE__ */ e(o, { heightX: r ? 2 : 8 }),
|
|
46
|
+
/* @__PURE__ */ t(i, { $flexDirection: "row", $alignItems: "center", children: [
|
|
47
|
+
/* @__PURE__ */ e(n, { $renderAs: "ub3", $color: "WHITE", children: "Already have an account?" }),
|
|
48
|
+
" ",
|
|
49
|
+
/* @__PURE__ */ e(m, { size: "small", label: "Log In", color: "WHITE", onClick: a })
|
|
50
|
+
] })
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}, W = d(u);
|
|
59
|
+
export {
|
|
60
|
+
W as default
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=signup-unavailable-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signup-unavailable-view.js","sources":["../../../../src/features/auth/signup-unavailable/signup-unavailable-view.tsx"],"sourcesContent":["import type { ISignupUnavailableProps } from './signup-unavailable-types';\n\nimport { memo, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport TextButton from '../../ui/buttons/text-button/text-button';\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 OnboardingGuide from '../pla-signup/onboarding-guide/onboarding-guide';\nimport SignupHeader from '../pla-signup/signup-header/signup-header';\nimport * as Styled from './signup-unavailable-styled';\n\nconst SignupUnavailableView: FC<ISignupUnavailableProps> = ({ onGoToLogin }) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n\n return (\n <FlexView\n $alignItems=\"center\"\n $flex={1}\n $height=\"100%\"\n $justifyContent=\"space-between\"\n $gapX={isCompact ? 0 : 3}\n $width=\"100%\"\n >\n {isCompact && (\n <FlexView $gapX={1} $background=\"BLACK_4\" $width=\"100%\" $gutterX={0.75}>\n <Styled.HeaderWrapper $gutterX={0.25} $width=\"100%\" $alignSelf=\"center\">\n <SignupHeader />\n </Styled.HeaderWrapper>\n <Separator heightX={2} />\n <OnboardingGuide />\n <Separator heightX={1.25} />\n </FlexView>\n )}\n\n <Styled.Wrapper $flex={1} $alignSelf=\"center\" $justifyContent=\"center\">\n {!isCompact && <SignupHeader />}\n <FlexView\n $flex={1}\n $alignSelf=\"center\"\n $justifyContent=\"center\"\n $width={isCompact ? '100%' : 'auto'}\n $gutterX={isCompact ? 2.5 : 0}\n $gapX={isCompact ? 1.5 : 5}\n >\n <Text $renderAs=\"ah3-bold\" $renderOnMobileAs=\"ah4-bold\" $color=\"WHITE\">\n Sorry! Signup is currently limited to select regions.\n </Text>\n <Separator heightX={1} />\n <Text $renderAs=\"ab3\" $color=\"WHITE_T_60\">\n We’re working hard to make our services available worldwide and hope to include your\n region soon.\n </Text>\n <Separator heightX={isCompact ? 2 : 8} />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\">\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n Already have an account?\n </Text>\n \n <TextButton size=\"small\" label=\"Log In\" color=\"WHITE\" onClick={onGoToLogin} />\n </FlexView>\n </FlexView>\n </Styled.Wrapper>\n </FlexView>\n );\n};\n\nexport default memo(SignupUnavailableView);\n"],"names":["SignupUnavailableView","onGoToLogin","device","useTheme","isCompact","EDeviceType","jsxs","FlexView","jsx","Styled.HeaderWrapper","SignupHeader","Separator","OnboardingGuide","Styled.Wrapper","Text","TextButton","SignupUnavailableView$1","memo"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAqD,CAAC,EAAE,aAAAC,QAAkB;AACxE,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAYF,KAAUG,EAAY;AAGtC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,aAAY;AAAA,MACZ,OAAO;AAAA,MACP,SAAQ;AAAA,MACR,iBAAgB;AAAA,MAChB,OAAOH,IAAY,IAAI;AAAA,MACvB,QAAO;AAAA,MAEN,UAAA;AAAA,QACCA,KAAA,gBAAAE,EAACC,KAAS,OAAO,GAAG,aAAY,WAAU,QAAO,QAAO,UAAU,MAChE,UAAA;AAAA,UAAC,gBAAAC,EAAAC,GAAA,EAAqB,UAAU,MAAM,QAAO,QAAO,YAAW,UAC7D,UAAC,gBAAAD,EAAAE,GAAA,CAAA,CAAa,EAChB,CAAA;AAAA,UACA,gBAAAF,EAACG,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,4BACtBC,GAAgB,EAAA;AAAA,UACjB,gBAAAJ,EAACG,GAAU,EAAA,SAAS,KAAM,CAAA;AAAA,QAAA,GAC5B;AAAA,QAGF,gBAAAL,EAACO,GAAA,EAAe,OAAO,GAAG,YAAW,UAAS,iBAAgB,UAC3D,UAAA;AAAA,UAAC,CAAAT,uBAAcM,GAAa,EAAA;AAAA,UAC7B,gBAAAJ;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,OAAO;AAAA,cACP,YAAW;AAAA,cACX,iBAAgB;AAAA,cAChB,QAAQH,IAAY,SAAS;AAAA,cAC7B,UAAUA,IAAY,MAAM;AAAA,cAC5B,OAAOA,IAAY,MAAM;AAAA,cAEzB,UAAA;AAAA,gBAAA,gBAAAI,EAACM,KAAK,WAAU,YAAW,mBAAkB,YAAW,QAAO,SAAQ,UAEvE,wDAAA,CAAA;AAAA,gBACA,gBAAAN,EAACG,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,kCACtBG,GAAK,EAAA,WAAU,OAAM,QAAO,cAAa,UAG1C,qGAAA;AAAA,gBACC,gBAAAN,EAAAG,GAAA,EAAU,SAASP,IAAY,IAAI,GAAG;AAAA,gBACtC,gBAAAE,EAAAC,GAAA,EAAS,gBAAe,OAAM,aAAY,UACzC,UAAA;AAAA,kBAAA,gBAAAC,EAACM,GAAK,EAAA,WAAU,OAAM,QAAO,SAAQ,UAErC,4BAAA;AAAA,kBAAO;AAAA,kBAEP,gBAAAN,EAACO,KAAW,MAAK,SAAQ,OAAM,UAAS,OAAM,SAAQ,SAASd,EAAa,CAAA;AAAA,gBAAA,GAC9E;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEee,IAAAC,EAAKjB,CAAqB;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as r } from "react";
|
|
3
|
+
import t from "../comps/auth-page-layout/auth-page-layout.js";
|
|
4
|
+
import a from "../pla-signup/onboarding-guide/onboarding-guide.js";
|
|
5
|
+
import m from "./signup-unavailable-view.js";
|
|
6
|
+
const e = (i) => /* @__PURE__ */ o(
|
|
7
|
+
t,
|
|
8
|
+
{
|
|
9
|
+
leftBlock: /* @__PURE__ */ o(m, { ...i }),
|
|
10
|
+
rightBlock: /* @__PURE__ */ o(a, {}),
|
|
11
|
+
rightBlockBg: "BLACK_3"
|
|
12
|
+
}
|
|
13
|
+
), f = r(e);
|
|
14
|
+
export {
|
|
15
|
+
f as default
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=signup-unavailable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signup-unavailable.js","sources":["../../../../src/features/auth/signup-unavailable/signup-unavailable.tsx"],"sourcesContent":["import type { ISignupUnavailableProps } from './signup-unavailable-types';\n\nimport { memo, type FC } from 'react';\n\nimport AuthPageLayout from '../comps/auth-page-layout/auth-page-layout';\nimport OnboardingGuide from '../pla-signup/onboarding-guide/onboarding-guide';\nimport SignupUnavailableView from './signup-unavailable-view';\n\nconst SignupUnavailable: FC<ISignupUnavailableProps> = props => {\n return (\n <AuthPageLayout\n leftBlock={<SignupUnavailableView {...props} />}\n rightBlock={<OnboardingGuide />}\n rightBlockBg=\"BLACK_3\"\n />\n );\n};\n\nexport default memo(SignupUnavailable);\n"],"names":["SignupUnavailable","props","jsx","AuthPageLayout","SignupUnavailableView","OnboardingGuide","signupUnavailable","memo"],"mappings":";;;;;AAQA,MAAMA,IAAiD,CAASC,MAE5D,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,WAAW,gBAAAD,EAACE,GAAuB,EAAA,GAAGH,EAAO,CAAA;AAAA,IAC7C,8BAAaI,GAAgB,EAAA;AAAA,IAC7B,cAAa;AAAA,EAAA;AAAA,GAKJC,IAAAC,EAAKP,CAAiB;"}
|
package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createGetAPI as
|
|
2
|
-
import { BASE_URL as
|
|
3
|
-
const { useGet:
|
|
4
|
-
getURL: (
|
|
1
|
+
import { createGetAPI as i } from "@cuemath/rest-api";
|
|
2
|
+
import { BASE_URL as r } from "./constants.js";
|
|
3
|
+
const { useGet: a, invalidate: c } = i({
|
|
4
|
+
getURL: (o, { user_id: e, grade: t }) => `${r}/circle-home/?intelenrollment_id=${e}&grade=${t}`
|
|
5
5
|
});
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
c as invalidateCircleHomeAPI,
|
|
8
|
+
a as useGetCircleHomeAPI
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=get-circle-home-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-circle-home-api.js","sources":["../../../../../../src/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.ts"],"sourcesContent":["import type {\n IGetCircleHomeResponseModel,\n IGetCircleHomePayloadModel,\n} from './get-circle-home-api-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL } from './constants';\n\nexport const { useGet: useGetCircleHomeAPI, invalidate: invalidateCircleHomeAPI } = createGetAPI<\n IGetCircleHomeResponseModel,\n IGetCircleHomePayloadModel\n>({\n getURL: (_, { user_id,
|
|
1
|
+
{"version":3,"file":"get-circle-home-api.js","sources":["../../../../../../src/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.ts"],"sourcesContent":["import type {\n IGetCircleHomeResponseModel,\n IGetCircleHomePayloadModel,\n} from './get-circle-home-api-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL } from './constants';\n\nexport const { useGet: useGetCircleHomeAPI, invalidate: invalidateCircleHomeAPI } = createGetAPI<\n IGetCircleHomeResponseModel,\n IGetCircleHomePayloadModel\n>({\n getURL: (_, { user_id, grade }) =>\n `${BASE_URL}/circle-home/?intelenrollment_id=${user_id}&grade=${grade}`,\n});\n"],"names":["useGetCircleHomeAPI","invalidateCircleHomeAPI","createGetAPI","_","user_id","grade","BASE_URL"],"mappings":";;AASO,MAAM,EAAE,QAAQA,GAAqB,YAAYC,EAAA,IAA4BC,EAGlF;AAAA,EACA,QAAQ,CAACC,GAAG,EAAE,SAAAC,GAAS,OAAAC,EACrB,MAAA,GAAGC,CAAQ,oCAAoCF,CAAO,UAAUC,CAAK;AACzE,CAAC;"}
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import { useGetCircleHomeAPI as
|
|
3
|
-
import { transformCircleHomeData as
|
|
4
|
-
const
|
|
5
|
-
const t =
|
|
1
|
+
import { useMemo as H, useState as D, useCallback as s, useEffect as p } from "react";
|
|
2
|
+
import { useGetCircleHomeAPI as u, invalidateCircleHomeAPI as y } from "../../api/get-content-for-today/get-circle-home-api.js";
|
|
3
|
+
import { transformCircleHomeData as c } from "./helper.js";
|
|
4
|
+
const A = (e, a) => {
|
|
5
|
+
const t = H(
|
|
6
6
|
() => ({
|
|
7
7
|
user_id: e,
|
|
8
|
-
grade: a
|
|
9
|
-
country_code: l
|
|
8
|
+
grade: a
|
|
10
9
|
}),
|
|
11
|
-
[e, a
|
|
10
|
+
[e, a]
|
|
12
11
|
), {
|
|
13
12
|
data: o = null,
|
|
14
|
-
get:
|
|
13
|
+
get: l,
|
|
15
14
|
isProcessed: i,
|
|
16
|
-
...
|
|
17
|
-
} =
|
|
18
|
-
|
|
15
|
+
...n
|
|
16
|
+
} = u(e, t), [r, m] = D(
|
|
17
|
+
c(o)
|
|
19
18
|
), C = s(() => {
|
|
20
|
-
|
|
21
|
-
}, [
|
|
22
|
-
|
|
19
|
+
l(e, t);
|
|
20
|
+
}, [l, t, e]), f = s(() => {
|
|
21
|
+
y(e, t);
|
|
23
22
|
}, [t, e]);
|
|
24
|
-
return
|
|
25
|
-
i && o &&
|
|
23
|
+
return p(() => {
|
|
24
|
+
i && o && m(c(o));
|
|
26
25
|
}, [o, i]), {
|
|
27
|
-
data:
|
|
26
|
+
data: r,
|
|
28
27
|
isProcessed: i,
|
|
29
28
|
getCircleHomeDetails: C,
|
|
30
|
-
invalidateCircleHomeDetails:
|
|
31
|
-
...
|
|
29
|
+
invalidateCircleHomeDetails: f,
|
|
30
|
+
...n
|
|
32
31
|
};
|
|
33
32
|
};
|
|
34
33
|
export {
|
|
35
|
-
|
|
34
|
+
A as useGetCircleHomeDetailsDal
|
|
36
35
|
};
|
|
37
36
|
//# sourceMappingURL=use-get-circle-home-details-dal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-get-circle-home-details-dal.js","sources":["../../../../../../src/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.ts"],"sourcesContent":["import type { ICircleHomeDetails } from './use-get-circle-home-dal-types';\n\nimport { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n invalidateCircleHomeAPI,\n useGetCircleHomeAPI,\n} from '../../api/get-content-for-today/get-circle-home-api';\nimport { transformCircleHomeData } from './helper';\n\nexport const useGetCircleHomeDetailsDal = (\n userId: string,\n grade: string,\n
|
|
1
|
+
{"version":3,"file":"use-get-circle-home-details-dal.js","sources":["../../../../../../src/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.ts"],"sourcesContent":["import type { ICircleHomeDetails } from './use-get-circle-home-dal-types';\n\nimport { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n invalidateCircleHomeAPI,\n useGetCircleHomeAPI,\n} from '../../api/get-content-for-today/get-circle-home-api';\nimport { transformCircleHomeData } from './helper';\n\nexport const useGetCircleHomeDetailsDal = (\n userId: string,\n grade: string,\n): Omit<ReturnType<typeof useGetCircleHomeAPI>, 'data' | 'get'> & {\n data: ICircleHomeDetails | null;\n getCircleHomeDetails: () => void;\n invalidateCircleHomeDetails: () => void;\n} => {\n const initialQuery = useMemo(\n () => ({\n user_id: userId,\n grade,\n }),\n [userId, grade],\n );\n\n const {\n data = null,\n get: getHomeDetails,\n isProcessed,\n ...rest\n } = useGetCircleHomeAPI(userId, initialQuery);\n const [contentForToday, setContentForToday] = useState<ICircleHomeDetails | null>(\n transformCircleHomeData(data),\n );\n\n const getCircleHomeDetails = useCallback(() => {\n getHomeDetails(userId, initialQuery);\n }, [getHomeDetails, initialQuery, userId]);\n\n const invalidateCircleHomeDetails = useCallback(() => {\n invalidateCircleHomeAPI(userId, initialQuery);\n }, [initialQuery, userId]);\n\n useEffect(() => {\n if (isProcessed && data) {\n setContentForToday(transformCircleHomeData(data));\n }\n }, [data, isProcessed]);\n\n return {\n data: contentForToday,\n isProcessed,\n getCircleHomeDetails,\n invalidateCircleHomeDetails,\n ...rest,\n };\n};\n"],"names":["useGetCircleHomeDetailsDal","userId","grade","initialQuery","useMemo","data","getHomeDetails","isProcessed","rest","useGetCircleHomeAPI","contentForToday","setContentForToday","useState","transformCircleHomeData","getCircleHomeDetails","useCallback","invalidateCircleHomeDetails","invalidateCircleHomeAPI","useEffect"],"mappings":";;;AAUa,MAAAA,IAA6B,CACxCC,GACAC,MAKG;AACH,QAAMC,IAAeC;AAAA,IACnB,OAAO;AAAA,MACL,SAASH;AAAA,MACT,OAAAC;AAAA,IAAA;AAAA,IAEF,CAACD,GAAQC,CAAK;AAAA,EAAA,GAGV;AAAA,IACJ,MAAAG,IAAO;AAAA,IACP,KAAKC;AAAA,IACL,aAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDC,EAAoBR,GAAQE,CAAY,GACtC,CAACO,GAAiBC,CAAkB,IAAIC;AAAA,IAC5CC,EAAwBR,CAAI;AAAA,EAAA,GAGxBS,IAAuBC,EAAY,MAAM;AAC7C,IAAAT,EAAeL,GAAQE,CAAY;AAAA,EAClC,GAAA,CAACG,GAAgBH,GAAcF,CAAM,CAAC,GAEnCe,IAA8BD,EAAY,MAAM;AACpD,IAAAE,EAAwBhB,GAAQE,CAAY;AAAA,EAAA,GAC3C,CAACA,GAAcF,CAAM,CAAC;AAEzB,SAAAiB,EAAU,MAAM;AACd,IAAIX,KAAeF,KACEM,EAAAE,EAAwBR,CAAI,CAAC;AAAA,EAClD,GACC,CAACA,GAAME,CAAW,CAAC,GAEf;AAAA,IACL,MAAMG;AAAA,IACN,aAAAH;AAAA,IACA,sBAAAO;AAAA,IACA,6BAAAE;AAAA,IACA,GAAGR;AAAA,EAAA;AAEP;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-view-types.js","sources":["../../../../../src/features/circle-games/games/web-view/web-view-types.ts"],"sourcesContent":["import type { IAvatarLayer } from '../../../ui/avatar/avatar-types';\nimport type { TUserTypes } from '../../../ui/types';\nimport type { WebViewEvent, ProjectOutcome, ProjectType } from './enums';\nimport type { WEBVIEW_ANALYTICS_EVENTS } from './web-view-analytics-events';\nimport type { IframeHTMLAttributes } from 'react';\n\nexport interface IPlayer {\n id: string;\n username: string;\n grade?: string;\n avatar?: IAvatarLayer[] | null;\n playerType: TUserTypes;\n
|
|
1
|
+
{"version":3,"file":"web-view-types.js","sources":["../../../../../src/features/circle-games/games/web-view/web-view-types.ts"],"sourcesContent":["import type { IAvatarLayer } from '../../../ui/avatar/avatar-types';\nimport type { TUserTypes } from '../../../ui/types';\nimport type { WebViewEvent, ProjectOutcome, ProjectType } from './enums';\nimport type { WEBVIEW_ANALYTICS_EVENTS } from './web-view-analytics-events';\nimport type { IframeHTMLAttributes } from 'react';\n\nexport interface IPlayer {\n id: string;\n username: string;\n grade?: string;\n avatar?: IAvatarLayer[] | null;\n playerType: TUserTypes;\n isAdmin?: boolean;\n}\n\ninterface ISyncableWebGameProps {\n joinByRoomId?: string;\n enableSync?: boolean; // applicable for all except multiplayer games and tables\n}\n\ninterface IBaseWebGameProps {\n projectId: string;\n variant: string;\n projectType: ProjectType;\n enableCloseButton?: boolean;\n}\n\nexport interface IMultiplayerWebGameProps extends IBaseWebGameProps, ISyncableWebGameProps {\n enablePlayerTurnIndicators?: boolean;\n}\n\nexport interface IPuzzleWebGameProps extends IBaseWebGameProps, ISyncableWebGameProps {\n question: string;\n askHintPermission?: boolean;\n}\n\nexport interface ILessonWebGameProps extends IBaseWebGameProps, ISyncableWebGameProps {\n miniGameIdentifier: string;\n sessionId: string;\n targetQuestions: number;\n}\n\nexport interface ITableWebGameProps extends IBaseWebGameProps {\n tableNumber: number;\n infiniteModeHighScore?: number;\n}\n\nexport interface IVibrationPattern {\n pattern: number[] | number;\n}\n\nexport enum IStatsToAwardErrorCode {\n DEFAULT = 'default',\n SUCCESS = 'success',\n FAIL = 'fail',\n}\n\nexport interface IPlayerStats {\n points: number;\n accuracy: number;\n timeSpent: number;\n streakDays: number;\n streakStatusToday: 'pending' | 'completed';\n errorCode: IStatsToAwardErrorCode;\n outcome: ProjectOutcome;\n value: string;\n starEligibleTime?: number;\n starEligibleAccuracy?: number;\n starRewarded?: boolean;\n}\n\nexport interface IInfoMessage {\n message: string;\n position: 'top' | 'bottom';\n}\n\nexport interface ITrackEvent {\n eventName: typeof WEBVIEW_ANALYTICS_EVENTS;\n properties: Record<string, unknown>;\n}\n\nexport interface IWebViewProps extends IframeHTMLAttributes<HTMLIFrameElement> {\n baseUrl: string;\n projectDetails:\n | IMultiplayerWebGameProps\n | IPuzzleWebGameProps\n | ILessonWebGameProps\n | ITableWebGameProps;\n parentDomain: string;\n playerDetails: IPlayer;\n onBack?: () => void;\n onGameLoad?: () => void;\n onGamePlayFinish?: (playerStats: IPlayerStats) => void;\n handleInfoMessage?: (infoMessage: IInfoMessage) => void;\n}\n\nexport interface IMessageProps {\n event: `${WebViewEvent}`;\n payload: IVibrationPattern | IPlayerStats | IInfoMessage | ITrackEvent | null;\n}\n"],"names":["IStatsToAwardErrorCode"],"mappings":"AAmDY,IAAAA,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,UAAU,WACVA,EAAA,OAAO,QAHGA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CircleSoundKey as c } from "./use-circle-sounds-enums.js";
|
|
2
|
-
const e = "https://cuemath-circle.s3.ap-southeast-1.amazonaws.com/assets/sounds/production", r = "https://static.cuemath.com/static/sounds",
|
|
2
|
+
const e = "https://cuemath-circle.s3.ap-southeast-1.amazonaws.com/assets/sounds/production", r = "https://static.cuemath.com/static/sounds", t = {
|
|
3
3
|
[c.BACKGROUND]: `${e}/bg-sound.mp3`,
|
|
4
4
|
[c.BACKGROUND_RUSHHOUR]: `${e}/circle-background-rushhour.mp3`,
|
|
5
5
|
[c.TUTORIAL]: `${e}/bg-sound-tutorials.mp3`,
|
|
@@ -28,14 +28,16 @@ const e = "https://cuemath-circle.s3.ap-southeast-1.amazonaws.com/assets/sounds/
|
|
|
28
28
|
[c.ALL_DONE]: `${e}/all-done.mp3`,
|
|
29
29
|
[c.DOING_GREAT]: `${e}/doing-great.mp3`,
|
|
30
30
|
[c.KEEP_IT_UP]: `${e}/keep-it-up.mp3`
|
|
31
|
-
},
|
|
31
|
+
}, i = [
|
|
32
32
|
c.SWIPE_04,
|
|
33
33
|
c.SWIPE_02,
|
|
34
34
|
c.SWIPE_03,
|
|
35
35
|
c.SWIPE_01
|
|
36
|
-
];
|
|
36
|
+
], _ = 100, s = 0.1;
|
|
37
37
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
t as CircleSoundKeyMapper,
|
|
39
|
+
i as SWIPE_SOUND_ORDER,
|
|
40
|
+
_ as VOLUME_FADE_DURATION,
|
|
41
|
+
s as VOLUME_TO_CHANGE
|
|
40
42
|
};
|
|
41
43
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../../src/features/circle-games/hooks/use-circle-sounds/constants.ts"],"sourcesContent":["import { CircleSoundKey } from './use-circle-sounds-enums';\n\nconst BASE_URL = 'https://cuemath-circle.s3.ap-southeast-1.amazonaws.com/assets/sounds/production';\n\nconst STATIC_BASE_URL = 'https://static.cuemath.com/static/sounds';\n\nexport const CircleSoundKeyMapper = {\n [CircleSoundKey.BACKGROUND]: `${BASE_URL}/bg-sound.mp3`,\n [CircleSoundKey.BACKGROUND_RUSHHOUR]: `${BASE_URL}/circle-background-rushhour.mp3`,\n [CircleSoundKey.TUTORIAL]: `${BASE_URL}/bg-sound-tutorials.mp3`,\n [CircleSoundKey.SWIPE_01]: `${BASE_URL}/circle-swipe-1.wav`,\n [CircleSoundKey.SWIPE_02]: `${BASE_URL}/circle-swipe-2.wav`,\n [CircleSoundKey.SWIPE_03]: `${BASE_URL}/circle-swipe-3.wav`,\n [CircleSoundKey.SWIPE_04]: `${BASE_URL}/circle-swipe-4.wav`,\n [CircleSoundKey.SWIPE_DOWN]: `${BASE_URL}/circle-swipe-down-1.wav`,\n [CircleSoundKey.TOGGLE]: `${BASE_URL}/circle-button-v3.wav`,\n [CircleSoundKey.POINTS_AWARDED]: `${BASE_URL}/circle-points-v1.wav`,\n [CircleSoundKey.POINTS_ADDED]: `${BASE_URL}/circle-points-add-v1.wav`,\n [CircleSoundKey.GAME_CARD_CLICK]: `${BASE_URL}/circle-gamecard-button-v1.wav`,\n [CircleSoundKey.CLOCK_IN]: `${BASE_URL}/circle-meter-v1.wav`,\n [CircleSoundKey.CLOCK_OUT]: `${BASE_URL}/circle-disappear-v1.wav`,\n [CircleSoundKey.ACCURACY_IN]: `${BASE_URL}/circle-meter-v1.wav`,\n [CircleSoundKey.ACCURACY_OUT]: `${BASE_URL}/circle-disappear-v1.wav`,\n [CircleSoundKey.STREAK_IN]: `${BASE_URL}/circle-streak-v1.wav`,\n [CircleSoundKey.STREAK_OUT]: `${BASE_URL}/circle-disappear-v1.wav`,\n [CircleSoundKey.ACCURACY_INTRO]: `${STATIC_BASE_URL}/accuracy-intro.mp3`,\n [CircleSoundKey.ACCURACY_TARGET]: `${STATIC_BASE_URL}/accuracy-target.mp3`,\n [CircleSoundKey.TIME_INTRO]: `${STATIC_BASE_URL}/timer-intro.mp3`,\n [CircleSoundKey.TIME_TARGET]: `${STATIC_BASE_URL}/timer-target.mp3`,\n [CircleSoundKey.METER_FILL]: `${STATIC_BASE_URL}/meter-fill.mp3`,\n [CircleSoundKey.YOUR_SCORE]: `${BASE_URL}/your-score.mp3`,\n [CircleSoundKey.HIGH_SCORE]: `${BASE_URL}/high-score.mp3`,\n [CircleSoundKey.ALL_DONE]: `${BASE_URL}/all-done.mp3`,\n [CircleSoundKey.DOING_GREAT]: `${BASE_URL}/doing-great.mp3`,\n [CircleSoundKey.KEEP_IT_UP]: `${BASE_URL}/keep-it-up.mp3`,\n};\n\nexport const SWIPE_SOUND_ORDER = [\n CircleSoundKey.SWIPE_04,\n CircleSoundKey.SWIPE_02,\n CircleSoundKey.SWIPE_03,\n CircleSoundKey.SWIPE_01,\n];\n\nexport const VOLUME_FADE_DURATION = 100; // in milliseconds\nexport const VOLUME_TO_CHANGE = 0.1; // volume change per fade step\n"],"names":["BASE_URL","STATIC_BASE_URL","CircleSoundKeyMapper","CircleSoundKey","SWIPE_SOUND_ORDER"],"mappings":";AAEA,MAAMA,IAAW,mFAEXC,IAAkB,4CAEXC,IAAuB;AAAA,EAClC,CAACC,EAAe,UAAU,GAAG,GAAGH,CAAQ;AAAA,EACxC,CAACG,EAAe,mBAAmB,GAAG,GAAGH,CAAQ;AAAA,EACjD,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,UAAU,GAAG,GAAGH,CAAQ;AAAA,EACxC,CAACG,EAAe,MAAM,GAAG,GAAGH,CAAQ;AAAA,EACpC,CAACG,EAAe,cAAc,GAAG,GAAGH,CAAQ;AAAA,EAC5C,CAACG,EAAe,YAAY,GAAG,GAAGH,CAAQ;AAAA,EAC1C,CAACG,EAAe,eAAe,GAAG,GAAGH,CAAQ;AAAA,EAC7C,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,SAAS,GAAG,GAAGH,CAAQ;AAAA,EACvC,CAACG,EAAe,WAAW,GAAG,GAAGH,CAAQ;AAAA,EACzC,CAACG,EAAe,YAAY,GAAG,GAAGH,CAAQ;AAAA,EAC1C,CAACG,EAAe,SAAS,GAAG,GAAGH,CAAQ;AAAA,EACvC,CAACG,EAAe,UAAU,GAAG,GAAGH,CAAQ;AAAA,EACxC,CAACG,EAAe,cAAc,GAAG,GAAGF,CAAe;AAAA,EACnD,CAACE,EAAe,eAAe,GAAG,GAAGF,CAAe;AAAA,EACpD,CAACE,EAAe,UAAU,GAAG,GAAGF,CAAe;AAAA,EAC/C,CAACE,EAAe,WAAW,GAAG,GAAGF,CAAe;AAAA,EAChD,CAACE,EAAe,UAAU,GAAG,GAAGF,CAAe;AAAA,EAC/C,CAACE,EAAe,UAAU,GAAG,GAAGH,CAAQ;AAAA,EACxC,CAACG,EAAe,UAAU,GAAG,GAAGH,CAAQ;AAAA,EACxC,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,WAAW,GAAG,GAAGH,CAAQ;AAAA,EACzC,CAACG,EAAe,UAAU,GAAG,GAAGH,CAAQ;AAC1C,GAEaI,IAAoB;AAAA,EAC/BD,EAAe;AAAA,EACfA,EAAe;AAAA,EACfA,EAAe;AAAA,EACfA,EAAe;AACjB;"}
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../src/features/circle-games/hooks/use-circle-sounds/constants.ts"],"sourcesContent":["import { CircleSoundKey } from './use-circle-sounds-enums';\n\nconst BASE_URL = 'https://cuemath-circle.s3.ap-southeast-1.amazonaws.com/assets/sounds/production';\n\nconst STATIC_BASE_URL = 'https://static.cuemath.com/static/sounds';\n\nexport const CircleSoundKeyMapper = {\n [CircleSoundKey.BACKGROUND]: `${BASE_URL}/bg-sound.mp3`,\n [CircleSoundKey.BACKGROUND_RUSHHOUR]: `${BASE_URL}/circle-background-rushhour.mp3`,\n [CircleSoundKey.TUTORIAL]: `${BASE_URL}/bg-sound-tutorials.mp3`,\n [CircleSoundKey.SWIPE_01]: `${BASE_URL}/circle-swipe-1.wav`,\n [CircleSoundKey.SWIPE_02]: `${BASE_URL}/circle-swipe-2.wav`,\n [CircleSoundKey.SWIPE_03]: `${BASE_URL}/circle-swipe-3.wav`,\n [CircleSoundKey.SWIPE_04]: `${BASE_URL}/circle-swipe-4.wav`,\n [CircleSoundKey.SWIPE_DOWN]: `${BASE_URL}/circle-swipe-down-1.wav`,\n [CircleSoundKey.TOGGLE]: `${BASE_URL}/circle-button-v3.wav`,\n [CircleSoundKey.POINTS_AWARDED]: `${BASE_URL}/circle-points-v1.wav`,\n [CircleSoundKey.POINTS_ADDED]: `${BASE_URL}/circle-points-add-v1.wav`,\n [CircleSoundKey.GAME_CARD_CLICK]: `${BASE_URL}/circle-gamecard-button-v1.wav`,\n [CircleSoundKey.CLOCK_IN]: `${BASE_URL}/circle-meter-v1.wav`,\n [CircleSoundKey.CLOCK_OUT]: `${BASE_URL}/circle-disappear-v1.wav`,\n [CircleSoundKey.ACCURACY_IN]: `${BASE_URL}/circle-meter-v1.wav`,\n [CircleSoundKey.ACCURACY_OUT]: `${BASE_URL}/circle-disappear-v1.wav`,\n [CircleSoundKey.STREAK_IN]: `${BASE_URL}/circle-streak-v1.wav`,\n [CircleSoundKey.STREAK_OUT]: `${BASE_URL}/circle-disappear-v1.wav`,\n [CircleSoundKey.ACCURACY_INTRO]: `${STATIC_BASE_URL}/accuracy-intro.mp3`,\n [CircleSoundKey.ACCURACY_TARGET]: `${STATIC_BASE_URL}/accuracy-target.mp3`,\n [CircleSoundKey.TIME_INTRO]: `${STATIC_BASE_URL}/timer-intro.mp3`,\n [CircleSoundKey.TIME_TARGET]: `${STATIC_BASE_URL}/timer-target.mp3`,\n [CircleSoundKey.METER_FILL]: `${STATIC_BASE_URL}/meter-fill.mp3`,\n [CircleSoundKey.YOUR_SCORE]: `${BASE_URL}/your-score.mp3`,\n [CircleSoundKey.HIGH_SCORE]: `${BASE_URL}/high-score.mp3`,\n [CircleSoundKey.ALL_DONE]: `${BASE_URL}/all-done.mp3`,\n [CircleSoundKey.DOING_GREAT]: `${BASE_URL}/doing-great.mp3`,\n [CircleSoundKey.KEEP_IT_UP]: `${BASE_URL}/keep-it-up.mp3`,\n};\n\nexport const SWIPE_SOUND_ORDER = [\n CircleSoundKey.SWIPE_04,\n CircleSoundKey.SWIPE_02,\n CircleSoundKey.SWIPE_03,\n CircleSoundKey.SWIPE_01,\n];\n\nexport const VOLUME_FADE_DURATION = 100; // in milliseconds\nexport const VOLUME_TO_CHANGE = 0.1; // volume change per fade step\n"],"names":["BASE_URL","STATIC_BASE_URL","CircleSoundKeyMapper","CircleSoundKey","SWIPE_SOUND_ORDER","VOLUME_FADE_DURATION","VOLUME_TO_CHANGE"],"mappings":";AAEA,MAAMA,IAAW,mFAEXC,IAAkB,4CAEXC,IAAuB;AAAA,EAClC,CAACC,EAAe,UAAU,GAAG,GAAGH,CAAQ;AAAA,EACxC,CAACG,EAAe,mBAAmB,GAAG,GAAGH,CAAQ;AAAA,EACjD,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,UAAU,GAAG,GAAGH,CAAQ;AAAA,EACxC,CAACG,EAAe,MAAM,GAAG,GAAGH,CAAQ;AAAA,EACpC,CAACG,EAAe,cAAc,GAAG,GAAGH,CAAQ;AAAA,EAC5C,CAACG,EAAe,YAAY,GAAG,GAAGH,CAAQ;AAAA,EAC1C,CAACG,EAAe,eAAe,GAAG,GAAGH,CAAQ;AAAA,EAC7C,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,SAAS,GAAG,GAAGH,CAAQ;AAAA,EACvC,CAACG,EAAe,WAAW,GAAG,GAAGH,CAAQ;AAAA,EACzC,CAACG,EAAe,YAAY,GAAG,GAAGH,CAAQ;AAAA,EAC1C,CAACG,EAAe,SAAS,GAAG,GAAGH,CAAQ;AAAA,EACvC,CAACG,EAAe,UAAU,GAAG,GAAGH,CAAQ;AAAA,EACxC,CAACG,EAAe,cAAc,GAAG,GAAGF,CAAe;AAAA,EACnD,CAACE,EAAe,eAAe,GAAG,GAAGF,CAAe;AAAA,EACpD,CAACE,EAAe,UAAU,GAAG,GAAGF,CAAe;AAAA,EAC/C,CAACE,EAAe,WAAW,GAAG,GAAGF,CAAe;AAAA,EAChD,CAACE,EAAe,UAAU,GAAG,GAAGF,CAAe;AAAA,EAC/C,CAACE,EAAe,UAAU,GAAG,GAAGH,CAAQ;AAAA,EACxC,CAACG,EAAe,UAAU,GAAG,GAAGH,CAAQ;AAAA,EACxC,CAACG,EAAe,QAAQ,GAAG,GAAGH,CAAQ;AAAA,EACtC,CAACG,EAAe,WAAW,GAAG,GAAGH,CAAQ;AAAA,EACzC,CAACG,EAAe,UAAU,GAAG,GAAGH,CAAQ;AAC1C,GAEaI,IAAoB;AAAA,EAC/BD,EAAe;AAAA,EACfA,EAAe;AAAA,EACfA,EAAe;AAAA,EACfA,EAAe;AACjB,GAEaE,IAAuB,KACvBC,IAAmB;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { VOLUME_TO_CHANGE as r, VOLUME_FADE_DURATION as o } from "./constants.js";
|
|
2
|
+
const a = (e) => {
|
|
3
|
+
const l = setInterval(() => {
|
|
4
|
+
const t = e.volume || 0;
|
|
5
|
+
t < 1 ? e.volume = Math.min(t + r, 1) : clearInterval(l);
|
|
6
|
+
}, o);
|
|
7
|
+
return l;
|
|
8
|
+
}, m = (e) => {
|
|
9
|
+
let l = e.volume || 0;
|
|
10
|
+
const t = setInterval(() => {
|
|
11
|
+
l - r <= 0 ? (e.volume = 0, e.pause(), clearInterval(t)) : (l = l - r, e.volume = l);
|
|
12
|
+
}, o);
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
a as fadeInSound,
|
|
17
|
+
m as fadeOutSound
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.js","sources":["../../../../../src/features/circle-games/hooks/use-circle-sounds/helper.ts"],"sourcesContent":["import { VOLUME_FADE_DURATION, VOLUME_TO_CHANGE } from './constants';\n\nexport const fadeInSound = (soundInstance: HTMLAudioElement) => {\n const intervalId = setInterval(() => {\n const vol = soundInstance.volume || 0;\n\n if (vol < 1) {\n soundInstance.volume = Math.min(vol + VOLUME_TO_CHANGE, 1);\n } else {\n clearInterval(intervalId);\n }\n }, VOLUME_FADE_DURATION);\n\n return intervalId;\n};\n\nexport const fadeOutSound = (soundInstance: HTMLAudioElement) => {\n let vol = soundInstance.volume || 0;\n const intervalId = setInterval(() => {\n if (vol - VOLUME_TO_CHANGE <= 0) {\n soundInstance.volume = 0;\n soundInstance.pause();\n clearInterval(intervalId);\n } else {\n vol = vol - VOLUME_TO_CHANGE;\n soundInstance.volume = vol;\n }\n }, VOLUME_FADE_DURATION);\n\n return intervalId;\n};\n"],"names":["fadeInSound","soundInstance","intervalId","vol","VOLUME_TO_CHANGE","VOLUME_FADE_DURATION","fadeOutSound"],"mappings":";AAEa,MAAAA,IAAc,CAACC,MAAoC;AACxD,QAAAC,IAAa,YAAY,MAAM;AAC7B,UAAAC,IAAMF,EAAc,UAAU;AAEpC,IAAIE,IAAM,IACRF,EAAc,SAAS,KAAK,IAAIE,IAAMC,GAAkB,CAAC,IAEzD,cAAcF,CAAU;AAAA,KAEzBG,CAAoB;AAEhB,SAAAH;AACT,GAEaI,IAAe,CAACL,MAAoC;AAC3D,MAAAE,IAAMF,EAAc,UAAU;AAC5B,QAAAC,IAAa,YAAY,MAAM;AAC/B,IAAAC,IAAMC,KAAoB,KAC5BH,EAAc,SAAS,GACvBA,EAAc,MAAM,GACpB,cAAcC,CAAU,MAExBC,IAAMA,IAAMC,GACZH,EAAc,SAASE;AAAA,KAExBE,CAAoB;AAEhB,SAAAH;AACT;"}
|