@cuemath/leap 3.3.24-link.2 → 3.3.24
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/features/auth/account-selector/account-selector-styled.js +5 -6
- package/dist/features/auth/account-selector/account-selector-styled.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +57 -51
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-list-styled.js +2 -3
- package/dist/features/auth/comps/user-list/user-list-styled.js.map +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js +3 -9
- package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js +8 -8
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -1
- package/dist/features/journey/use-journey/use-journey.js +6 -18
- package/dist/features/journey/use-journey/use-journey.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-helpers.js +7 -13
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +34 -40
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-view.js +138 -161
- package/dist/features/parent-dashboard/parent-dashboard-view.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/class-preference/class-preference.js +49 -61
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/session-report.js +15 -15
- package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js +0 -5
- package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js +51 -96
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +63 -70
- package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
- package/dist/features/trial-session/helper.js +54 -71
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +130 -149
- package/dist/features/trial-session/hooks/use-trial-session-navigation.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 +98 -107
- 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 +71 -66
- package/dist/index.js +391 -401
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/features/auth/account-selector/comps/compact-header/account-selector-header.js +0 -31
- package/dist/features/auth/account-selector/comps/compact-header/account-selector-header.js.map +0 -1
- package/dist/features/parent-dashboard/api/cancel-subscription.js +0 -9
- package/dist/features/parent-dashboard/api/cancel-subscription.js.map +0 -1
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +0 -20
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +0 -96
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +0 -21
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +0 -80
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +0 -23
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +0 -55
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +0 -59
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +0 -93
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +0 -1
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +0 -63
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +0 -1
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +0 -65
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +0 -1
- package/dist/features/student-username/add/add-student-username-constants.js +0 -6
- package/dist/features/student-username/add/add-student-username-constants.js.map +0 -1
- package/dist/features/student-username/add/add-student-username-helpers.js +0 -6
- package/dist/features/student-username/add/add-student-username-helpers.js.map +0 -1
- package/dist/features/student-username/add/add-student-username-styled.js +0 -10
- package/dist/features/student-username/add/add-student-username-styled.js.map +0 -1
- package/dist/features/student-username/add/add-student-username.js +0 -78
- package/dist/features/student-username/add/add-student-username.js.map +0 -1
- package/dist/features/student-username/add/api/update-username.js +0 -9
- package/dist/features/student-username/add/api/update-username.js.map +0 -1
- package/dist/features/student-username/add/api/username-availability.js +0 -10
- package/dist/features/student-username/add/api/username-availability.js.map +0 -1
- package/dist/features/student-username/add/hooks/use-check-username-availability.js +0 -41
- package/dist/features/student-username/add/hooks/use-check-username-availability.js.map +0 -1
- package/dist/features/trial-session/api/teacher-availability.js +0 -9
- package/dist/features/trial-session/api/teacher-availability.js.map +0 -1
- package/dist/features/trial-session/comps/class-preference/helpers.js +0 -28
- package/dist/features/trial-session/comps/class-preference/helpers.js.map +0 -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
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
width: 100%;
|
|
1
|
+
import r from "styled-components";
|
|
2
|
+
import m from "../../ui/image/image.js";
|
|
3
|
+
const t = r(m)`
|
|
4
|
+
background-color: ${({ theme: o }) => o.colors.WHITE};
|
|
6
5
|
`;
|
|
7
6
|
export {
|
|
8
|
-
|
|
7
|
+
t as ImageWrapper
|
|
9
8
|
};
|
|
10
9
|
//# sourceMappingURL=account-selector-styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-selector-styled.js","sources":["../../../../src/features/auth/account-selector/account-selector-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport
|
|
1
|
+
{"version":3,"file":"account-selector-styled.js","sources":["../../../../src/features/auth/account-selector/account-selector-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport Image from '../../ui/image/image';\n\nexport const ImageWrapper = styled(Image)`\n background-color: ${({ theme }) => theme.colors.WHITE};\n`;\n"],"names":["ImageWrapper","styled","Image","theme"],"mappings":";;AAIa,MAAAA,IAAeC,EAAOC,CAAK;AAAA,sBAClB,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;"}
|
|
@@ -1,64 +1,70 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import { memo as d } from "react";
|
|
3
3
|
import { useTheme as $ } from "styled-components";
|
|
4
|
-
import { ILLUSTRATIONS as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { EDeviceType as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
isLoading: p,
|
|
19
|
-
onGoBack: i
|
|
4
|
+
import { ILLUSTRATIONS as m } from "../../../assets/illustrations/illustrations.js";
|
|
5
|
+
import f from "../../ui/image/image.js";
|
|
6
|
+
import t from "../../ui/layout/flex-view.js";
|
|
7
|
+
import o from "../../ui/separator/separator.js";
|
|
8
|
+
import n from "../../ui/text/text.js";
|
|
9
|
+
import { EDeviceType as g } from "../../ui/theme/constants.js";
|
|
10
|
+
import T from "../comps/overlay-loader/overlay-loader.js";
|
|
11
|
+
import u from "../comps/user-list/user-list.js";
|
|
12
|
+
import { ImageWrapper as w } from "./account-selector-styled.js";
|
|
13
|
+
const L = ({
|
|
14
|
+
userAccounts: i,
|
|
15
|
+
onSelect: c,
|
|
16
|
+
onAddNew: h,
|
|
17
|
+
isLoading: l
|
|
20
18
|
}) => {
|
|
21
|
-
const { device:
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
|
|
19
|
+
const { device: p } = $(), a = p <= g.TABLET;
|
|
20
|
+
return /* @__PURE__ */ r(
|
|
21
|
+
t,
|
|
24
22
|
{
|
|
25
|
-
$
|
|
26
|
-
$
|
|
23
|
+
$flex: 1,
|
|
24
|
+
$alignItems: "center",
|
|
25
|
+
$justifyContent: "center",
|
|
27
26
|
$width: "100%",
|
|
28
|
-
$height: "
|
|
29
|
-
$gapX:
|
|
27
|
+
$height: "100%",
|
|
28
|
+
$gapX: 2,
|
|
30
29
|
children: [
|
|
31
|
-
|
|
32
|
-
/* @__PURE__ */ e(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
/* @__PURE__ */ e(T, { isLoading: l }),
|
|
31
|
+
/* @__PURE__ */ e(f, { src: m.CIRCLE_CUEMATH_LOGO_WHITE, alt: "Parent Signup", withLoader: !1 }),
|
|
32
|
+
/* @__PURE__ */ e(o, { heightX: 1 }),
|
|
33
|
+
/* @__PURE__ */ e(n, { $renderAs: "ab1", $color: "WHITE_T_60", $align: "center", children: "Switch between accounts" }),
|
|
34
|
+
/* @__PURE__ */ e(o, { heightX: a ? 1.5 : 5 }),
|
|
35
|
+
i.length > 0 && /* @__PURE__ */ r(s, { children: [
|
|
36
|
+
/* @__PURE__ */ e(u, { users: i, onSelect: c, onAddNew: h }),
|
|
37
|
+
/* @__PURE__ */ e(o, { heightX: a ? 1.5 : 5 }),
|
|
38
|
+
/* @__PURE__ */ r(
|
|
39
|
+
t,
|
|
36
40
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
width:
|
|
41
|
+
$gutterX: 0.5,
|
|
42
|
+
$gapX: 1,
|
|
43
|
+
$flexGapX: 0.5,
|
|
44
|
+
$width: 280,
|
|
45
|
+
$borderColor: "BLACK_5",
|
|
46
|
+
$background: "BLACK_3",
|
|
47
|
+
$flexDirection: "row",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ e(
|
|
50
|
+
w,
|
|
51
|
+
{
|
|
52
|
+
src: m.CUEMATH_APP_QR_CODE,
|
|
53
|
+
width: 80,
|
|
54
|
+
height: 80,
|
|
55
|
+
withLoader: !1
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ e(t, { $gapX: 0.5, $flex: 1, children: /* @__PURE__ */ e(n, { $color: "WHITE", $renderOnTabletAs: "ab3", $renderAs: "ab2", children: "Download the cuemath app to view your children’s report" }) })
|
|
59
|
+
]
|
|
41
60
|
}
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
/* @__PURE__ */ e(g, { $renderAs: "ab1", $color: "WHITE_T_60", $align: "center", children: "Switch between accounts" })
|
|
45
|
-
] }),
|
|
46
|
-
/* @__PURE__ */ e(s, { height: t ? 0 : 40 }),
|
|
47
|
-
/* @__PURE__ */ e(
|
|
48
|
-
I,
|
|
49
|
-
{
|
|
50
|
-
$flex: t ? 1 : 0,
|
|
51
|
-
$justifyContent: r ? "flex-start" : "center",
|
|
52
|
-
$alignItems: r ? "flex-start" : "center",
|
|
53
|
-
$width: "100%",
|
|
54
|
-
children: o.length > 0 && /* @__PURE__ */ e(T, { users: o, onSelect: f, onAddNew: l, maxColumns: 3 })
|
|
55
|
-
}
|
|
56
|
-
)
|
|
61
|
+
)
|
|
62
|
+
] })
|
|
57
63
|
]
|
|
58
64
|
}
|
|
59
65
|
);
|
|
60
|
-
},
|
|
66
|
+
}, y = d(L);
|
|
61
67
|
export {
|
|
62
|
-
|
|
68
|
+
y as default
|
|
63
69
|
};
|
|
64
70
|
//# sourceMappingURL=account-selector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-selector.js","sources":["../../../../src/features/auth/account-selector/account-selector.tsx"],"sourcesContent":["import type { IAccountSelectorViewProps } from './account-selector-types';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\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 OverlayLoader from '../comps/overlay-loader/overlay-loader';\nimport UserList from '../comps/user-list/user-list';\nimport * as Styled from './account-selector-styled';\
|
|
1
|
+
{"version":3,"file":"account-selector.js","sources":["../../../../src/features/auth/account-selector/account-selector.tsx"],"sourcesContent":["import type { IAccountSelectorViewProps } from './account-selector-types';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\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 OverlayLoader from '../comps/overlay-loader/overlay-loader';\nimport UserList from '../comps/user-list/user-list';\nimport * as Styled from './account-selector-styled';\n\nconst AccountSelector = ({\n userAccounts,\n onSelect,\n onAddNew,\n isLoading,\n}: IAccountSelectorViewProps) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n\n return (\n <FlexView\n $flex={1}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n $gapX={2}\n >\n <OverlayLoader isLoading={isLoading} />\n <Image src={ILLUSTRATIONS.CIRCLE_CUEMATH_LOGO_WHITE} alt=\"Parent Signup\" withLoader={false} />\n <Separator heightX={1} />\n <Text $renderAs=\"ab1\" $color=\"WHITE_T_60\" $align=\"center\">\n Switch between accounts\n </Text>\n <Separator heightX={isCompact ? 1.5 : 5} />\n {userAccounts.length > 0 && (\n <>\n <UserList users={userAccounts} onSelect={onSelect} onAddNew={onAddNew} />\n <Separator heightX={isCompact ? 1.5 : 5} />\n <FlexView\n $gutterX={0.5}\n $gapX={1}\n $flexGapX={0.5}\n $width={280}\n $borderColor=\"BLACK_5\"\n $background=\"BLACK_3\"\n $flexDirection=\"row\"\n >\n <Styled.ImageWrapper\n src={ILLUSTRATIONS.CUEMATH_APP_QR_CODE}\n width={80}\n height={80}\n withLoader={false}\n />\n <FlexView $gapX={0.5} $flex={1}>\n <Text $color=\"WHITE\" $renderOnTabletAs=\"ab3\" $renderAs=\"ab2\">\n Download the cuemath app to view your children’s report\n </Text>\n </FlexView>\n </FlexView>\n </>\n )}\n </FlexView>\n );\n};\n\nexport default memo(AccountSelector);\n"],"names":["AccountSelector","userAccounts","onSelect","onAddNew","isLoading","device","useTheme","isCompact","EDeviceType","jsxs","FlexView","jsx","OverlayLoader","Image","ILLUSTRATIONS","Separator","Text","Fragment","UserList","Styled.ImageWrapper","accountSelector","memo"],"mappings":";;;;;;;;;;;;AAeA,MAAMA,IAAkB,CAAC;AAAA,EACvB,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,MAAiC;AACzB,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAYF,KAAUG,EAAY;AAGtC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,OAAO;AAAA,MAEP,UAAA;AAAA,QAAA,gBAAAC,EAACC,KAAc,WAAAR,GAAsB;AAAA,QACrC,gBAAAO,EAACE,KAAM,KAAKC,EAAc,2BAA2B,KAAI,iBAAgB,YAAY,IAAO;AAAA,QAC5F,gBAAAH,EAACI,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,QACvB,gBAAAJ,EAACK,KAAK,WAAU,OAAM,QAAO,cAAa,QAAO,UAAS,UAE1D,0BAAA,CAAA;AAAA,QACC,gBAAAL,EAAAI,GAAA,EAAU,SAASR,IAAY,MAAM,GAAG;AAAA,QACxCN,EAAa,SAAS,KAEnB,gBAAAQ,EAAAQ,GAAA,EAAA,UAAA;AAAA,UAAA,gBAAAN,EAACO,GAAS,EAAA,OAAOjB,GAAc,UAAAC,GAAoB,UAAAC,GAAoB;AAAA,UACtE,gBAAAQ,EAAAI,GAAA,EAAU,SAASR,IAAY,MAAM,GAAG;AAAA,UACzC,gBAAAE;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,UAAU;AAAA,cACV,OAAO;AAAA,cACP,WAAW;AAAA,cACX,QAAQ;AAAA,cACR,cAAa;AAAA,cACb,aAAY;AAAA,cACZ,gBAAe;AAAA,cAEf,UAAA;AAAA,gBAAA,gBAAAC;AAAA,kBAACQ;AAAAA,kBAAA;AAAA,oBACC,KAAKL,EAAc;AAAA,oBACnB,OAAO;AAAA,oBACP,QAAQ;AAAA,oBACR,YAAY;AAAA,kBAAA;AAAA,gBACd;AAAA,gBACC,gBAAAH,EAAAD,GAAA,EAAS,OAAO,KAAK,OAAO,GAC3B,UAAA,gBAAAC,EAACK,GAAK,EAAA,QAAO,SAAQ,mBAAkB,OAAM,WAAU,OAAM,oEAE7D,CAAA,GACF;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,GAEeI,IAAAC,EAAKrB,CAAe;"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import t from "styled-components";
|
|
2
2
|
import { UserItemCard as e } from "./user-item/user-item-styled.js";
|
|
3
|
-
const
|
|
3
|
+
const i = t.div`
|
|
4
4
|
display: inline-grid;
|
|
5
5
|
grid-template-columns: repeat(
|
|
6
6
|
${({ itemCount: r, maxColumns: o }) => r < o ? r : o},
|
|
7
7
|
${({ cardWidth: r }) => r}px
|
|
8
8
|
);
|
|
9
9
|
grid-auto-rows: ${({ cardWidth: r }) => r}px;
|
|
10
|
-
max-height: 100%;
|
|
11
10
|
`, s = t(e)`
|
|
12
11
|
&:hover {
|
|
13
12
|
background-color: ${({ theme: r }) => r.colors.BLACK_4};
|
|
@@ -15,6 +14,6 @@ const p = t.div`
|
|
|
15
14
|
`;
|
|
16
15
|
export {
|
|
17
16
|
s as AddAccountButton,
|
|
18
|
-
|
|
17
|
+
i as UserListWrapper
|
|
19
18
|
};
|
|
20
19
|
//# sourceMappingURL=user-list-styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-list-styled.js","sources":["../../../../../src/features/auth/comps/user-list/user-list-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { UserItemCard } from './user-item/user-item-styled';\n\nexport const UserListWrapper = styled.div<{\n itemCount: number;\n maxColumns: number;\n cardWidth: number;\n}>`\n display: inline-grid;\n grid-template-columns: repeat(\n ${({ itemCount, maxColumns }) => (itemCount < maxColumns ? itemCount : maxColumns)},\n ${({ cardWidth }) => cardWidth}px\n );\n grid-auto-rows: ${({ cardWidth }) => cardWidth}px;\n
|
|
1
|
+
{"version":3,"file":"user-list-styled.js","sources":["../../../../../src/features/auth/comps/user-list/user-list-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { UserItemCard } from './user-item/user-item-styled';\n\nexport const UserListWrapper = styled.div<{\n itemCount: number;\n maxColumns: number;\n cardWidth: number;\n}>`\n display: inline-grid;\n grid-template-columns: repeat(\n ${({ itemCount, maxColumns }) => (itemCount < maxColumns ? itemCount : maxColumns)},\n ${({ cardWidth }) => cardWidth}px\n );\n grid-auto-rows: ${({ cardWidth }) => cardWidth}px;\n`;\n\nexport const AddAccountButton = styled(UserItemCard)`\n &:hover {\n background-color: ${({ theme }) => theme.colors.BLACK_4};\n }\n`;\n"],"names":["UserListWrapper","styled","itemCount","maxColumns","cardWidth","AddAccountButton","UserItemCard","theme"],"mappings":";;AAIO,MAAMA,IAAkBC,EAAO;AAAA;AAAA;AAAA,MAOhC,CAAC,EAAE,WAAAC,GAAW,YAAAC,EAAA,MAAkBD,IAAYC,IAAaD,IAAYC,CAAW;AAAA,MAChF,CAAC,EAAE,WAAAC,EAAU,MAAMA,CAAS;AAAA;AAAA,oBAEd,CAAC,EAAE,WAAAA,EAAU,MAAMA,CAAS;AAAA,GAGnCC,IAAmBJ,EAAOK,CAAY;AAAA;AAAA,wBAE3B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PLUGINS as _ } from "../../../node_modules/@cuemath/analytics-v2/dist/constants.js";
|
|
2
|
-
var
|
|
2
|
+
var s = /* @__PURE__ */ ((e) => (e.START_SIGNUP_CTA_CLICKED = "start_signup_cta_clicked", e.ECNA_STEP_VIEWED = "ecna_step_viewed", e.ECNA_RESPONSE_RECORDED_DEBUG = "ecna_response_recorded_debug", e.PARENT_SIGNUP_CTA_CLICKED = "parent_signup_cta_clicked", e.PARENT_SIGNUP_SUCCESSFUL = "parent_signup_successful", e.PARENT_SIGNUP_FAILED = "parent_signup_failed", e.STUDENT_SIGNUP_SUCCESSFUL = "signup_successful", e.STUDENT_SIGNUP_FAILED = "signup_failed", e.SIGNUP_OTP_ENTERED = "signup_otp_entered", e.SIGNUP_OTP_VERIFIED = "signup_otp_verified", e.SIGNUP_OTP_FAILED = "signup_otp_failed", e.SLOTS_SHOWN = "slots_shown", e.SLOT_DATE_SELECTED = "slot_date_selected", e.SLOT_TIME_SELECTED = "slot_time_selected", e.TUTOR_CHANGE_REASON_SELECTED = "tutor_change_reason_selected", e))(s || {});
|
|
3
3
|
const n = {
|
|
4
4
|
start_signup_cta_clicked: [_.MIXPANEL],
|
|
5
5
|
ecna_step_viewed: [_.MIXPANEL],
|
|
@@ -15,16 +15,10 @@ const n = {
|
|
|
15
15
|
slots_shown: [_.MIXPANEL],
|
|
16
16
|
slot_date_selected: [_.MIXPANEL],
|
|
17
17
|
slot_time_selected: [_.MIXPANEL],
|
|
18
|
-
tutor_change_reason_selected: [_.MIXPANEL]
|
|
19
|
-
subscription_intent_failed: [_.MIXPANEL],
|
|
20
|
-
subscription_intent_created: [_.MIXPANEL],
|
|
21
|
-
stripe_payment_element_ready: [_.MIXPANEL],
|
|
22
|
-
stripe_payment_failed: [_.MIXPANEL],
|
|
23
|
-
stripe_payment_success: [_.MIXPANEL],
|
|
24
|
-
payment_plan_selected: [_.MIXPANEL]
|
|
18
|
+
tutor_change_reason_selected: [_.MIXPANEL]
|
|
25
19
|
};
|
|
26
20
|
export {
|
|
27
|
-
|
|
21
|
+
s as PLA_ANALYTICS_EVENTS,
|
|
28
22
|
n as PLA_ANALYTICS_WHITELIST_EVENTS
|
|
29
23
|
};
|
|
30
24
|
//# sourceMappingURL=pla-analytics-events.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pla-analytics-events.js","sources":["../../../../src/features/auth/pla-signup/pla-analytics-events.ts"],"sourcesContent":["import { PLUGINS } from '@cuemath/analytics-v2/dist/constants';\n\nexport enum PLA_ANALYTICS_EVENTS {\n START_SIGNUP_CTA_CLICKED = 'start_signup_cta_clicked',\n ECNA_STEP_VIEWED = 'ecna_step_viewed',\n ECNA_RESPONSE_RECORDED_DEBUG = 'ecna_response_recorded_debug',\n PARENT_SIGNUP_CTA_CLICKED = 'parent_signup_cta_clicked',\n PARENT_SIGNUP_SUCCESSFUL = 'parent_signup_successful',\n PARENT_SIGNUP_FAILED = 'parent_signup_failed',\n STUDENT_SIGNUP_SUCCESSFUL = 'signup_successful',\n STUDENT_SIGNUP_FAILED = 'signup_failed',\n SIGNUP_OTP_ENTERED = 'signup_otp_entered',\n SIGNUP_OTP_VERIFIED = 'signup_otp_verified',\n SIGNUP_OTP_FAILED = 'signup_otp_failed',\n SLOTS_SHOWN = 'slots_shown',\n SLOT_DATE_SELECTED = 'slot_date_selected',\n SLOT_TIME_SELECTED = 'slot_time_selected',\n TUTOR_CHANGE_REASON_SELECTED = 'tutor_change_reason_selected',\n
|
|
1
|
+
{"version":3,"file":"pla-analytics-events.js","sources":["../../../../src/features/auth/pla-signup/pla-analytics-events.ts"],"sourcesContent":["import { PLUGINS } from '@cuemath/analytics-v2/dist/constants';\n\nexport enum PLA_ANALYTICS_EVENTS {\n START_SIGNUP_CTA_CLICKED = 'start_signup_cta_clicked',\n ECNA_STEP_VIEWED = 'ecna_step_viewed',\n ECNA_RESPONSE_RECORDED_DEBUG = 'ecna_response_recorded_debug',\n PARENT_SIGNUP_CTA_CLICKED = 'parent_signup_cta_clicked',\n PARENT_SIGNUP_SUCCESSFUL = 'parent_signup_successful',\n PARENT_SIGNUP_FAILED = 'parent_signup_failed',\n STUDENT_SIGNUP_SUCCESSFUL = 'signup_successful',\n STUDENT_SIGNUP_FAILED = 'signup_failed',\n SIGNUP_OTP_ENTERED = 'signup_otp_entered',\n SIGNUP_OTP_VERIFIED = 'signup_otp_verified',\n SIGNUP_OTP_FAILED = 'signup_otp_failed',\n SLOTS_SHOWN = 'slots_shown',\n SLOT_DATE_SELECTED = 'slot_date_selected',\n SLOT_TIME_SELECTED = 'slot_time_selected',\n TUTOR_CHANGE_REASON_SELECTED = 'tutor_change_reason_selected',\n}\n\nexport const PLA_ANALYTICS_WHITELIST_EVENTS = {\n [PLA_ANALYTICS_EVENTS.START_SIGNUP_CTA_CLICKED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.ECNA_STEP_VIEWED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.ECNA_RESPONSE_RECORDED_DEBUG]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.PARENT_SIGNUP_CTA_CLICKED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.PARENT_SIGNUP_SUCCESSFUL]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.PARENT_SIGNUP_FAILED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.STUDENT_SIGNUP_SUCCESSFUL]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.STUDENT_SIGNUP_FAILED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SIGNUP_OTP_ENTERED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SIGNUP_OTP_VERIFIED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SIGNUP_OTP_FAILED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SLOTS_SHOWN]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SLOT_DATE_SELECTED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SLOT_TIME_SELECTED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.TUTOR_CHANGE_REASON_SELECTED]: [PLUGINS.MIXPANEL],\n};\n"],"names":["PLA_ANALYTICS_EVENTS","PLA_ANALYTICS_WHITELIST_EVENTS","PLUGINS"],"mappings":";AAEY,IAAAA,sBAAAA,OACVA,EAAA,2BAA2B,4BAC3BA,EAAA,mBAAmB,oBACnBA,EAAA,+BAA+B,gCAC/BA,EAAA,4BAA4B,6BAC5BA,EAAA,2BAA2B,4BAC3BA,EAAA,uBAAuB,wBACvBA,EAAA,4BAA4B,qBAC5BA,EAAA,wBAAwB,iBACxBA,EAAA,qBAAqB,sBACrBA,EAAA,sBAAsB,uBACtBA,EAAA,oBAAoB,qBACpBA,EAAA,cAAc,eACdA,EAAA,qBAAqB,sBACrBA,EAAA,qBAAqB,sBACrBA,EAAA,+BAA+B,gCAfrBA,IAAAA,KAAA,CAAA,CAAA;AAkBL,MAAMC,IAAiC;AAAA,EAC3C,0BAAgD,CAACC,EAAQ,QAAQ;AAAA,EACjE,kBAAwC,CAACA,EAAQ,QAAQ;AAAA,EACzD,8BAAoD,CAACA,EAAQ,QAAQ;AAAA,EACrE,2BAAiD,CAACA,EAAQ,QAAQ;AAAA,EAClE,0BAAgD,CAACA,EAAQ,QAAQ;AAAA,EACjE,sBAA4C,CAACA,EAAQ,QAAQ;AAAA,EAC7D,mBAAiD,CAACA,EAAQ,QAAQ;AAAA,EAClE,eAA6C,CAACA,EAAQ,QAAQ;AAAA,EAC9D,oBAA0C,CAACA,EAAQ,QAAQ;AAAA,EAC3D,qBAA2C,CAACA,EAAQ,QAAQ;AAAA,EAC5D,mBAAyC,CAACA,EAAQ,QAAQ;AAAA,EAC1D,aAAmC,CAACA,EAAQ,QAAQ;AAAA,EACpD,oBAA0C,CAACA,EAAQ,QAAQ;AAAA,EAC3D,oBAA0C,CAACA,EAAQ,QAAQ;AAAA,EAC3D,8BAAoD,CAACA,EAAQ,QAAQ;AACxE;"}
|
|
@@ -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={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","
|
|
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":"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"}
|
|
@@ -13,12 +13,12 @@ const q = ({
|
|
|
13
13
|
error: u,
|
|
14
14
|
helperText: b,
|
|
15
15
|
onEnter: n,
|
|
16
|
-
isLoading:
|
|
16
|
+
isLoading: D,
|
|
17
17
|
isValid: h,
|
|
18
18
|
type: t = "text",
|
|
19
|
-
placeholder:
|
|
20
|
-
actionElement:
|
|
21
|
-
maxLength:
|
|
19
|
+
placeholder: F,
|
|
20
|
+
actionElement: R,
|
|
21
|
+
maxLength: $,
|
|
22
22
|
width: E,
|
|
23
23
|
textTransform: P,
|
|
24
24
|
textAlign: v = "center",
|
|
@@ -56,8 +56,8 @@ const q = ({
|
|
|
56
56
|
X,
|
|
57
57
|
{
|
|
58
58
|
helperText: u || b,
|
|
59
|
-
isLoading:
|
|
60
|
-
actionElement:
|
|
59
|
+
isLoading: D,
|
|
60
|
+
actionElement: R,
|
|
61
61
|
children: /* @__PURE__ */ K(
|
|
62
62
|
B,
|
|
63
63
|
{
|
|
@@ -75,13 +75,13 @@ const q = ({
|
|
|
75
75
|
value: r,
|
|
76
76
|
onChange: G,
|
|
77
77
|
autoFocus: !0,
|
|
78
|
-
placeholder:
|
|
78
|
+
placeholder: F,
|
|
79
79
|
color: z,
|
|
80
80
|
autoCapitalize: "none",
|
|
81
81
|
textTransform: P,
|
|
82
82
|
type: y,
|
|
83
83
|
onKeyDown: k,
|
|
84
|
-
maxLength:
|
|
84
|
+
maxLength: $,
|
|
85
85
|
align: v,
|
|
86
86
|
fontSize: j
|
|
87
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-input-field.js","sources":["../../../../../src/features/auth/signup/custom-input-field/custom-input-field.tsx"],"sourcesContent":["import type { ICustomInputFieldProps } from './custom-input-field-types';\n\nimport {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n memo,\n type FC,\n type KeyboardEvent,\n type ChangeEvent,\n} from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport PhoneCountrySelector from './country-selector/country-selector';\nimport * as Styled from './custom-input-field-styled';\nimport InputWrapper from './input-wrapper/input-wrapper';\nimport PasswordToggleIcon from './password-toggle/password-toggle';\n\nconst CustomInputField: FC<ICustomInputFieldProps> = ({\n value,\n onChange,\n error,\n helperText,\n onEnter,\n isLoading,\n isValid,\n type = 'text',\n placeholder,\n actionElement,\n maxLength,\n width,\n textTransform,\n textAlign = 'center',\n selectedCountry,\n onCountryChange,\n autoSize = false,\n}) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n const [fontSize, setFontSize] = useState(isMobile ? 24 : 32);\n const inputRef = useRef<HTMLInputElement>(null);\n const canvasRef = useRef<HTMLCanvasElement | null>(null);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n onEnter?.();\n }\n },\n [onEnter],\n );\n\n const inputType = useMemo(() => {\n if (type === 'password') return isPasswordVisible ? 'text' : 'password';\n\n if (type === 'phone') return 'number';\n\n return type;\n }, [type, isPasswordVisible]);\n\n const inputColor = useMemo(() => {\n if (error) return theme.colors.RED;\n\n if (isValid) return theme.colors.GREEN_4;\n\n return theme.colors.WHITE;\n }, [error, isValid, theme.colors]);\n\n const measureTextWidth = useCallback((text: string, font: string): number => {\n if (!canvasRef.current) {\n canvasRef.current = document.createElement('canvas');\n }\n\n const context = canvasRef.current.getContext('2d');\n\n if (!context) return 0;\n\n context.font = font;\n\n return context.measureText(text).width;\n }, []);\n\n useEffect(() => {\n if (!inputRef.current || !value || !autoSize) {\n return;\n }\n\n if (isMobile) {\n setFontSize(24);\n\n return;\n }\n\n const inputWidth = inputRef.current.clientWidth;\n\n const font32 = \"32px 'Athletics-Light'\";\n\n const textWidth32 = measureTextWidth(value, font32);\n\n if (textWidth32 > inputWidth) {\n setFontSize(24);\n } else {\n setFontSize(32);\n }\n }, [value, measureTextWidth, autoSize, isMobile]);\n\n useEffect(() => {\n return () => {\n canvasRef.current = null;\n };\n }, []);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => onChange(event.target.value),\n [onChange],\n );\n\n return (\n <InputWrapper\n helperText={error || helperText}\n isLoading={isLoading}\n actionElement={actionElement}\n >\n <FlexView\n $width={width ?? '100%'}\n $flex={1}\n $alignItems=\"center\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n >\n {type === 'phone' && (\n <PhoneCountrySelector onChange={onCountryChange} value={selectedCountry} />\n )}\n <Styled.CustomInput\n ref={inputRef}\n value={value}\n onChange={handleChange}\n autoFocus\n placeholder={placeholder}\n color={inputColor}\n autoCapitalize=\"none\"\n textTransform={textTransform}\n type={inputType}\n onKeyDown={handleKeyDown}\n maxLength={maxLength}\n align={textAlign}\n fontSize={fontSize}\n />\n {type === 'password' && (\n <PasswordToggleIcon\n isVisible={isPasswordVisible}\n onToggle={() => setIsPasswordVisible(prev => !prev)}\n />\n )}\n </FlexView>\n </InputWrapper>\n );\n};\n\nexport default memo(CustomInputField);\n"],"names":["CustomInputField","value","onChange","error","helperText","onEnter","isLoading","isValid","type","placeholder","actionElement","maxLength","width","textTransform","textAlign","selectedCountry","onCountryChange","autoSize","theme","useTheme","isMobile","EDeviceType","isPasswordVisible","setIsPasswordVisible","useState","fontSize","setFontSize","inputRef","useRef","canvasRef","handleKeyDown","useCallback","event","inputType","useMemo","inputColor","measureTextWidth","text","font","context","useEffect","inputWidth","handleChange","jsx","InputWrapper","jsxs","FlexView","PhoneCountrySelector","Styled.CustomInput","PasswordToggleIcon","prev","
|
|
1
|
+
{"version":3,"file":"custom-input-field.js","sources":["../../../../../src/features/auth/signup/custom-input-field/custom-input-field.tsx"],"sourcesContent":["import type { ICustomInputFieldProps } from './custom-input-field-types';\n\nimport {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n memo,\n type FC,\n type KeyboardEvent,\n type ChangeEvent,\n} from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport PhoneCountrySelector from './country-selector/country-selector';\nimport * as Styled from './custom-input-field-styled';\nimport InputWrapper from './input-wrapper/input-wrapper';\nimport PasswordToggleIcon from './password-toggle/password-toggle';\n\nconst CustomInputField: FC<ICustomInputFieldProps> = ({\n value,\n onChange,\n error,\n helperText,\n onEnter,\n isLoading,\n isValid,\n type = 'text',\n placeholder,\n actionElement,\n maxLength,\n width,\n textTransform,\n textAlign = 'center',\n selectedCountry,\n onCountryChange,\n autoSize = false,\n}) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n const [fontSize, setFontSize] = useState(isMobile ? 24 : 32);\n const inputRef = useRef<HTMLInputElement>(null);\n const canvasRef = useRef<HTMLCanvasElement | null>(null);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n onEnter?.();\n }\n },\n [onEnter],\n );\n\n const inputType = useMemo(() => {\n if (type === 'password') return isPasswordVisible ? 'text' : 'password';\n\n if (type === 'phone') return 'number';\n\n return type;\n }, [type, isPasswordVisible]);\n\n const inputColor = useMemo(() => {\n if (error) return theme.colors.RED;\n\n if (isValid) return theme.colors.GREEN_4;\n\n return theme.colors.WHITE;\n }, [error, isValid, theme.colors]);\n\n const measureTextWidth = useCallback((text: string, font: string): number => {\n if (!canvasRef.current) {\n canvasRef.current = document.createElement('canvas');\n }\n\n const context = canvasRef.current.getContext('2d');\n\n if (!context) return 0;\n\n context.font = font;\n\n return context.measureText(text).width;\n }, []);\n\n useEffect(() => {\n if (!inputRef.current || !value || !autoSize) {\n return;\n }\n\n if (isMobile) {\n setFontSize(24);\n\n return;\n }\n\n const inputWidth = inputRef.current.clientWidth;\n\n const font32 = \"32px 'Athletics-Light'\";\n\n const textWidth32 = measureTextWidth(value, font32);\n\n if (textWidth32 > inputWidth) {\n setFontSize(24);\n } else {\n setFontSize(32);\n }\n }, [value, measureTextWidth, autoSize, isMobile]);\n\n useEffect(() => {\n return () => {\n canvasRef.current = null;\n };\n }, []);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => onChange(event.target.value),\n [onChange],\n );\n\n return (\n <InputWrapper\n helperText={error || helperText}\n isLoading={isLoading}\n actionElement={actionElement}\n >\n <FlexView\n $width={width ?? '100%'}\n $flex={1}\n $alignItems=\"center\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n >\n {type === 'phone' && (\n <PhoneCountrySelector onChange={onCountryChange} value={selectedCountry} />\n )}\n <Styled.CustomInput\n ref={inputRef}\n value={value}\n onChange={handleChange}\n autoFocus\n placeholder={placeholder}\n color={inputColor}\n autoCapitalize=\"none\"\n textTransform={textTransform}\n type={inputType}\n onKeyDown={handleKeyDown}\n maxLength={maxLength}\n align={textAlign}\n fontSize={fontSize}\n />\n {type === 'password' && (\n <PasswordToggleIcon\n isVisible={isPasswordVisible}\n onToggle={() => setIsPasswordVisible(prev => !prev)}\n />\n )}\n </FlexView>\n </InputWrapper>\n );\n};\n\nexport default memo(CustomInputField);\n"],"names":["CustomInputField","value","onChange","error","helperText","onEnter","isLoading","isValid","type","placeholder","actionElement","maxLength","width","textTransform","textAlign","selectedCountry","onCountryChange","autoSize","theme","useTheme","isMobile","EDeviceType","isPasswordVisible","setIsPasswordVisible","useState","fontSize","setFontSize","inputRef","useRef","canvasRef","handleKeyDown","useCallback","event","inputType","useMemo","inputColor","measureTextWidth","text","font","context","useEffect","inputWidth","handleChange","jsx","InputWrapper","jsxs","FlexView","PhoneCountrySelector","Styled.CustomInput","PasswordToggleIcon","prev","customInputField","memo"],"mappings":"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"}
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
import { useContext as
|
|
2
|
-
import { JourneyContext as
|
|
1
|
+
import { useContext as r } from "react";
|
|
2
|
+
import { JourneyContext as e } from "./journey-context-provider.js";
|
|
3
3
|
const u = () => {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
setJourney: () => {
|
|
9
|
-
},
|
|
10
|
-
addCoachmark: () => {
|
|
11
|
-
},
|
|
12
|
-
clearJourney: () => {
|
|
13
|
-
},
|
|
14
|
-
endJourney: () => {
|
|
15
|
-
},
|
|
16
|
-
coachmarks: [],
|
|
17
|
-
userCompletedJourneyIds: [],
|
|
18
|
-
isJourneyActive: !1
|
|
19
|
-
};
|
|
4
|
+
const o = r(e);
|
|
5
|
+
if (!o)
|
|
6
|
+
throw new Error("useJourney must be used within a JourneyProvider");
|
|
7
|
+
return o;
|
|
20
8
|
};
|
|
21
9
|
export {
|
|
22
10
|
u as useJourney
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-journey.js","sources":["../../../../src/features/journey/use-journey/use-journey.tsx"],"sourcesContent":["import { useContext } from 'react';\n\nimport { JourneyContext } from './journey-context-provider';\n\nexport const useJourney = () => {\n const context = useContext(JourneyContext);\n\n if (!context) {\n
|
|
1
|
+
{"version":3,"file":"use-journey.js","sources":["../../../../src/features/journey/use-journey/use-journey.tsx"],"sourcesContent":["import { useContext } from 'react';\n\nimport { JourneyContext } from './journey-context-provider';\n\nexport const useJourney = () => {\n const context = useContext(JourneyContext);\n\n if (!context) {\n throw new Error('useJourney must be used within a JourneyProvider');\n }\n\n return context;\n};\n"],"names":["useJourney","context","useContext","JourneyContext"],"mappings":";;AAIO,MAAMA,IAAa,MAAM;AACxB,QAAAC,IAAUC,EAAWC,CAAc;AAEzC,MAAI,CAACF;AACG,UAAA,IAAI,MAAM,kDAAkD;AAG7D,SAAAA;AACT;"}
|
|
@@ -64,7 +64,7 @@ const F = (t, r) => {
|
|
|
64
64
|
id: l,
|
|
65
65
|
label: n
|
|
66
66
|
}), r;
|
|
67
|
-
}, []),
|
|
67
|
+
}, []), O = (t) => {
|
|
68
68
|
const {
|
|
69
69
|
currentGoalData: r,
|
|
70
70
|
enrollmentType: e,
|
|
@@ -120,7 +120,7 @@ const F = (t, r) => {
|
|
|
120
120
|
id: a,
|
|
121
121
|
label: _
|
|
122
122
|
})).sort((a, _) => a.label.toUpperCase() > _.label.toUpperCase() ? 1 : -1);
|
|
123
|
-
},
|
|
123
|
+
}, k = (t) => t.grades.reduce((r, e) => (e === "-1" || e === "0" ? r.push({
|
|
124
124
|
id: e,
|
|
125
125
|
label: e === "-1" ? "Pre-K" : "KG"
|
|
126
126
|
}) : r.push({
|
|
@@ -132,20 +132,14 @@ const F = (t, r) => {
|
|
|
132
132
|
return !(n.course_stream !== i || n.preference_category !== u || n.preference_grades.length > 0 && !n.preference_grades.includes(s) || !n.is_live);
|
|
133
133
|
};
|
|
134
134
|
return e == null ? void 0 : e.filter(l).map(
|
|
135
|
-
({
|
|
136
|
-
preference_code: n,
|
|
137
|
-
preference_name: s,
|
|
138
|
-
preference_description: i,
|
|
139
|
-
lottie_key: u
|
|
140
|
-
}) => ({
|
|
135
|
+
({ preference_code: n, preference_name: s, preference_description: i }) => ({
|
|
141
136
|
id: n,
|
|
142
137
|
label: s,
|
|
143
|
-
description: i
|
|
144
|
-
lottie: u
|
|
138
|
+
description: i
|
|
145
139
|
})
|
|
146
140
|
);
|
|
147
141
|
}, W = (t, r, e, l, n) => {
|
|
148
|
-
const { goal_curriculum_map: s } = t, i =
|
|
142
|
+
const { goal_curriculum_map: s } = t, i = k(t), u = ({ id: c }) => s.filter((d) => d.course_stream === e && d.is_live).some((d) => {
|
|
149
143
|
const {
|
|
150
144
|
available_grades: m,
|
|
151
145
|
goal_category: a,
|
|
@@ -218,7 +212,7 @@ const F = (t, r) => {
|
|
|
218
212
|
}, Y = (t, r, e, l, n, s, i, u, c) => {
|
|
219
213
|
const { goal_curriculum_map: d } = t, m = r === "no-test", a = A(r);
|
|
220
214
|
return d.find((f) => {
|
|
221
|
-
const o =
|
|
215
|
+
const o = O({
|
|
222
216
|
currentGoalData: f,
|
|
223
217
|
grade: e,
|
|
224
218
|
currentCountryCode: i,
|
|
@@ -254,7 +248,7 @@ export {
|
|
|
254
248
|
$ as getDefaultBoard,
|
|
255
249
|
q as getGoalsFromConfig,
|
|
256
250
|
W as getGradesBasedOnGoalAvailability,
|
|
257
|
-
|
|
251
|
+
k as getGradesFromConfig,
|
|
258
252
|
j as getMajorsFromConfigBasedOnBoardAndGrade,
|
|
259
253
|
M as getPreferencesFromConfig,
|
|
260
254
|
I as getRegionCodeBasedOnCountryCode,
|