@cuemath/leap 3.3.20 → 3.3.21-j1
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 +6 -5
- package/dist/features/auth/account-selector/account-selector-styled.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +51 -57
- 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.js +6 -6
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.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/journey/use-journey/use-journey.js +18 -6
- package/dist/features/journey/use-journey/use-journey.js.map +1 -1
- package/dist/features/sentry/constants/ignored.js +6 -10
- package/dist/features/sentry/constants/ignored.js.map +1 -1
- 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/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/index.d.ts +2 -7
- package/dist/index.js +356 -358
- 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/features/auth/signup-unavailable/signup-unavailable-styled.js +0 -16
- package/dist/features/auth/signup-unavailable/signup-unavailable-styled.js.map +0 -1
- package/dist/features/auth/signup-unavailable/signup-unavailable-view.js +0 -62
- package/dist/features/auth/signup-unavailable/signup-unavailable-view.js.map +0 -1
- package/dist/features/auth/signup-unavailable/signup-unavailable.js +0 -17
- package/dist/features/auth/signup-unavailable/signup-unavailable.js.map +0 -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,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
|
|
1
|
+
import o from "styled-components";
|
|
2
|
+
import r from "../../ui/layout/flex-view.js";
|
|
3
|
+
const i = o(r)`
|
|
4
|
+
overflow-y: auto;
|
|
5
|
+
width: 100%;
|
|
5
6
|
`;
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
i as UserListWrapper
|
|
8
9
|
};
|
|
9
10
|
//# 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 FlexView from '../../ui/layout/flex-view';\n\nexport const UserListWrapper = styled(FlexView)`\n overflow-y: auto;\n width: 100%;\n`;\n"],"names":["UserListWrapper","styled","FlexView"],"mappings":";;AAIa,MAAAA,IAAkBC,EAAOC,CAAQ;AAAA;AAAA;AAAA;"}
|
|
@@ -1,70 +1,64 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as h } 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
|
-
|
|
4
|
+
import { ILLUSTRATIONS as d } from "../../../assets/illustrations/illustrations.js";
|
|
5
|
+
import g from "../../ui/image/image.js";
|
|
6
|
+
import n from "../../ui/layout/flex-view.js";
|
|
7
|
+
import c from "../../ui/separator/separator.js";
|
|
8
|
+
import u from "../../ui/text/text.js";
|
|
9
|
+
import { EDeviceType as s } from "../../ui/theme/constants.js";
|
|
10
|
+
import x from "../comps/overlay-loader/overlay-loader.js";
|
|
11
|
+
import T from "../comps/user-list/user-list.js";
|
|
12
|
+
import { UserListWrapper as I } from "./account-selector-styled.js";
|
|
13
|
+
import L from "./comps/compact-header/account-selector-header.js";
|
|
14
|
+
const C = ({
|
|
15
|
+
userAccounts: o,
|
|
16
|
+
onSelect: a,
|
|
17
|
+
onAddNew: l,
|
|
18
|
+
isLoading: f,
|
|
19
|
+
onGoBack: p
|
|
18
20
|
}) => {
|
|
19
|
-
const { device:
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
21
|
+
const { device: i } = $(), t = i <= s.TABLET, r = i === s.MOBILE;
|
|
22
|
+
return /* @__PURE__ */ m(
|
|
23
|
+
n,
|
|
22
24
|
{
|
|
23
|
-
$flex:
|
|
24
|
-
$
|
|
25
|
-
$justifyContent: "center",
|
|
25
|
+
$alignItems: r ? "flex-start" : "center",
|
|
26
|
+
$justifyContent: r ? "flex-start" : "center",
|
|
26
27
|
$width: "100%",
|
|
27
|
-
$height: "
|
|
28
|
-
$gapX: 2,
|
|
28
|
+
$height: "100vh",
|
|
29
|
+
$gapX: t ? 0 : 2,
|
|
29
30
|
children: [
|
|
30
|
-
/* @__PURE__ */ e(
|
|
31
|
-
/* @__PURE__ */ e(
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
|
|
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,
|
|
31
|
+
/* @__PURE__ */ e(L, { onGoBack: p }),
|
|
32
|
+
/* @__PURE__ */ e(x, { isLoading: f }),
|
|
33
|
+
!t && /* @__PURE__ */ m(n, { $justifyContent: "center", $alignItems: "center", children: [
|
|
34
|
+
/* @__PURE__ */ e(
|
|
35
|
+
g,
|
|
40
36
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
]
|
|
37
|
+
src: d.CIRCLE_CUEMATH_LOGO_WHITE,
|
|
38
|
+
alt: "Parent Signup",
|
|
39
|
+
withLoader: !1,
|
|
40
|
+
width: 80
|
|
60
41
|
}
|
|
61
|
-
)
|
|
62
|
-
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ e(c, { heightX: 1 }),
|
|
44
|
+
/* @__PURE__ */ e(u, { $renderAs: "ab1", $color: "WHITE_T_60", $align: "center", children: "Switch between accounts" })
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ e(c, { 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: a, onAddNew: l, maxColumns: 3 })
|
|
55
|
+
}
|
|
56
|
+
)
|
|
63
57
|
]
|
|
64
58
|
}
|
|
65
59
|
);
|
|
66
|
-
},
|
|
60
|
+
}, W = h(C);
|
|
67
61
|
export {
|
|
68
|
-
|
|
62
|
+
W as default
|
|
69
63
|
};
|
|
70
64
|
//# 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';\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 $
|
|
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';\nimport AccountSelectorHeader from './comps/compact-header/account-selector-header';\n\nconst AccountSelector = ({\n userAccounts,\n onSelect,\n onAddNew,\n isLoading,\n onGoBack,\n}: IAccountSelectorViewProps) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n const isMobile = device === EDeviceType.MOBILE;\n\n return (\n <FlexView\n $alignItems={isMobile ? 'flex-start' : 'center'}\n $justifyContent={isMobile ? 'flex-start' : 'center'}\n $width=\"100%\"\n $height=\"100vh\"\n $gapX={isCompact ? 0 : 2}\n >\n <AccountSelectorHeader onGoBack={onGoBack} />\n <OverlayLoader isLoading={isLoading} />\n {!isCompact && (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n <Image\n src={ILLUSTRATIONS.CIRCLE_CUEMATH_LOGO_WHITE}\n alt=\"Parent Signup\"\n withLoader={false}\n width={80}\n />\n <Separator heightX={1} />\n <Text $renderAs=\"ab1\" $color=\"WHITE_T_60\" $align=\"center\">\n Switch between accounts\n </Text>\n </FlexView>\n )}\n <Separator height={isCompact ? 0 : 40} />\n <Styled.UserListWrapper\n $flex={isCompact ? 1 : 0}\n $justifyContent={isMobile ? 'flex-start' : 'center'}\n $alignItems={isMobile ? 'flex-start' : 'center'}\n $width=\"100%\"\n >\n {userAccounts.length > 0 && (\n <UserList users={userAccounts} onSelect={onSelect} onAddNew={onAddNew} maxColumns={3} />\n )}\n </Styled.UserListWrapper>\n </FlexView>\n );\n};\n\nexport default memo(AccountSelector);\n"],"names":["AccountSelector","userAccounts","onSelect","onAddNew","isLoading","onGoBack","device","useTheme","isCompact","EDeviceType","isMobile","jsxs","FlexView","jsx","AccountSelectorHeader","OverlayLoader","Image","ILLUSTRATIONS","Separator","Text","Styled.UserListWrapper","UserList","accountSelector","memo"],"mappings":";;;;;;;;;;;;;AAgBA,MAAMA,IAAkB,CAAC;AAAA,EACvB,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AACF,MAAiC;AACzB,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAYF,KAAUG,EAAY,QAClCC,IAAWJ,MAAWG,EAAY;AAGtC,SAAA,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,aAAaF,IAAW,eAAe;AAAA,MACvC,iBAAiBA,IAAW,eAAe;AAAA,MAC3C,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,OAAOF,IAAY,IAAI;AAAA,MAEvB,UAAA;AAAA,QAAA,gBAAAK,EAACC,KAAsB,UAAAT,GAAoB;AAAA,QAC3C,gBAAAQ,EAACE,KAAc,WAAAX,GAAsB;AAAA,QACpC,CAACI,KACA,gBAAAG,EAACC,KAAS,iBAAgB,UAAS,aAAY,UAC7C,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,KAAKC,EAAc;AAAA,cACnB,KAAI;AAAA,cACJ,YAAY;AAAA,cACZ,OAAO;AAAA,YAAA;AAAA,UACT;AAAA,UACA,gBAAAJ,EAACK,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,UACvB,gBAAAL,EAACM,KAAK,WAAU,OAAM,QAAO,cAAa,QAAO,UAAS,UAE1D,0BAAA,CAAA;AAAA,QAAA,GACF;AAAA,QAED,gBAAAN,EAAAK,GAAA,EAAU,QAAQV,IAAY,IAAI,IAAI;AAAA,QACvC,gBAAAK;AAAA,UAACO;AAAAA,UAAA;AAAA,YACC,OAAOZ,IAAY,IAAI;AAAA,YACvB,iBAAiBE,IAAW,eAAe;AAAA,YAC3C,aAAaA,IAAW,eAAe;AAAA,YACvC,QAAO;AAAA,YAEN,UAAAT,EAAa,SAAS,KACpB,gBAAAY,EAAAQ,GAAA,EAAS,OAAOpB,GAAc,UAAAC,GAAoB,UAAAC,GAAoB,YAAY,EAAG,CAAA;AAAA,UAAA;AAAA,QAE1F;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEemB,IAAAC,EAAKvB,CAAe;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as i } from "react";
|
|
3
|
+
import { useTheme as m } from "styled-components";
|
|
4
|
+
import l from "../../../../../assets/line-icons/icons/back2.js";
|
|
5
|
+
import n from "../../../../ui/buttons/clickable/clickable.js";
|
|
6
|
+
import a from "../../../../ui/layout/flex-view.js";
|
|
7
|
+
import p from "../../../../ui/text/text.js";
|
|
8
|
+
import { EDeviceType as s } from "../../../../ui/theme/constants.js";
|
|
9
|
+
const f = ({ onGoBack: e }) => {
|
|
10
|
+
const { device: r, colors: t } = m();
|
|
11
|
+
return r <= s.TABLET ? /* @__PURE__ */ c(
|
|
12
|
+
a,
|
|
13
|
+
{
|
|
14
|
+
$gutterX: 1,
|
|
15
|
+
$gapX: 1,
|
|
16
|
+
$flexDirection: "row",
|
|
17
|
+
$alignItems: "center",
|
|
18
|
+
$background: "WHITE_T_05",
|
|
19
|
+
$width: "100%",
|
|
20
|
+
$flexColumnGapX: 0.5,
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ o(n, { onClick: e, label: "Go back to previous page", children: /* @__PURE__ */ o(l, { color: t.WHITE_1, width: 24, height: 24 }) }),
|
|
23
|
+
/* @__PURE__ */ o(p, { $renderAs: "ab2", $color: "WHITE", children: "Profile Switcher" })
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
) : null;
|
|
27
|
+
}, w = i(f);
|
|
28
|
+
export {
|
|
29
|
+
w as default
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=account-selector-header.js.map
|
package/dist/features/auth/account-selector/comps/compact-header/account-selector-header.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-selector-header.js","sources":["../../../../../../src/features/auth/account-selector/comps/compact-header/account-selector-header.tsx"],"sourcesContent":["import type { IAccountSelectorHeaderProps } from './account-selector-header-types';\n\nimport { type FC, memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Back2Icon from '../../../../../assets/line-icons/icons/back2';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { EDeviceType } from '../../../../ui/theme/constants';\n\nconst AccountSelectorHeader: FC<IAccountSelectorHeaderProps> = ({ onGoBack }) => {\n const { device, colors } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n\n if (!isCompact) return null;\n\n return (\n <FlexView\n $gutterX={1}\n $gapX={1}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $background=\"WHITE_T_05\"\n $width=\"100%\"\n $flexColumnGapX={0.5}\n >\n <Clickable onClick={onGoBack} label=\"Go back to previous page\">\n <Back2Icon color={colors.WHITE_1} width={24} height={24} />\n </Clickable>\n <Text $renderAs=\"ab2\" $color=\"WHITE\">\n Profile Switcher\n </Text>\n </FlexView>\n );\n};\n\nexport default memo(AccountSelectorHeader);\n"],"names":["AccountSelectorHeader","onGoBack","device","colors","useTheme","EDeviceType","jsxs","FlexView","jsx","Clickable","Back2Icon","Text","AccountSelectorHeader$1","memo"],"mappings":";;;;;;;;AAWA,MAAMA,IAAyD,CAAC,EAAE,UAAAC,QAAe;AAC/E,QAAM,EAAE,QAAAC,GAAQ,QAAAC,EAAO,IAAIC,EAAS;AAGhC,SAFcF,KAAUG,EAAY,SAKtC,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,gBAAe;AAAA,MACf,aAAY;AAAA,MACZ,aAAY;AAAA,MACZ,QAAO;AAAA,MACP,iBAAiB;AAAA,MAEjB,UAAA;AAAA,QAAA,gBAAAC,EAACC,GAAU,EAAA,SAASR,GAAU,OAAM,4BAClC,UAAC,gBAAAO,EAAAE,GAAA,EAAU,OAAOP,EAAO,SAAS,OAAO,IAAI,QAAQ,GAAI,CAAA,GAC3D;AAAA,0BACCQ,GAAK,EAAA,WAAU,OAAM,QAAO,SAAQ,UAErC,oBAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAjBmB;AAoBzB,GAEeC,IAAAC,EAAKb,CAAqB;"}
|
|
@@ -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 a } from "styled-components";
|
|
4
|
+
import s 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 } = a(), 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(s, { $width: "50%", $background: m, children: o })
|
|
24
24
|
] });
|
|
25
|
-
},
|
|
25
|
+
}, A = h(u);
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
A 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","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;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import t from "styled-components";
|
|
2
2
|
import { UserItemCard as e } from "./user-item/user-item-styled.js";
|
|
3
|
-
const
|
|
3
|
+
const p = 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%;
|
|
10
11
|
`, s = t(e)`
|
|
11
12
|
&:hover {
|
|
12
13
|
background-color: ${({ theme: r }) => r.colors.BLACK_4};
|
|
@@ -14,6 +15,6 @@ const i = t.div`
|
|
|
14
15
|
`;
|
|
15
16
|
export {
|
|
16
17
|
s as AddAccountButton,
|
|
17
|
-
|
|
18
|
+
p as UserListWrapper
|
|
18
19
|
};
|
|
19
20
|
//# 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`;\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,
|
|
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 max-height: 100%;\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;AAAA,GAInCC,IAAmBJ,EAAOK,CAAY;AAAA;AAAA,wBAE3B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;"}
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
import { useContext as
|
|
2
|
-
import { JourneyContext as
|
|
1
|
+
import { useContext as o } from "react";
|
|
2
|
+
import { JourneyContext as r } from "./journey-context-provider.js";
|
|
3
3
|
const u = () => {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const e = o(r);
|
|
5
|
+
return e || {
|
|
6
|
+
nextCoachmark: () => {
|
|
7
|
+
},
|
|
8
|
+
setJourney: () => {
|
|
9
|
+
},
|
|
10
|
+
addCoachmark: () => {
|
|
11
|
+
},
|
|
12
|
+
clearJourney: () => {
|
|
13
|
+
},
|
|
14
|
+
endJourney: () => {
|
|
15
|
+
},
|
|
16
|
+
coachmarks: [],
|
|
17
|
+
userCompletedJourneyIds: [],
|
|
18
|
+
isJourneyActive: !1
|
|
19
|
+
};
|
|
8
20
|
};
|
|
9
21
|
export {
|
|
10
22
|
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 return {\n nextCoachmark: () => {},\n setJourney: () => {},\n addCoachmark: () => {},\n clearJourney: () => {},\n endJourney: () => {},\n coachmarks: [],\n userCompletedJourneyIds: [],\n isJourneyActive: false,\n };\n }\n\n return context;\n};\n"],"names":["useJourney","context","useContext","JourneyContext"],"mappings":";;AAIO,MAAMA,IAAa,MAAM;AACxB,QAAAC,IAAUC,EAAWC,CAAc;AAEzC,SAAKF,KACI;AAAA,IACL,eAAe,MAAM;AAAA,IAAC;AAAA,IACtB,YAAY,MAAM;AAAA,IAAC;AAAA,IACnB,cAAc,MAAM;AAAA,IAAC;AAAA,IACrB,cAAc,MAAM;AAAA,IAAC;AAAA,IACrB,YAAY,MAAM;AAAA,IAAC;AAAA,IACnB,YAAY,CAAC;AAAA,IACb,yBAAyB,CAAC;AAAA,IAC1B,iBAAiB;AAAA,EAAA;AAKvB;"}
|
|
@@ -18,17 +18,13 @@ const e = [
|
|
|
18
18
|
"null is not an object (evaluating 'Te.subscribeToVideo')",
|
|
19
19
|
"Cannot read property 'socketId' of null",
|
|
20
20
|
"NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.",
|
|
21
|
-
/PubNub call failed, check status for details
|
|
22
|
-
/**
|
|
23
|
-
* This error is thrown when a module script fails to load, which can happen for various reasons such as network issues or incorrect URLs.
|
|
24
|
-
* It is ignored because it does not indicate a bug in the application but rather a transient issue that can occur in production environments.
|
|
25
|
-
*
|
|
26
|
-
* https://cuemathcom.sentry.io/issues/4550897833/events/b0016bf9dfec4f50887480e7bf0f8ced/?project=1331407&statsPeriod=7d#exception
|
|
27
|
-
*/
|
|
28
|
-
/Importing a module script failed/
|
|
21
|
+
/PubNub call failed, check status for details/
|
|
29
22
|
], o = [
|
|
30
|
-
/static\.
|
|
31
|
-
|
|
23
|
+
/static\.mathigon\.org/i,
|
|
24
|
+
// /questions-ie\.learnosity\.com/i,
|
|
25
|
+
// /assess-ie\.learnosity\.com/i,
|
|
26
|
+
/static\.mathigon\.org\/api\/polypad-v1\.10\.js/i,
|
|
27
|
+
/static\.opentok\.com\/v2\/js\/opentok\.min\.js/i
|
|
32
28
|
];
|
|
33
29
|
export {
|
|
34
30
|
o as SENTRY_DENIED_URLS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ignored.js","sources":["../../../../src/features/sentry/constants/ignored.ts"],"sourcesContent":["const SENTRY_IGNORED_ERRORS: Array<string | RegExp> = [\n 'getSettings',\n 'ResizeObserver loop limit exceeded',\n 'Non-Error promise rejection captured',\n \"NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.\",\n \"Cannot read property 'getReadModeRender' of undefined\",\n \"Cannot read property 'getReadModeExtract' of undefined\",\n 'TypeError: Failed to fetch',\n 'privateSpecialRepair is not defined',\n \"Failed to execute 'send' on 'XMLHttpRequest'\",\n \"Cannot read properties of null (reading 'appendChild')\",\n \"SecurityError: Failed to execute 'replaceState' on 'History'\",\n \"Cannot read properties of null (reading 'postMessage')\",\n 'OT_HARDWARE_UNAVAILABLE',\n 'OT_UNABLE_TO_CAPTURE_SCREEN',\n 'OT_USER_MEDIA_ACCESS_DENIED',\n 'OT_UNEXPECTED_SERVER_RESPONSE',\n \"null is not an object (evaluating 'Te.subscribeToVideo')\",\n \"Cannot read property 'socketId' of null\",\n 'NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.',\n /PubNub call failed, check status for details/,\n
|
|
1
|
+
{"version":3,"file":"ignored.js","sources":["../../../../src/features/sentry/constants/ignored.ts"],"sourcesContent":["const SENTRY_IGNORED_ERRORS: Array<string | RegExp> = [\n 'getSettings',\n 'ResizeObserver loop limit exceeded',\n 'Non-Error promise rejection captured',\n \"NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.\",\n \"Cannot read property 'getReadModeRender' of undefined\",\n \"Cannot read property 'getReadModeExtract' of undefined\",\n 'TypeError: Failed to fetch',\n 'privateSpecialRepair is not defined',\n \"Failed to execute 'send' on 'XMLHttpRequest'\",\n \"Cannot read properties of null (reading 'appendChild')\",\n \"SecurityError: Failed to execute 'replaceState' on 'History'\",\n \"Cannot read properties of null (reading 'postMessage')\",\n 'OT_HARDWARE_UNAVAILABLE',\n 'OT_UNABLE_TO_CAPTURE_SCREEN',\n 'OT_USER_MEDIA_ACCESS_DENIED',\n 'OT_UNEXPECTED_SERVER_RESPONSE',\n \"null is not an object (evaluating 'Te.subscribeToVideo')\",\n \"Cannot read property 'socketId' of null\",\n 'NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.',\n /PubNub call failed, check status for details/,\n];\n\nconst SENTRY_DENIED_URLS: Array<string | RegExp> = [\n /static\\.mathigon\\.org/i,\n // /questions-ie\\.learnosity\\.com/i,\n // /assess-ie\\.learnosity\\.com/i,\n /static\\.mathigon\\.org\\/api\\/polypad-v1\\.10\\.js/i,\n /static\\.opentok\\.com\\/v2\\/js\\/opentok\\.min\\.js/i,\n];\n\nexport { SENTRY_IGNORED_ERRORS, SENTRY_DENIED_URLS };\n"],"names":["SENTRY_IGNORED_ERRORS","SENTRY_DENIED_URLS"],"mappings":"AAAA,MAAMA,IAAgD;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEMC,IAA6C;AAAA,EACjD;AAAA;AAAA;AAAA,EAGA;AAAA,EACA;AACF;"}
|
|
@@ -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,cAAcR;AAAA,MACd,gBAAgB;AAAA,IAAA,CACjB;AAAA,IACH,CAACb,GAAiBe,GAAaP,GAAOK,CAAM;AAAA,EAAA,GAGxCS,IAAYH;AAAA,IAChB,MACEI,EAAmBvB,GAAiB;AAAA,MAClC,aAAAe;AAAA,MACA,OAAOP,KAAS;AAAA,MAChB,cAAca,EAAc;AAAA,MAC5B,cAAcR;AAAA,MACd,oBAAoBH;AAAA,MACpB,gBAAgB;AAAA,IAAA,CACjB;AAAA,IACH,CAACV,GAAiBe,GAAaP,GAAOK,GAAQH,CAAU;AAAA,EAAA,GAGpD,EAAE,WAAWc,EAAA,IAAiBL;AAAA,IAClC,OAAMV,KAAA,gBAAAA,EAAO,KAAK,CAAAgB,MAAQA,EAAK,kBAAkBJ,EAAc,oBAAmB,CAAC;AAAA,IACnF,CAACZ,CAAK;AAAA,EAAA,GAGFiB,IAAoB,GAAQnB,KAAQC,KAASE,KAAcc,IAE3DG,IAA2BC;AAAA,IAC/B,CAACC,GAAaC,MAAkB;AACZ,MAAA5B,EAAA;AAAA,QAChB,CAAC2B,CAAG,GAAGC;AAAA,QACP,GAAID,MAAQ,WAAWA,MAAQ,eAAe,EAAE,OAAO,CAAG,EAAA,IAAI,CAAC;AAAA,MAAA,CAChE;AAAA,IACH;AAAA,IACA,CAAC3B,CAAiB;AAAA,EAAA,GAGd6B,IAAmBH;AAAA,IAGvB,CAASI,MAAA;AACW,MAAA9B,EAAA,EAAE,mBAAmB,GAAA,CAAO,GACrByB,EAAA,QAAQK,EAAM,OAAO,KAAK;AAAA,IACrD;AAAA,IACA,CAAC9B,GAAmByB,CAAwB;AAAA,EAAA,GAGxCM,IAAmBL;AAAA,IACvB,CAACE,GAAeI,MAA2C;AACnD,YAAA,EAAE,OAAAC,EAAU,IAAAD,GAEZE,IAAeC,EAAqB5B,GAAOY,EAAc,gBAAgB;AAAA,QAC7E,WAAWS;AAAA,QACX,gBAAgBK;AAAA,QAChB,mBAAmBG,EAA2B;AAAA,MAAA,CAC/C;AAEiB,MAAApC,EAAA,EAAE,OAAOkC,EAAA,CAAc;AAAA,IAC3C;AAAA,IACA,CAAC3B,GAAOP,CAAiB;AAAA,EAAA,GAGrBqC,IAAyBX;AAAA,IAC7B,CAACE,MAAkBH,EAAyB,cAAcG,CAAK;AAAA,IAC/D,CAACH,CAAwB;AAAA,EAAA,GAGrBa,IAAoBZ;AAAA,IACxB,CAACE,MAAkB;AACjB,MAAAH,EAAyB,SAASG,CAAK,GACvCH,EAAyB,cAAc,EAAE;AAAA,IAC3C;AAAA,IACA,CAACA,CAAwB;AAAA,EAAA;AAG3B,SAAAc,EAAU,MAAM;AACd,IAAAtC,EAAkB,SAAS,EAAE,YAAY,CAACuB,GAAmB,WAAW,IAAO;AAAA,EAAA,GAC9E,CAACA,GAAmBvB,CAAiB,CAAC,GAEzCsC,EAAU,MAAM;AACd,IAAIjC,MACFJ,KAAA,QAAAA,EAAyBI;AAAA,EAC3B,GAEC,CAACA,CAAK,CAAC,GAEViC,EAAU,MAAM;AAGd,UAAMC,IAAcpB,EAAU,WAAW,IAAIA,EAAU,CAAC,IAAI;AAE5D,QAAIoB,GAAa;AACf,YAAMC,IAAeN,EAAqB5B,GAAOY,EAAc,gBAAgB;AAAA,QAC7E,WAAWqB,EAAY,MAAM;AAAA,QAC7B,gBAAgBA,EAAY,SAAS;AAAA,QACrC,mBAAmBJ,EAA2B;AAAA,MAAA,CAC/C;AAEiB,MAAApC,EAAA,EAAE,OAAOyC,EAAA,CAAc;AAAA,IAC3C;AAAA,EAAA,GAEC,CAACrB,CAAS,CAAC,GAGZ,gBAAAsB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAtC;AAAA,MACA,OAAAC;AAAA,MACA,QAAAQ;AAAA,MACA,WAAAM;AAAA,MACA,YAAAZ;AAAA,MACA,cAAAc;AAAA,MACA,mBAAAb;AAAA,MACA,qBAAAO;AAAA,MACA,cAAca;AAAA,MACd,cAAcE;AAAA,MACd,eAAeO;AAAA,MACf,oBAAoBD;AAAA,IAAA;AAAA,EAAA;AAG1B,CAAC;"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useResumeTrialWorksheet as
|
|
6
|
-
import { useTrialSessionContext as
|
|
7
|
-
const
|
|
8
|
-
const { isTeacher: o, studentId: t, worksheet: r, updateSlideConfig:
|
|
9
|
-
if (
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as S, useCallback as T, useEffect as k } from "react";
|
|
3
|
+
import x from "../../../ui/error/error.js";
|
|
4
|
+
import E from "../../../ui/loader/app-loader/app-loader.js";
|
|
5
|
+
import { useResumeTrialWorksheet as A } from "../../api/trial-nodes.js";
|
|
6
|
+
import { useTrialSessionContext as D } from "../../context/use-trial-session-context.js";
|
|
7
|
+
const L = () => {
|
|
8
|
+
const { isTeacher: o, studentId: t, worksheet: r, updateSlideConfig: u, trialHomeData: c } = D(), [f, s] = S(!1), { demo_info: m } = c, { region_data: p } = m || {}, { opportunity_country: n = "US" } = p || {}, l = (h, d) => {
|
|
9
|
+
if (h && s(!0), d) {
|
|
10
10
|
const {
|
|
11
|
-
user_node_id:
|
|
12
|
-
node_id:
|
|
13
|
-
user_attempt_id:
|
|
14
|
-
node_type:
|
|
15
|
-
} =
|
|
16
|
-
|
|
11
|
+
user_node_id: g,
|
|
12
|
+
node_id: y,
|
|
13
|
+
user_attempt_id: I,
|
|
14
|
+
node_type: C
|
|
15
|
+
} = d;
|
|
16
|
+
u({ userNodeId: g, nodeId: y, attemptId: I, nodeType: C });
|
|
17
17
|
}
|
|
18
|
-
}, { patch:
|
|
19
|
-
onComplete:
|
|
20
|
-
}), e =
|
|
21
|
-
o && (s(!1),
|
|
22
|
-
}, [
|
|
23
|
-
return
|
|
18
|
+
}, { patch: i, isProcessing: _ } = A({
|
|
19
|
+
onComplete: l
|
|
20
|
+
}), e = T(() => {
|
|
21
|
+
o && (s(!1), i(t, { country_code: n }));
|
|
22
|
+
}, [n, o, i, t]);
|
|
23
|
+
return k(() => {
|
|
24
24
|
e();
|
|
25
|
-
}, [e]),
|
|
25
|
+
}, [e]), f ? /* @__PURE__ */ a(x, { height: "100%", onTryAgain: e }) : _ || !r ? /* @__PURE__ */ a(E, { height: "100%" }) : r;
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
L as default
|
|
29
29
|
};
|
|
30
30
|
//# sourceMappingURL=worksheet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worksheet.js","sources":["../../../../../src/features/trial-session/comps/worksheet/worksheet.tsx"],"sourcesContent":["import type { IResumeWorksheetModel } from '../../../../types/models/worksheet';\nimport type { FC } from 'react';\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport Error from '../../../ui/error/error';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport { useResumeTrialWorksheet } from '../../api/trial-nodes';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\n\nconst SessionWorksheet: FC = () => {\n const { isTeacher, studentId, worksheet, updateSlideConfig, trialHomeData } =\n useTrialSessionContext();\n const [isError, setIserror] = useState<boolean>(false);\n\n const { demo_info: demoInfo } = trialHomeData;\n const { region_data: regionData
|
|
1
|
+
{"version":3,"file":"worksheet.js","sources":["../../../../../src/features/trial-session/comps/worksheet/worksheet.tsx"],"sourcesContent":["import type { IResumeWorksheetModel } from '../../../../types/models/worksheet';\nimport type { FC } from 'react';\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport Error from '../../../ui/error/error';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport { useResumeTrialWorksheet } from '../../api/trial-nodes';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\n\nconst SessionWorksheet: FC = () => {\n const { isTeacher, studentId, worksheet, updateSlideConfig, trialHomeData } =\n useTrialSessionContext();\n const [isError, setIserror] = useState<boolean>(false);\n\n const { demo_info: demoInfo } = trialHomeData;\n const { region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n\n const onComplete = (error: string | null, sheetData?: IResumeWorksheetModel) => {\n if (error) {\n setIserror(true);\n }\n\n if (sheetData) {\n const {\n user_node_id: userNodeId,\n node_id: nodeId,\n user_attempt_id: attemptId,\n node_type: nodeType,\n } = sheetData;\n\n updateSlideConfig({ userNodeId, nodeId, attemptId, nodeType });\n }\n };\n\n const { patch: resumeNode, isProcessing } = useResumeTrialWorksheet({\n onComplete,\n });\n\n const fetchData = useCallback(() => {\n if (isTeacher) {\n setIserror(false);\n resumeNode(studentId, { country_code: countryCode });\n }\n }, [countryCode, isTeacher, resumeNode, studentId]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n if (isError) {\n return <Error height=\"100%\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || !worksheet) {\n return <AppLoader height=\"100%\" />;\n }\n\n return worksheet;\n};\n\nexport default SessionWorksheet;\n"],"names":["SessionWorksheet","isTeacher","studentId","worksheet","updateSlideConfig","trialHomeData","useTrialSessionContext","isError","setIserror","useState","demoInfo","regionData","countryCode","onComplete","error","sheetData","userNodeId","nodeId","attemptId","nodeType","resumeNode","isProcessing","useResumeTrialWorksheet","fetchData","useCallback","useEffect","jsx","Error","AppLoader"],"mappings":";;;;;;AAUA,MAAMA,IAAuB,MAAM;AACjC,QAAM,EAAE,WAAAC,GAAW,WAAAC,GAAW,WAAAC,GAAW,mBAAAC,GAAmB,eAAAC,EAAA,IAC1DC,KACI,CAACC,GAASC,CAAU,IAAIC,EAAkB,EAAK,GAE/C,EAAE,WAAWC,EAAa,IAAAL,GAC1B,EAAE,aAAaM,MAAeD,KAAY,CAAA,GAC1C,EAAE,qBAAqBE,IAAc,KAAK,IAAID,KAAc,CAAA,GAE5DE,IAAa,CAACC,GAAsBC,MAAsC;AAK9E,QAJID,KACFN,EAAW,EAAI,GAGbO,GAAW;AACP,YAAA;AAAA,QACJ,cAAcC;AAAA,QACd,SAASC;AAAA,QACT,iBAAiBC;AAAA,QACjB,WAAWC;AAAA,MACT,IAAAJ;AAEJ,MAAAX,EAAkB,EAAE,YAAAY,GAAY,QAAAC,GAAQ,WAAAC,GAAW,UAAAC,EAAU,CAAA;AAAA,IAC/D;AAAA,EAAA,GAGI,EAAE,OAAOC,GAAY,cAAAC,EAAA,IAAiBC,EAAwB;AAAA,IAClE,YAAAT;AAAA,EAAA,CACD,GAEKU,IAAYC,EAAY,MAAM;AAClC,IAAIvB,MACFO,EAAW,EAAK,GAChBY,EAAWlB,GAAW,EAAE,cAAcU,EAAa,CAAA;AAAA,KAEpD,CAACA,GAAaX,GAAWmB,GAAYlB,CAAS,CAAC;AAMlD,SAJAuB,EAAU,MAAM;AACJ,IAAAF;EAAA,GACT,CAACA,CAAS,CAAC,GAEVhB,IACM,gBAAAmB,EAAAC,GAAA,EAAM,QAAO,QAAO,YAAYJ,EAAW,CAAA,IAGjDF,KAAgB,CAAClB,IACZ,gBAAAuB,EAACE,GAAU,EAAA,QAAO,OAAO,CAAA,IAG3BzB;AACT;"}
|