@cuemath/leap 3.3.17-pawar.0 → 3.3.17
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/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/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/trial-session/comps/school-goals/school-goals.js +24 -25
- package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +358 -356
- package/dist/index.js.map +1 -1
- package/dist/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/package.json +1 -1
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
- /package/dist/node_modules/{query-string/node_modules/decode-uri-component → decode-uri-component}/index.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { memo as h } from "react";
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import
|
|
3
|
+
import { useTheme as s } from "styled-components";
|
|
4
|
+
import a from "../../../ui/layout/flex-view.js";
|
|
5
5
|
import { EDeviceType as p } from "../../../ui/theme/constants.js";
|
|
6
6
|
import { Container as d, ContentWrapper as f } from "./auth-page-layout-styled.js";
|
|
7
7
|
const u = ({
|
|
@@ -10,7 +10,7 @@ const u = ({
|
|
|
10
10
|
isFullWidth: t,
|
|
11
11
|
rightBlockBg: m = "BLACK_2"
|
|
12
12
|
}) => {
|
|
13
|
-
const { device: n } =
|
|
13
|
+
const { device: n } = s(), e = n <= p.TABLET;
|
|
14
14
|
return /* @__PURE__ */ c(d, { $width: "100%", $height: "100%", $flexDirection: "row", children: [
|
|
15
15
|
/* @__PURE__ */ r(
|
|
16
16
|
f,
|
|
@@ -20,10 +20,10 @@ const u = ({
|
|
|
20
20
|
children: i
|
|
21
21
|
}
|
|
22
22
|
),
|
|
23
|
-
!e && o && !t && /* @__PURE__ */ r(
|
|
23
|
+
!e && o && !t && /* @__PURE__ */ r(a, { $width: "50%", $background: m, children: o })
|
|
24
24
|
] });
|
|
25
|
-
},
|
|
25
|
+
}, L = h(u);
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
L as default
|
|
28
28
|
};
|
|
29
29
|
//# sourceMappingURL=auth-page-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-page-layout.js","sources":["../../../../../src/features/auth/comps/auth-page-layout/auth-page-layout.tsx"],"sourcesContent":["import type { IAuthPageLayoutProps } from './auth-page-layout-types';\n\nimport { memo, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport * as Styled from './auth-page-layout-styled';\n\nconst AuthPageLayout: FC<IAuthPageLayoutProps> = ({\n leftBlock,\n rightBlock,\n isFullWidth,\n rightBlockBg = 'BLACK_2',\n}) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n const showRightBlock = !isCompact && rightBlock && !isFullWidth;\n\n return (\n <Styled.Container $width=\"100%\" $height=\"100%\" $flexDirection=\"row\">\n <Styled.ContentWrapper\n $width={isFullWidth || isCompact ? '100%' : '50%'}\n $background=\"BLACK_1\"\n >\n {leftBlock}\n </Styled.ContentWrapper>\n {showRightBlock && (\n <FlexView $width=\"50%\" $background={rightBlockBg}>\n {rightBlock}\n </FlexView>\n )}\n </Styled.Container>\n );\n};\n\nexport default memo(AuthPageLayout);\n"],"names":["AuthPageLayout","leftBlock","rightBlock","isFullWidth","rightBlockBg","device","useTheme","isCompact","EDeviceType","jsxs","Styled.Container","jsx","Styled.ContentWrapper","FlexView","
|
|
1
|
+
{"version":3,"file":"auth-page-layout.js","sources":["../../../../../src/features/auth/comps/auth-page-layout/auth-page-layout.tsx"],"sourcesContent":["import type { IAuthPageLayoutProps } from './auth-page-layout-types';\n\nimport { memo, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport * as Styled from './auth-page-layout-styled';\n\nconst AuthPageLayout: FC<IAuthPageLayoutProps> = ({\n leftBlock,\n rightBlock,\n isFullWidth,\n rightBlockBg = 'BLACK_2',\n}) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n const showRightBlock = !isCompact && rightBlock && !isFullWidth;\n\n return (\n <Styled.Container $width=\"100%\" $height=\"100%\" $flexDirection=\"row\">\n <Styled.ContentWrapper\n $width={isFullWidth || isCompact ? '100%' : '50%'}\n $background=\"BLACK_1\"\n >\n {leftBlock}\n </Styled.ContentWrapper>\n {showRightBlock && (\n <FlexView $width=\"50%\" $background={rightBlockBg}>\n {rightBlock}\n </FlexView>\n )}\n </Styled.Container>\n );\n};\n\nexport default memo(AuthPageLayout);\n"],"names":["AuthPageLayout","leftBlock","rightBlock","isFullWidth","rightBlockBg","device","useTheme","isCompact","EDeviceType","jsxs","Styled.Container","jsx","Styled.ContentWrapper","FlexView","AuthPageLayout$1","memo"],"mappings":";;;;;;AASA,MAAMA,IAA2C,CAAC;AAAA,EAChD,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC,IAAe;AACjB,MAAM;AACE,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAYF,KAAUG,EAAY;AAItC,SAAA,gBAAAC,EAACC,GAAA,EAAiB,QAAO,QAAO,SAAQ,QAAO,gBAAe,OAC5D,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,QAAQT,KAAeI,IAAY,SAAS;AAAA,QAC5C,aAAY;AAAA,QAEX,UAAAN;AAAA,MAAA;AAAA,IACH;AAAA,IATmB,CAACM,KAAaL,KAAc,CAACC,KAW7C,gBAAAQ,EAAAE,GAAA,EAAS,QAAO,OAAM,aAAaT,GACjC,UACHF,GAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEeY,IAAAC,EAAKf,CAAc;"}
|
|
@@ -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,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 -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;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as
|
|
1
|
+
import { jsx as B } from "react/jsx-runtime";
|
|
2
|
+
import { memo as Y, useMemo as C, useCallback as m, useEffect as S } from "react";
|
|
3
3
|
import { GOAL_CATEGORY as s } from "../../../milestone/constants.js";
|
|
4
|
-
import { getCategorizedCurriculumStandards as
|
|
5
|
-
import { getGradesFromConfig as
|
|
4
|
+
import { getCategorizedCurriculumStandards as j } from "../../../milestone/create/comps/class-details-step/class-details-utils.js";
|
|
5
|
+
import { getGradesFromConfig as q, getGoalsFromConfig as v } from "../../../milestone/create/milestone-create-helpers.js";
|
|
6
6
|
import { epochTimestampAfterOneYear as G } from "../../../utils/utils.js";
|
|
7
|
-
import { useTrialSessionContext as
|
|
7
|
+
import { useTrialSessionContext as w } from "../../context/use-trial-session-context.js";
|
|
8
8
|
import { updateGoalInFormData as O } from "../../helper.js";
|
|
9
|
-
import
|
|
10
|
-
const Z =
|
|
9
|
+
import z from "./school-goals-view.js";
|
|
10
|
+
const Z = Y(() => {
|
|
11
11
|
const {
|
|
12
12
|
milestoneConfig: n,
|
|
13
13
|
formData: E,
|
|
@@ -15,18 +15,17 @@ const Z = B(() => {
|
|
|
15
15
|
updateButtonState: f,
|
|
16
16
|
onRemoveOptionalSlides: g,
|
|
17
17
|
trialHomeData: L
|
|
18
|
-
} =
|
|
19
|
-
() =>
|
|
18
|
+
} = w(), { name: p, grade: e, goals: t, curriculum: i, numberInNameError: N } = E || {}, { demo_info: I } = L, { stream: u, region_data: U } = I || {}, { opportunity_country: c = "US" } = U || {}, b = q(n), y = C(
|
|
19
|
+
() => j(n, {
|
|
20
20
|
countryCode: c,
|
|
21
21
|
grade: e ?? "",
|
|
22
22
|
goalCategory: s.SCHOOL_SUCCESS,
|
|
23
23
|
courseStream: u,
|
|
24
|
-
enrollmentType: "ONLINE"
|
|
25
|
-
flow: "CREATE"
|
|
24
|
+
enrollmentType: "ONLINE"
|
|
26
25
|
}),
|
|
27
26
|
[n, c, e, u]
|
|
28
27
|
), d = C(
|
|
29
|
-
() =>
|
|
28
|
+
() => v(n, {
|
|
30
29
|
countryCode: c,
|
|
31
30
|
grade: e ?? "",
|
|
32
31
|
goalCategory: s.SCHOOL_SUCCESS,
|
|
@@ -46,25 +45,25 @@ const Z = B(() => {
|
|
|
46
45
|
});
|
|
47
46
|
},
|
|
48
47
|
[a]
|
|
49
|
-
),
|
|
48
|
+
), H = m(
|
|
50
49
|
(o) => {
|
|
51
50
|
a({ numberInNameError: !1 }), r("name", o.target.value);
|
|
52
51
|
},
|
|
53
52
|
[a, r]
|
|
54
|
-
),
|
|
53
|
+
), T = m(
|
|
55
54
|
(o, l) => {
|
|
56
|
-
const { label:
|
|
55
|
+
const { label: x } = l, A = O(t, s.SCHOOL_SUCCESS, {
|
|
57
56
|
goal_code: o,
|
|
58
|
-
milestone_name:
|
|
57
|
+
milestone_name: x,
|
|
59
58
|
milestone_date_ts: G()
|
|
60
59
|
});
|
|
61
|
-
a({ goals:
|
|
60
|
+
a({ goals: A });
|
|
62
61
|
},
|
|
63
62
|
[t, a]
|
|
64
63
|
), D = m(
|
|
65
64
|
(o) => r("curriculum", o),
|
|
66
65
|
[r]
|
|
67
|
-
),
|
|
66
|
+
), F = m(
|
|
68
67
|
(o) => {
|
|
69
68
|
r("grade", o), r("curriculum", "");
|
|
70
69
|
},
|
|
@@ -84,20 +83,20 @@ const Z = B(() => {
|
|
|
84
83
|
});
|
|
85
84
|
a({ goals: l });
|
|
86
85
|
}
|
|
87
|
-
}, [d]), /* @__PURE__ */
|
|
88
|
-
|
|
86
|
+
}, [d]), /* @__PURE__ */ B(
|
|
87
|
+
z,
|
|
89
88
|
{
|
|
90
89
|
name: p,
|
|
91
90
|
grade: e,
|
|
92
|
-
grades:
|
|
91
|
+
grades: b,
|
|
93
92
|
goalsList: d,
|
|
94
93
|
curriculum: i,
|
|
95
94
|
selectedGoal: _,
|
|
96
95
|
numberInNameError: N,
|
|
97
|
-
curriculumStandards:
|
|
98
|
-
onNameChange:
|
|
99
|
-
onGoalChange:
|
|
100
|
-
onGradeChange:
|
|
96
|
+
curriculumStandards: y,
|
|
97
|
+
onNameChange: H,
|
|
98
|
+
onGoalChange: T,
|
|
99
|
+
onGradeChange: F,
|
|
101
100
|
onCurriculumChange: D
|
|
102
101
|
}
|
|
103
102
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"school-goals.js","sources":["../../../../../src/features/trial-session/comps/school-goals/school-goals.tsx"],"sourcesContent":["import type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\n\nimport { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getCategorizedCurriculumStandards } from '../../../milestone/create/comps/class-details-step/class-details-utils';\nimport {\n getGoalsFromConfig,\n getGradesFromConfig,\n} from '../../../milestone/create/milestone-create-helpers';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { updateGoalInFormData } from '../../helper';\nimport SchoolGoalsView from './school-goals-view';\n\nconst SchoolGoals = memo(() => {\n const {\n milestoneConfig,\n formData,\n updateSlideConfig,\n updateButtonState,\n onRemoveOptionalSlides,\n trialHomeData,\n } = useTrialSessionContext();\n const { name, grade, goals, curriculum, numberInNameError } = formData || {};\n\n const { demo_info: demoInfo } = trialHomeData;\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const grades = getGradesFromConfig(milestoneConfig);\n\n const curriculumStandards = useMemo(\n () =>\n getCategorizedCurriculumStandards(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.SCHOOL_SUCCESS,\n courseStream: stream,\n enrollmentType: 'ONLINE',\n
|
|
1
|
+
{"version":3,"file":"school-goals.js","sources":["../../../../../src/features/trial-session/comps/school-goals/school-goals.tsx"],"sourcesContent":["import type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\n\nimport { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getCategorizedCurriculumStandards } from '../../../milestone/create/comps/class-details-step/class-details-utils';\nimport {\n getGoalsFromConfig,\n getGradesFromConfig,\n} from '../../../milestone/create/milestone-create-helpers';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { updateGoalInFormData } from '../../helper';\nimport SchoolGoalsView from './school-goals-view';\n\nconst SchoolGoals = memo(() => {\n const {\n milestoneConfig,\n formData,\n updateSlideConfig,\n updateButtonState,\n onRemoveOptionalSlides,\n trialHomeData,\n } = useTrialSessionContext();\n const { name, grade, goals, curriculum, numberInNameError } = formData || {};\n\n const { demo_info: demoInfo } = trialHomeData;\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const grades = getGradesFromConfig(milestoneConfig);\n\n const curriculumStandards = useMemo(\n () =>\n getCategorizedCurriculumStandards(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.SCHOOL_SUCCESS,\n courseStream: stream,\n enrollmentType: 'ONLINE',\n }),\n [milestoneConfig, countryCode, grade, stream],\n );\n\n const goalsList = useMemo(\n () =>\n getGoalsFromConfig(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.SCHOOL_SUCCESS,\n courseStream: stream,\n curriculumStandard: curriculum,\n enrollmentType: 'ONLINE',\n }),\n [milestoneConfig, countryCode, grade, stream, curriculum],\n );\n\n const { goal_code: selectedGoal } = useMemo(\n () => goals?.find(goal => goal.goal_category === GOAL_CATEGORY.SCHOOL_SUCCESS) ?? {},\n [goals],\n );\n\n const hasRequiredFields = Boolean(name && grade && curriculum && selectedGoal);\n\n const updateStudentInformation = useCallback(\n (key: string, value: string) => {\n updateSlideConfig({\n [key]: value,\n ...(key === 'grade' || key === 'curriculum' ? { goals: [] } : {}),\n });\n },\n [updateSlideConfig],\n );\n\n const handleNameChange = useCallback<\n NonNullable<React.InputHTMLAttributes<HTMLInputElement>['onChange']>\n >(\n event => {\n updateSlideConfig({ numberInNameError: false });\n updateStudentInformation('name', event.target.value);\n },\n [updateSlideConfig, updateStudentInformation],\n );\n\n const handleGoalChange = useCallback(\n (value: string, option: ISelectOption<string | number>) => {\n const { label } = option;\n\n const updatedGoals = updateGoalInFormData(goals, GOAL_CATEGORY.SCHOOL_SUCCESS, {\n goal_code: value,\n milestone_name: label,\n milestone_date_ts: epochTimestampAfterOneYear(),\n });\n\n updateSlideConfig({ goals: updatedGoals });\n },\n [goals, updateSlideConfig],\n );\n\n const handleCurriculumChange = useCallback(\n (value: string) => updateStudentInformation('curriculum', value),\n [updateStudentInformation],\n );\n\n const handleGradeChange = useCallback(\n (value: string) => {\n updateStudentInformation('grade', value);\n updateStudentInformation('curriculum', '');\n },\n [updateStudentInformation],\n );\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: !hasRequiredFields, isLoading: false });\n }, [hasRequiredFields, updateButtonState]);\n\n useEffect(() => {\n if (grade) {\n onRemoveOptionalSlides?.(grade);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [grade]);\n\n useEffect(() => {\n // If there is only one goal in the list, set it as the selected goal\n // and update the form data with the goal code, milestone name, and date\n const defaultGoal = goalsList.length === 1 ? goalsList[0] : undefined;\n\n if (defaultGoal) {\n const goalToUpdate = updateGoalInFormData(goals, GOAL_CATEGORY.SCHOOL_SUCCESS, {\n goal_code: defaultGoal.id ?? '',\n milestone_name: defaultGoal.label ?? '',\n milestone_date_ts: epochTimestampAfterOneYear(),\n });\n\n updateSlideConfig({ goals: goalToUpdate });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [goalsList]);\n\n return (\n <SchoolGoalsView\n name={name}\n grade={grade}\n grades={grades}\n goalsList={goalsList}\n curriculum={curriculum}\n selectedGoal={selectedGoal}\n numberInNameError={numberInNameError}\n curriculumStandards={curriculumStandards}\n onNameChange={handleNameChange}\n onGoalChange={handleGoalChange}\n onGradeChange={handleGradeChange}\n onCurriculumChange={handleCurriculumChange}\n />\n );\n});\n\nexport default SchoolGoals;\n"],"names":["SchoolGoals","memo","milestoneConfig","formData","updateSlideConfig","updateButtonState","onRemoveOptionalSlides","trialHomeData","useTrialSessionContext","name","grade","goals","curriculum","numberInNameError","demoInfo","stream","regionData","countryCode","grades","getGradesFromConfig","curriculumStandards","useMemo","getCategorizedCurriculumStandards","GOAL_CATEGORY","goalsList","getGoalsFromConfig","selectedGoal","goal","hasRequiredFields","updateStudentInformation","useCallback","key","value","handleNameChange","event","handleGoalChange","option","label","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","handleCurriculumChange","handleGradeChange","useEffect","defaultGoal","goalToUpdate","jsx","SchoolGoalsView"],"mappings":";;;;;;;;;AAeM,MAAAA,IAAcC,EAAK,MAAM;AACvB,QAAA;AAAA,IACJ,iBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,eAAAC;AAAA,MACEC,EAAuB,GACrB,EAAE,MAAAC,GAAM,OAAAC,GAAO,OAAAC,GAAO,YAAAC,GAAY,mBAAAC,EAAkB,IAAIV,KAAY,IAEpE,EAAE,WAAWW,EAAa,IAAAP,GAC1B,EAAE,QAAAQ,GAAQ,aAAaC,EAAW,IAAIF,KAAY,CAAA,GAClD,EAAE,qBAAqBG,IAAc,KAAK,IAAID,KAAc,CAAA,GAC5DE,IAASC,EAAoBjB,CAAe,GAE5CkB,IAAsBC;AAAA,IAC1B,MACEC,EAAkCpB,GAAiB;AAAA,MACjD,aAAAe;AAAA,MACA,OAAOP,KAAS;AAAA,MAChB,cAAca,EAAc;AAAA,MAC5B,cAA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AoBD;AAAA,IAAA;AAAA,EAAA;AAG1B,CAAC;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3660,6 +3660,10 @@ export declare interface ISignUpProps {
|
|
|
3660
3660
|
onSignupStepsComplete: (data: IUpdateUserPayloadDal | ICreateUserResponseDal | null) => void;
|
|
3661
3661
|
}
|
|
3662
3662
|
|
|
3663
|
+
declare interface ISignupUnavailableProps {
|
|
3664
|
+
onGoToLogin?: () => void;
|
|
3665
|
+
}
|
|
3666
|
+
|
|
3663
3667
|
declare interface ISingleFieldFormProps {
|
|
3664
3668
|
onSubmit: (e?: FormEvent<HTMLFormElement>) => void;
|
|
3665
3669
|
onChange: (key: string, value: string) => void;
|
|
@@ -5432,6 +5436,8 @@ export declare const SignupMethods: NamedExoticComponent<ISignupMethodsProps>;
|
|
|
5432
5436
|
|
|
5433
5437
|
export declare const SignupOptions: NamedExoticComponent<ISignupOptionsProps>;
|
|
5434
5438
|
|
|
5439
|
+
export declare const SignupUnavailable: NamedExoticComponent<ISignupUnavailableProps>;
|
|
5440
|
+
|
|
5435
5441
|
declare const SketchIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
5436
5442
|
export { SketchIcon as ScribbleIcon }
|
|
5437
5443
|
export { SketchIcon }
|