@cuemath/leap 3.2.28 → 3.2.29-j2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +11 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lottie/lottie.js +3 -0
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/constants/config.js +5 -0
- package/dist/constants/config.js.map +1 -0
- package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js +6 -6
- package/dist/features/student-details/class-details/class-details-utils.js +6 -6
- package/dist/features/trial-session/comps/pla/cuemath-app-features/cuemath-app-features-constants.js +25 -0
- package/dist/features/trial-session/comps/pla/cuemath-app-features/cuemath-app-features-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/cuemath-app-features/cuemath-app-features-styled.js +15 -0
- package/dist/features/trial-session/comps/pla/cuemath-app-features/cuemath-app-features-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/cuemath-app-features/cuemath-app-features.js +90 -0
- package/dist/features/trial-session/comps/pla/cuemath-app-features/cuemath-app-features.js.map +1 -0
- package/dist/features/trial-session/comps/pla/math-practice/math-practice-constants.js +19 -0
- package/dist/features/trial-session/comps/pla/math-practice/math-practice-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/math-practice/math-practice-styled.js +32 -0
- package/dist/features/trial-session/comps/pla/math-practice/math-practice-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/math-practice/math-practice.js +59 -0
- package/dist/features/trial-session/comps/pla/math-practice/math-practice.js.map +1 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js +25 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js +43 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js +49 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +11 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +19 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js +17 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status.js +243 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js +52 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +52 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js +17 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +56 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js +17 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js +88 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +1 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.js +12 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.js.map +1 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +71 -36
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +171 -57
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/index.d.ts +56 -0
- package/dist/index.js +215 -203
- package/dist/index.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +10 -0
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +1 -0
- package/dist/node_modules/date-fns/differenceInMilliseconds.js +9 -0
- package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +1 -0
- package/dist/node_modules/date-fns/differenceInSeconds.js +11 -0
- package/dist/node_modules/date-fns/differenceInSeconds.js.map +1 -0
- package/dist/node_modules/date-fns/fromUnixTime.js +9 -0
- package/dist/node_modules/date-fns/fromUnixTime.js.map +1 -0
- 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/dist/static/arrow-board-green.11e75bca.svg +1 -0
- package/dist/static/book-checked-green.c275dbd9.svg +1 -0
- package/dist/static/book-checked-orange.53ea6880.svg +1 -0
- package/dist/static/book-checked-purple.df628f3e.svg +1 -0
- package/dist/static/calendar-check-green.ab0e24d2.svg +1 -0
- package/dist/static/calendar-cross-orange.8e7a23bd.svg +1 -0
- package/dist/static/calendar-hour-glass-orange.e99f8ffd.json +1 -0
- package/dist/static/handshake-green.f8d24216.svg +1 -0
- package/dist/static/knowledge-blue.ead536f1.svg +1 -0
- package/dist/static/platform-green.eb853207.svg +1 -0
- package/dist/static/platform-purple.ecf6fa46.svg +1 -0
- package/dist/static/radial-gradient.5ae0cde5.svg +1 -0
- package/dist/static/teacher-found.0ba07d4a.json +1 -0
- package/dist/static/teacher-search.552c8ba2.json +1 -0
- package/package.json +1 -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
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { memo as a, useCallback as g } from "react";
|
|
3
|
+
import { useTheme as u } from "styled-components";
|
|
4
|
+
import b from "../../../../../../assets/line-icons/icons/chevron-right.js";
|
|
5
|
+
import C from "../../../../../ui/buttons/clickable/clickable.js";
|
|
6
|
+
import w from "../../../../../ui/image/image.js";
|
|
7
|
+
import e from "../../../../../ui/layout/flex-view.js";
|
|
8
|
+
import T from "../../../../../ui/separator/separator.js";
|
|
9
|
+
import c from "../../../../../ui/text/text.js";
|
|
10
|
+
import { EDeviceType as x } from "../../../../../ui/theme/constants.js";
|
|
11
|
+
import { ImageWrapper as E } from "./summary-card-styled.js";
|
|
12
|
+
const A = a(
|
|
13
|
+
({
|
|
14
|
+
title: m,
|
|
15
|
+
description: h,
|
|
16
|
+
image: s,
|
|
17
|
+
textBG: t,
|
|
18
|
+
ctaLabel: $,
|
|
19
|
+
keyId: o,
|
|
20
|
+
isDemoDone: d,
|
|
21
|
+
onClick: n
|
|
22
|
+
}) => {
|
|
23
|
+
const f = u().device <= x.MOBILE, p = g(() => {
|
|
24
|
+
o && n && n(o);
|
|
25
|
+
}, [o, n]), l = /* @__PURE__ */ i(e, { $flex: 1, children: [
|
|
26
|
+
/* @__PURE__ */ r(E, { $height: 84, $width: "100%", $background: t, children: /* @__PURE__ */ r(w, { src: s, height: 84, width: "100%", withLoader: !1 }) }),
|
|
27
|
+
/* @__PURE__ */ i(e, { $gap: 12, $gutter: 16, $background: t, $flex: 1, children: [
|
|
28
|
+
/* @__PURE__ */ r(c, { $renderAs: "ac3-black", $renderOnMobileAs: "ac4-black", $color: "WHITE", children: m }),
|
|
29
|
+
/* @__PURE__ */ r(T, { height: f ? 8 : 12 }),
|
|
30
|
+
/* @__PURE__ */ r(c, { $renderAs: "ub3", $color: "WHITE", children: h })
|
|
31
|
+
] })
|
|
32
|
+
] }, m);
|
|
33
|
+
return d && o ? /* @__PURE__ */ i(e, { children: [
|
|
34
|
+
l,
|
|
35
|
+
/* @__PURE__ */ r(C, { label: o, onClick: p, children: /* @__PURE__ */ r(e, { $background: t, children: /* @__PURE__ */ i(
|
|
36
|
+
e,
|
|
37
|
+
{
|
|
38
|
+
$background: "BLACK_T_38",
|
|
39
|
+
$gapX: 0.5,
|
|
40
|
+
$gutterX: 0.5,
|
|
41
|
+
$flexDirection: "row",
|
|
42
|
+
$alignItems: "center",
|
|
43
|
+
$justifyContent: "space-between",
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ r(e, { $gutterX: 0.5, $flexDirection: "row", $alignItems: "center", children: /* @__PURE__ */ r(c, { $renderAs: "ac4", $color: "WHITE_1", children: $ }) }),
|
|
46
|
+
/* @__PURE__ */ r(b, { width: 24, height: 24, color: "WHITE" })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
) }) })
|
|
50
|
+
] }) : l;
|
|
51
|
+
}
|
|
52
|
+
), O = a(A);
|
|
53
|
+
export {
|
|
54
|
+
O as default
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=summary-card.js.map
|
package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary-card.js","sources":["../../../../../../../src/features/trial-session/comps/pla/session-summary/summary-card/summary-card.tsx"],"sourcesContent":["import type { ISessionSummaryCardProps } from './summary-card-types';\n\nimport { memo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport ChevronRightIcon from '../../../../../../assets/line-icons/icons/chevron-right';\nimport Clickable from '../../../../../ui/buttons/clickable/clickable';\nimport Image from '../../../../../ui/image/image';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Separator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\nimport { EDeviceType } from '../../../../../ui/theme/constants';\nimport * as Styled from './summary-card-styled';\n\nconst SessionSummaryCard = memo(\n ({\n title,\n description,\n image,\n textBG,\n ctaLabel,\n keyId,\n isDemoDone,\n onClick,\n }: ISessionSummaryCardProps) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n const handleClick = useCallback(() => {\n if (keyId && onClick) onClick(keyId);\n }, [keyId, onClick]);\n\n const CardContent = (\n <FlexView key={title} $flex={1}>\n <Styled.ImageWrapper $height={84} $width=\"100%\" $background={textBG}>\n <Image src={image} height={84} width=\"100%\" withLoader={false} />\n </Styled.ImageWrapper>\n <FlexView $gap={12} $gutter={16} $background={textBG} $flex={1}>\n <Text $renderAs=\"ac3-black\" $renderOnMobileAs=\"ac4-black\" $color=\"WHITE\">\n {title}\n </Text>\n <Separator height={isMobile ? 8 : 12} />\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n {description}\n </Text>\n </FlexView>\n </FlexView>\n );\n\n return isDemoDone && keyId ? (\n <FlexView>\n {CardContent}\n <Clickable label={keyId} onClick={handleClick}>\n <FlexView $background={textBG}>\n <FlexView\n $background=\"BLACK_T_38\"\n $gapX={0.5}\n $gutterX={0.5}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n >\n <FlexView $gutterX={0.5} $flexDirection=\"row\" $alignItems=\"center\">\n <Text $renderAs=\"ac4\" $color=\"WHITE_1\">\n {ctaLabel}\n </Text>\n </FlexView>\n <ChevronRightIcon width={24} height={24} color=\"WHITE\" />\n </FlexView>\n </FlexView>\n </Clickable>\n </FlexView>\n ) : (\n CardContent\n );\n },\n);\n\nexport default memo(SessionSummaryCard);\n"],"names":["SessionSummaryCard","memo","title","description","image","textBG","ctaLabel","keyId","isDemoDone","onClick","isMobile","useTheme","EDeviceType","handleClick","useCallback","CardContent","jsxs","FlexView","jsx","Styled.ImageWrapper","Image","Text","Separator","Clickable","ChevronRightIcon","SessionSummaryCard$1"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAqBC;AAAA,EACzB,CAAC;AAAA,IACC,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,SAAAC;AAAA,EAAA,MAC8B;AAExB,UAAAC,IADQC,IACS,UAAUC,EAAY,QAEvCC,IAAcC,EAAY,MAAM;AAChC,MAAAP,KAASE,KAASA,EAAQF,CAAK;AAAA,IAAA,GAClC,CAACA,GAAOE,CAAO,CAAC,GAEbM,IACJ,gBAAAC,EAACC,GAAqB,EAAA,OAAO,GAC3B,UAAA;AAAA,MAAA,gBAAAC,EAACC,GAAA,EAAoB,SAAS,IAAI,QAAO,QAAO,aAAad,GAC3D,4BAACe,GAAM,EAAA,KAAKhB,GAAO,QAAQ,IAAI,OAAM,QAAO,YAAY,GAAO,CAAA,GACjE;AAAA,MACA,gBAAAY,EAACC,KAAS,MAAM,IAAI,SAAS,IAAI,aAAaZ,GAAQ,OAAO,GAC3D,UAAA;AAAA,QAAA,gBAAAa,EAACG,KAAK,WAAU,aAAY,mBAAkB,aAAY,QAAO,SAC9D,UACHnB,EAAA,CAAA;AAAA,QACC,gBAAAgB,EAAAI,GAAA,EAAU,QAAQZ,IAAW,IAAI,IAAI;AAAA,0BACrCW,GAAK,EAAA,WAAU,OAAM,QAAO,SAC1B,UACHlB,GAAA;AAAA,MAAA,GACF;AAAA,IAAA,EAAA,GAZaD,CAaf;AAGK,WAAAM,KAAcD,IACnB,gBAAAS,EAACC,GACE,EAAA,UAAA;AAAA,MAAAF;AAAA,MACD,gBAAAG,EAACK,KAAU,OAAOhB,GAAO,SAASM,GAChC,UAAA,gBAAAK,EAACD,GAAS,EAAA,aAAaZ,GACrB,UAAA,gBAAAW;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,aAAY;AAAA,UACZ,OAAO;AAAA,UACP,UAAU;AAAA,UACV,gBAAe;AAAA,UACf,aAAY;AAAA,UACZ,iBAAgB;AAAA,UAEhB,UAAA;AAAA,YAAA,gBAAAC,EAACD,GAAS,EAAA,UAAU,KAAK,gBAAe,OAAM,aAAY,UACxD,UAAC,gBAAAC,EAAAG,GAAA,EAAK,WAAU,OAAM,QAAO,WAC1B,YACH,CAAA,GACF;AAAA,8BACCG,GAAiB,EAAA,OAAO,IAAI,QAAQ,IAAI,OAAM,SAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,SAE3D,EACF,CAAA;AAAA,IAAA,EACF,CAAA,IAEAT;AAAA,EAEJ;AACF,GAEeU,IAAAxB,EAAKD,CAAkB;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import t from "styled-components";
|
|
2
|
+
import r from "../../../../ui/layout/flex-view.js";
|
|
3
|
+
const p = t(r)`
|
|
4
|
+
border-bottom: ${({ theme: o }) => `1px solid ${o.colors.BLACK_5}`};
|
|
5
|
+
min-height: 52px;
|
|
6
|
+
`, s = t(r)`
|
|
7
|
+
border-right: ${({ theme: o }) => `1px solid ${o.colors.BLACK_5}`};
|
|
8
|
+
`, d = t(r)`
|
|
9
|
+
padding-bottom: 0;
|
|
10
|
+
min-width: 22px;
|
|
11
|
+
`;
|
|
12
|
+
export {
|
|
13
|
+
d as DateWrapper,
|
|
14
|
+
s as DayLabel,
|
|
15
|
+
p as SessionRow
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=upcoming-sessions-styled.js.map
|
package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upcoming-sessions-styled.js","sources":["../../../../../../src/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nconst SessionRow = styled(FlexView)`\n border-bottom: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n min-height: 52px;\n`;\n\nconst DayLabel = styled(FlexView)`\n border-right: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n`;\nconst DateWrapper = styled(FlexView)`\n padding-bottom: 0;\n min-width: 22px;\n`;\n\nexport { SessionRow, DayLabel, DateWrapper };\n"],"names":["SessionRow","styled","FlexView","theme","DayLabel","DateWrapper"],"mappings":";;AAIM,MAAAA,IAAaC,EAAOC,CAAQ;AAAA,mBACf,CAAC,EAAE,OAAAC,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA;AAAA,GAI/DC,IAAWH,EAAOC,CAAQ;AAAA,kBACd,CAAC,EAAE,OAAAC,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA,GAE9DE,IAAcJ,EAAOC,CAAQ;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as E, useCallback as b } from "react";
|
|
3
|
+
import { useTheme as C } from "styled-components";
|
|
4
|
+
import I from "../../../../../assets/line-icons/icons/check2.js";
|
|
5
|
+
import { CUEMATH_APP_URL as w } from "../../../../../constants/config.js";
|
|
6
|
+
import x from "../../../../ui/buttons/text-button/text-button.js";
|
|
7
|
+
import n from "../../../../ui/layout/flex-view.js";
|
|
8
|
+
import d from "../../../../ui/separator/separator.js";
|
|
9
|
+
import i from "../../../../ui/text/text.js";
|
|
10
|
+
import { EDeviceType as y } from "../../../../ui/theme/constants.js";
|
|
11
|
+
import { SessionRow as A, DayLabel as D, DateWrapper as H } from "./upcoming-sessions-styled.js";
|
|
12
|
+
import { addDays as M } from "../../../../../node_modules/date-fns/addDays.js";
|
|
13
|
+
import { isToday as W } from "../../../../../node_modules/date-fns/isToday.js";
|
|
14
|
+
import { formatDate as s } from "../../../../../node_modules/date-fns/format.js";
|
|
15
|
+
const k = ({ sessions: p = [] }) => {
|
|
16
|
+
const c = C(), $ = c.device <= y.MOBILE, f = /* @__PURE__ */ new Date(), h = new Map(
|
|
17
|
+
p.map((o) => [
|
|
18
|
+
s(new Date(o.next_session_start * 1e3), "yyyy-MM-dd"),
|
|
19
|
+
o
|
|
20
|
+
])
|
|
21
|
+
), T = Array.from({ length: 7 }, (o, l) => M(f, l)), _ = b(() => {
|
|
22
|
+
window.open(w, "_blank");
|
|
23
|
+
}, []);
|
|
24
|
+
return /* @__PURE__ */ t(n, { children: [
|
|
25
|
+
/* @__PURE__ */ t(n, { children: [
|
|
26
|
+
/* @__PURE__ */ e(i, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: "Upcoming sessions" }),
|
|
27
|
+
/* @__PURE__ */ e(d, { height: 4 }),
|
|
28
|
+
/* @__PURE__ */ t(n, { $flexDirection: "row", $alignItems: "center", $flexColumnGapX: 0.25, children: [
|
|
29
|
+
/* @__PURE__ */ e(i, { $renderAs: "ub1", $color: "WHITE_T_60", children: "For more details," }),
|
|
30
|
+
/* @__PURE__ */ e(x, { label: "download the Cuemath app", onClick: _, color: "WHITE" })
|
|
31
|
+
] })
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ e(d, { height: $ ? 16 : 20 }),
|
|
34
|
+
/* @__PURE__ */ e(n, { $borderColor: "BLACK_5", children: T.map((o) => {
|
|
35
|
+
const l = s(o, "yyyy-MM-dd"), r = h.get(l), m = W(o), a = (r == null ? void 0 : r.session_status) === "COMPLETED", g = (r == null ? void 0 : r.session_status) === "IN_FUTURE" ? "GREEN_6" : "BLACK_1", u = a ? "WHITE_T_10" : g;
|
|
36
|
+
return /* @__PURE__ */ t(A, { $flex: 1, $flexDirection: "row", children: [
|
|
37
|
+
/* @__PURE__ */ t(
|
|
38
|
+
D,
|
|
39
|
+
{
|
|
40
|
+
$width: 80,
|
|
41
|
+
$flexDirection: "row",
|
|
42
|
+
$alignItems: "center",
|
|
43
|
+
$flexColumnGapX: 0.25,
|
|
44
|
+
$gutterX: 1,
|
|
45
|
+
$gapX: 0.5,
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ e(i, { $renderAs: "ac4-black", $color: "WHITE_1", children: s(o, "EEE").toUpperCase() }),
|
|
48
|
+
/* @__PURE__ */ e(
|
|
49
|
+
H,
|
|
50
|
+
{
|
|
51
|
+
$background: m ? "WHITE" : "TRANSPARENT",
|
|
52
|
+
$width: 22,
|
|
53
|
+
$height: 22,
|
|
54
|
+
$alignItems: "center",
|
|
55
|
+
$justifyContent: "center",
|
|
56
|
+
$borderRadius: 11,
|
|
57
|
+
$gutter: 1,
|
|
58
|
+
$gap: 2,
|
|
59
|
+
children: /* @__PURE__ */ e(i, { $renderAs: "ab3-bold", $color: m ? "BLACK_1" : "WHITE_1", children: s(o, "d") })
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ t(
|
|
66
|
+
n,
|
|
67
|
+
{
|
|
68
|
+
$flex: 1,
|
|
69
|
+
$gutterX: 1,
|
|
70
|
+
$gap: 14,
|
|
71
|
+
$background: u,
|
|
72
|
+
$flexDirection: "row",
|
|
73
|
+
$justifyContent: "space-between",
|
|
74
|
+
$alignItems: "center",
|
|
75
|
+
children: [
|
|
76
|
+
r ? /* @__PURE__ */ e(i, { $renderAs: "ab2", $color: a ? "WHITE_T_38" : "WHITE", children: s(new Date(r.next_session_start * 1e3), "p") }) : null,
|
|
77
|
+
a && /* @__PURE__ */ e(I, { color: c.colors.WHITE_T_38 })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] }, l);
|
|
82
|
+
}) })
|
|
83
|
+
] });
|
|
84
|
+
}, V = E(k);
|
|
85
|
+
export {
|
|
86
|
+
V as default
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=upcoming-sessions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upcoming-sessions.js","sources":["../../../../../../src/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.tsx"],"sourcesContent":["import type { TColorNames } from '../../../../ui/types';\nimport type { IUpcomingSessionsProps } from './upcoming-sessions-types';\n\nimport { format, isToday, addDays } from 'date-fns';\nimport React, { useCallback, memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Check2Icon from '../../../../../assets/line-icons/icons/check2';\nimport { CUEMATH_APP_URL } from '../../../../../constants/config';\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 * as Styled from './upcoming-sessions-styled';\n\nconst UpcomingSessions: React.FC<IUpcomingSessionsProps> = ({ sessions = [] }) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n const today = new Date();\n const sessionsMap = new Map(\n sessions.map(session => [\n format(new Date(session.next_session_start * 1000), 'yyyy-MM-dd'),\n session,\n ]),\n );\n\n const days = Array.from({ length: 7 }, (_, i) => addDays(today, i));\n\n const handleOpenApp = useCallback(() => {\n window.open(CUEMATH_APP_URL, '_blank');\n }, []);\n\n return (\n <FlexView>\n <FlexView>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n Upcoming sessions\n </Text>\n <Separator height={4} />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexColumnGapX={0.25}>\n <Text $renderAs=\"ub1\" $color=\"WHITE_T_60\">\n For more details,\n </Text>\n <TextButton label=\"download the Cuemath app\" onClick={handleOpenApp} color=\"WHITE\" />\n </FlexView>\n </FlexView>\n <Separator height={isMobile ? 16 : 20} />\n <FlexView $borderColor=\"BLACK_5\">\n {days.map(day => {\n const dateKey = format(day, 'yyyy-MM-dd');\n const session = sessionsMap.get(dateKey);\n const isTodayFlag = isToday(day);\n const isCompletedSession = session?.session_status === 'COMPLETED';\n const defaultTimecellBg = session?.session_status === 'IN_FUTURE' ? 'GREEN_6' : 'BLACK_1';\n const timeCellBg = isCompletedSession ? 'WHITE_T_10' : defaultTimecellBg;\n\n return (\n <Styled.SessionRow key={dateKey} $flex={1} $flexDirection=\"row\">\n <Styled.DayLabel\n $width={80}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexColumnGapX={0.25}\n $gutterX={1}\n $gapX={0.5}\n >\n <Text $renderAs=\"ac4-black\" $color=\"WHITE_1\">\n {format(day, 'EEE').toUpperCase()}\n </Text>\n <Styled.DateWrapper\n $background={isTodayFlag ? 'WHITE' : 'TRANSPARENT'}\n $width={22}\n $height={22}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderRadius={11}\n $gutter={1}\n $gap={2}\n >\n <Text $renderAs=\"ab3-bold\" $color={isTodayFlag ? 'BLACK_1' : 'WHITE_1'}>\n {format(day, 'd')}\n </Text>\n </Styled.DateWrapper>\n </Styled.DayLabel>\n <FlexView\n $flex={1}\n $gutterX={1}\n $gap={14}\n $background={timeCellBg as TColorNames}\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n >\n {session ? (\n <Text $renderAs=\"ab2\" $color={isCompletedSession ? 'WHITE_T_38' : 'WHITE'}>\n {format(new Date(session.next_session_start * 1000), 'p')}\n </Text>\n ) : null}\n {isCompletedSession && <Check2Icon color={theme.colors.WHITE_T_38} />}\n </FlexView>\n </Styled.SessionRow>\n );\n })}\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(UpcomingSessions);\n"],"names":["UpcomingSessions","sessions","theme","useTheme","isMobile","EDeviceType","today","sessionsMap","session","format","days","_","i","addDays","handleOpenApp","useCallback","CUEMATH_APP_URL","FlexView","jsxs","jsx","Text","Separator","TextButton","day","dateKey","isTodayFlag","isToday","isCompletedSession","defaultTimecellBg","timeCellBg","Styled.SessionRow","Styled.DayLabel","Styled.DateWrapper","Check2Icon","upcomingSessions","memo"],"mappings":"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"}
|
package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { COUNTRY_FLAGS as g } from "../teacher-intro-constants.js";
|
|
2
|
+
const f = (n) => {
|
|
3
|
+
const l = Object.values(g);
|
|
4
|
+
return n.map((r, t) => {
|
|
5
|
+
const e = l.find((o) => o.name === r), a = (e == null ? void 0 : e.name) || r;
|
|
6
|
+
return t === n.length - 1 && n.length > 1 ? `and ${a}` : `${a}${t < n.length - 2 ? ", " : t === n.length - 2 ? " " : ""}`;
|
|
7
|
+
}).join("");
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
f as formatCountryList
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=teacher-profile-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teacher-profile-helpers.js","sources":["../../../../../../src/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.ts"],"sourcesContent":["import { COUNTRY_FLAGS } from '../teacher-intro-constants';\n\nexport const formatCountryList = (countries: string[]) => {\n const countryFlagArray = Object.values(COUNTRY_FLAGS);\n\n return countries\n .map((country, i) => {\n const match = countryFlagArray.find(item => item.name === country);\n const label = match?.name || country;\n\n if (i === countries.length - 1 && countries.length > 1) {\n return `and ${label}`;\n }\n\n return `${label}${i < countries.length - 2 ? ', ' : i === countries.length - 2 ? ' ' : ''}`;\n })\n .join('');\n};\n"],"names":["formatCountryList","countries","countryFlagArray","COUNTRY_FLAGS","country","i","match","item","label"],"mappings":";AAEa,MAAAA,IAAoB,CAACC,MAAwB;AAClD,QAAAC,IAAmB,OAAO,OAAOC,CAAa;AAEpD,SAAOF,EACJ,IAAI,CAACG,GAASC,MAAM;AACnB,UAAMC,IAAQJ,EAAiB,KAAK,CAAQK,MAAAA,EAAK,SAASH,CAAO,GAC3DI,KAAQF,KAAA,gBAAAA,EAAO,SAAQF;AAE7B,WAAIC,MAAMJ,EAAU,SAAS,KAAKA,EAAU,SAAS,IAC5C,OAAOO,CAAK,KAGd,GAAGA,CAAK,GAAGH,IAAIJ,EAAU,SAAS,IAAI,OAAOI,MAAMJ,EAAU,SAAS,IAAI,MAAM,EAAE;AAAA,EAAA,CAC1F,EACA,KAAK,EAAE;AACZ;"}
|
package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js
CHANGED
|
@@ -1,49 +1,84 @@
|
|
|
1
1
|
import r from "styled-components";
|
|
2
|
-
import
|
|
3
|
-
import t from "../../../../ui/
|
|
4
|
-
|
|
2
|
+
import { ILLUSTRATIONS as i } from "../../../../../assets/illustrations/illustrations.js";
|
|
3
|
+
import t from "../../../../ui/image/image.js";
|
|
4
|
+
import e from "../../../../ui/layout/flex-view.js";
|
|
5
|
+
const p = r(t)`
|
|
5
6
|
object-fit: cover;
|
|
6
|
-
|
|
7
|
+
border-radius: 50%;
|
|
8
|
+
border: 1px solid ${({ theme: o }) => o.colors.REAL_BLACK};
|
|
9
|
+
`, c = r(e)(
|
|
7
10
|
({ theme: o }) => `
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
background-image: url(${i.RADIAL_GRADIENT});
|
|
12
|
+
background-repeat: no-repeat;
|
|
13
|
+
background-size: auto;
|
|
14
|
+
background-position: center;
|
|
15
|
+
position: relative;
|
|
16
|
+
${o.mediaQueries.minWidthTablet} {
|
|
17
|
+
background-repeat: contain;
|
|
18
|
+
}
|
|
13
19
|
`
|
|
14
|
-
),
|
|
20
|
+
), s = r.div(
|
|
15
21
|
({ theme: o }) => `
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
grid-
|
|
24
|
-
|
|
25
|
-
&:first-child {
|
|
26
|
-
border-left: none;
|
|
27
|
-
border-top: none;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: row;
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
${o.mediaQueries.minWidthTablet} {
|
|
26
|
+
flex: 1;
|
|
27
|
+
display: grid;
|
|
28
|
+
border-left: 1px solid ${o.colors.BLACK_T_87};
|
|
29
|
+
grid-template-columns: repeat(2, 1fr);
|
|
30
|
+
grid-template-rows: auto auto auto;
|
|
28
31
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
`
|
|
33
|
+
), b = r(e)(
|
|
34
|
+
({ theme: o }) => `
|
|
35
|
+
width: 33.33%;
|
|
36
|
+
&:nth-child(odd) {
|
|
37
|
+
padding: 12px 16px;
|
|
32
38
|
}
|
|
33
|
-
&:
|
|
34
|
-
|
|
35
|
-
border-right: none;
|
|
39
|
+
&:last-child {
|
|
40
|
+
width: 100%;
|
|
36
41
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
border
|
|
40
|
-
|
|
42
|
+
${o.mediaQueries.minWidthTablet} {
|
|
43
|
+
width: auto;
|
|
44
|
+
border: 0.5px solid ${o.colors.WHITE_5};
|
|
45
|
+
&:first-child,
|
|
46
|
+
&:nth-child(2) {
|
|
47
|
+
grid-column: span 1;
|
|
48
|
+
}
|
|
49
|
+
&:nth-child(3),
|
|
50
|
+
&:nth-child(4) {
|
|
51
|
+
grid-column: span 2;
|
|
52
|
+
}
|
|
53
|
+
&:first-child {
|
|
54
|
+
border-left: none;
|
|
55
|
+
border-top: none;
|
|
56
|
+
}
|
|
57
|
+
&:nth-child(2) {
|
|
58
|
+
border-right: none;
|
|
59
|
+
border-top: none;
|
|
60
|
+
}
|
|
61
|
+
&:nth-child(3) {
|
|
62
|
+
border-left: none;
|
|
63
|
+
border-right: none;
|
|
64
|
+
}
|
|
65
|
+
&:nth-child(4) {
|
|
66
|
+
border-left: none;
|
|
67
|
+
border-right: none;
|
|
68
|
+
border-bottom: none;
|
|
69
|
+
}
|
|
41
70
|
}
|
|
42
71
|
`
|
|
43
|
-
)
|
|
72
|
+
), h = r(e)`
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 8px;
|
|
75
|
+
left: 8px;
|
|
76
|
+
`;
|
|
44
77
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
78
|
+
h as CueLogoWrapper,
|
|
79
|
+
s as GridContainer,
|
|
80
|
+
b as GridItem,
|
|
81
|
+
p as ProfilePicture,
|
|
82
|
+
c as ProfileWrapper
|
|
48
83
|
};
|
|
49
84
|
//# sourceMappingURL=teacher-profile-styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teacher-profile-styled.js","sources":["../../../../../../src/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\n\nconst ProfilePicture = styled(Image)`\n object-fit: cover;\n`;\n\nconst GridContainer = styled.div(\n ({ theme }) => `\n flex: 1;\n
|
|
1
|
+
{"version":3,"file":"teacher-profile-styled.js","sources":["../../../../../../src/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\n\nconst ProfilePicture = styled(Image)`\n object-fit: cover;\n border-radius: 50%;\n border: 1px solid ${({ theme }) => theme.colors.REAL_BLACK};\n`;\n\nconst ProfileWrapper = styled(FlexView)(\n ({ theme }) => `\n background-image: url(${ILLUSTRATIONS.RADIAL_GRADIENT});\n background-repeat: no-repeat;\n background-size: auto;\n background-position: center;\n position: relative;\n ${theme.mediaQueries.minWidthTablet} {\n background-repeat: contain;\n }\n`,\n);\n\nconst GridContainer = styled.div(\n ({ theme }) => `\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n ${theme.mediaQueries.minWidthTablet} {\n flex: 1;\n display: grid;\n border-left: 1px solid ${theme.colors.BLACK_T_87};\n grid-template-columns: repeat(2, 1fr);\n grid-template-rows: auto auto auto;\n }\n`,\n);\n\nconst GridItem = styled(FlexView)(\n ({ theme }) => `\n width: 33.33%;\n &:nth-child(odd) {\n padding: 12px 16px;\n }\n &:last-child {\n width: 100%;\n }\n ${theme.mediaQueries.minWidthTablet} {\n width: auto;\n border: 0.5px solid ${theme.colors.WHITE_5};\n &:first-child,\n &:nth-child(2) {\n grid-column: span 1;\n }\n &:nth-child(3),\n &:nth-child(4) {\n grid-column: span 2;\n }\n &:first-child {\n border-left: none;\n border-top: none;\n }\n &:nth-child(2) {\n border-right: none;\n border-top: none;\n }\n &:nth-child(3) {\n border-left: none;\n border-right: none;\n }\n &:nth-child(4) {\n border-left: none;\n border-right: none;\n border-bottom: none;\n }\n }\n`,\n);\n\nconst CueLogoWrapper = styled(FlexView)`\n position: absolute;\n top: 8px;\n left: 8px;\n`;\n\nexport { CueLogoWrapper, ProfilePicture, GridContainer, GridItem, ProfileWrapper };\n"],"names":["ProfilePicture","styled","Image","theme","ProfileWrapper","FlexView","ILLUSTRATIONS","GridContainer","GridItem","CueLogoWrapper"],"mappings":";;;;AAMM,MAAAA,IAAiBC,EAAOC,CAAK;AAAA;AAAA;AAAA,sBAGb,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA,GAGtDC,IAAiBH,EAAOI,CAAQ;AAAA,EACpC,CAAC,EAAE,OAAAF,EAAA,MAAY;AAAA,0BACSG,EAAc,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA,IAKnDH,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAIrC,GAEMI,IAAgBN,EAAO;AAAA,EAC3B,CAAC,EAAE,OAAAE,EAAA,MAAY;AAAA;AAAA;AAAA;AAAA,IAIbA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA,6BAGRA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA;AAAA;AAKpD,GAEMK,IAAWP,EAAOI,CAAQ;AAAA,EAC9B,CAAC,EAAE,OAAAF,EAAA,MAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQbA,EAAM,aAAa,cAAc;AAAA;AAAA,0BAEXA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4B9C,GAEMM,IAAiBR,EAAOI,CAAQ;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -1,64 +1,178 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
1
|
+
import { jsxs as n, Fragment as E, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { memo as B, useMemo as o, useCallback as m } from "react";
|
|
3
|
+
import { useTheme as Y } from "styled-components";
|
|
4
|
+
import V from "../../../../../assets/line-icons/icons/cuemath-logo.js";
|
|
5
|
+
import F from "../../../../ui/buttons/button/button.js";
|
|
6
|
+
import K from "../../../../ui/image/image.js";
|
|
7
|
+
import s from "../../../../ui/layout/flex-view.js";
|
|
8
|
+
import T from "../../../../ui/separator/separator.js";
|
|
9
|
+
import c from "../../../../ui/text/text.js";
|
|
10
|
+
import { EDeviceType as H } from "../../../../ui/theme/constants.js";
|
|
11
|
+
import { COUNTRY_FLAGS as U } from "../teacher-intro-constants.js";
|
|
12
|
+
import { formatCountryList as q } from "./teacher-profile-helpers.js";
|
|
13
|
+
import { GridItem as G, ProfileWrapper as z, CueLogoWrapper as J, ProfilePicture as Q, GridContainer as Z } from "./teacher-profile-styled.js";
|
|
14
|
+
const P = B(({ teacherProfile: N }) => {
|
|
10
15
|
const {
|
|
11
|
-
degree:
|
|
12
|
-
countries:
|
|
13
|
-
lower_grade:
|
|
14
|
-
higher_grade:
|
|
15
|
-
header_image:
|
|
16
|
-
years_of_experience:
|
|
17
|
-
number_of_students_taught:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
16
|
+
degree: S,
|
|
17
|
+
countries: i,
|
|
18
|
+
lower_grade: d,
|
|
19
|
+
higher_grade: a,
|
|
20
|
+
header_image: v,
|
|
21
|
+
years_of_experience: D,
|
|
22
|
+
number_of_students_taught: M,
|
|
23
|
+
first_name: u,
|
|
24
|
+
last_name: C,
|
|
25
|
+
teacher_profile_url: t
|
|
26
|
+
} = N || {}, {
|
|
27
|
+
degree_name: g,
|
|
28
|
+
field_of_study: h,
|
|
29
|
+
degree_code: L
|
|
30
|
+
} = S || {}, $ = Y(), e = o(() => $.device <= H.MOBILE, [$.device]), w = o(() => Object.values(U), []), k = o(() => a && parseInt(a, 10) > 8, [a]), y = o(
|
|
31
|
+
() => u ? `${u} ${C}`.trim() : "",
|
|
32
|
+
[u, C]
|
|
33
|
+
), b = o(() => k ? "High School" : !d || !a ? "" : ` ${d === "K" ? "" : "G"}${d} - G${a}`, [k, a, d]), O = o(() => i && i.length > 0, [i]), R = o(() => g && h, [g, h]), I = m(() => {
|
|
34
|
+
t && window.open(t, "_blank");
|
|
35
|
+
}, [t]), p = m(() => t ? /* @__PURE__ */ n(E, { children: [
|
|
36
|
+
/* @__PURE__ */ r(T, { heightX: 1.5 }),
|
|
37
|
+
/* @__PURE__ */ r(
|
|
38
|
+
F,
|
|
39
|
+
{
|
|
40
|
+
label: "View profile",
|
|
41
|
+
renderAs: "secondary",
|
|
42
|
+
shape: "square",
|
|
43
|
+
onClick: I,
|
|
44
|
+
size: "small"
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
] }) : null, [I, t]), _ = m(
|
|
48
|
+
({
|
|
49
|
+
value: l,
|
|
50
|
+
label: A,
|
|
51
|
+
mobileLabel: f,
|
|
52
|
+
valueRenderAs: x = "ah3-black"
|
|
53
|
+
}) => /* @__PURE__ */ n(
|
|
54
|
+
G,
|
|
55
|
+
{
|
|
56
|
+
$flex: e ? 1 : 0,
|
|
57
|
+
$justifyContent: e ? "flex-start" : "center",
|
|
58
|
+
$gutter: e ? 8 : 24,
|
|
59
|
+
$gapX: e ? 0.75 : 0,
|
|
60
|
+
$alignItems: e ? "center" : "flex-start",
|
|
61
|
+
$background: e ? "YELLOW_3" : "TRANSPARENT",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ r(c, { $renderAs: x, $renderOnMobileAs: "ab2-black", children: l }),
|
|
64
|
+
/* @__PURE__ */ r(c, { $renderAs: "ub2", $renderOnMobileAs: "ub3", $align: e ? "center" : "left", children: e && f ? f : A })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
[e]
|
|
69
|
+
), W = m(() => {
|
|
70
|
+
if (!O) return null;
|
|
71
|
+
if (e) {
|
|
72
|
+
const l = q(i);
|
|
73
|
+
return /* @__PURE__ */ n(s, { $gapX: 0.75, children: [
|
|
74
|
+
/* @__PURE__ */ n(c, { $renderOnMobileAs: "ub3-bold", $renderAs: "ab3-black", children: [
|
|
75
|
+
"Teaching ",
|
|
76
|
+
b,
|
|
77
|
+
" kids in ",
|
|
78
|
+
l,
|
|
79
|
+
"."
|
|
33
80
|
] }),
|
|
34
|
-
|
|
81
|
+
p(),
|
|
82
|
+
t && /* @__PURE__ */ r(T, { heightX: 0.75 })
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
return /* @__PURE__ */ n(s, { $flexDirection: "column", $flexGap: 12, children: [
|
|
86
|
+
/* @__PURE__ */ n(c, { $renderAs: "ab1-black", $renderOnMobileAs: "ub3-bold", children: [
|
|
87
|
+
"Teaching ",
|
|
88
|
+
b,
|
|
89
|
+
" kids in"
|
|
35
90
|
] }),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
40
|
-
|
|
91
|
+
/* @__PURE__ */ r(s, { $flexDirection: "row", $flexGap: 16, $flexWrap: !0, children: i.map((l) => {
|
|
92
|
+
const A = w.find((j) => j.name === l), { flag_icon: f = "", label: x = "", name: X } = A || {};
|
|
93
|
+
return /* @__PURE__ */ n(s, { $flexDirection: "row", $flexGap: 4, children: [
|
|
94
|
+
/* @__PURE__ */ r(K, { src: f, width: 30, height: 20, withLoader: !1 }),
|
|
95
|
+
/* @__PURE__ */ r(c, { $renderAs: "ab3-black", children: x })
|
|
96
|
+
] }, X || l);
|
|
97
|
+
}) })
|
|
98
|
+
] });
|
|
99
|
+
}, [
|
|
100
|
+
O,
|
|
101
|
+
e,
|
|
102
|
+
b,
|
|
103
|
+
i,
|
|
104
|
+
p,
|
|
105
|
+
t,
|
|
106
|
+
w
|
|
107
|
+
]);
|
|
108
|
+
return /* @__PURE__ */ n(
|
|
109
|
+
s,
|
|
110
|
+
{
|
|
111
|
+
$flexDirection: e ? "column" : "row",
|
|
112
|
+
$borderColor: "BLACK_T_87",
|
|
113
|
+
$background: "WHITE_3",
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ n(
|
|
116
|
+
z,
|
|
117
|
+
{
|
|
118
|
+
$gapX: e ? 1 : 1.5,
|
|
119
|
+
$gutterX: 1,
|
|
120
|
+
$background: "YELLOW_4",
|
|
121
|
+
$alignItems: "center",
|
|
122
|
+
$justifyContent: "center",
|
|
123
|
+
children: [
|
|
124
|
+
e && /* @__PURE__ */ r(J, { children: /* @__PURE__ */ r(V, { width: 54, height: 8, color: $.colors.REAL_BLACK }) }),
|
|
125
|
+
/* @__PURE__ */ r(
|
|
126
|
+
Q,
|
|
127
|
+
{
|
|
128
|
+
withLoader: !0,
|
|
129
|
+
src: v,
|
|
130
|
+
width: e ? 154 : 238,
|
|
131
|
+
height: e ? 154 : 238
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
y && /* @__PURE__ */ n(E, { children: [
|
|
135
|
+
/* @__PURE__ */ r(T, { heightX: e ? 0.75 : 1.5 }),
|
|
136
|
+
/* @__PURE__ */ r(c, { $renderAs: "ac2-black", $color: "BLACK_1", $align: "center", children: y })
|
|
137
|
+
] }),
|
|
138
|
+
!e && p()
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
/* @__PURE__ */ n(Z, { children: [
|
|
143
|
+
_({
|
|
144
|
+
value: `${D}+`,
|
|
145
|
+
label: "Yrs of Teaching Experience",
|
|
146
|
+
mobileLabel: "Years of Teaching"
|
|
147
|
+
}),
|
|
148
|
+
_({
|
|
149
|
+
value: `${M}+`,
|
|
150
|
+
label: "Students Taught"
|
|
151
|
+
}),
|
|
152
|
+
R && _({
|
|
153
|
+
value: e && L ? L : g,
|
|
154
|
+
label: `In ${h}`,
|
|
155
|
+
mobileLabel: h,
|
|
156
|
+
valueRenderAs: "ab1-black"
|
|
157
|
+
}),
|
|
158
|
+
/* @__PURE__ */ r(
|
|
159
|
+
G,
|
|
160
|
+
{
|
|
161
|
+
$justifyContent: "center",
|
|
162
|
+
$gutter: 24,
|
|
163
|
+
$flexDirection: e ? "row" : "column",
|
|
164
|
+
$background: e ? "YELLOW_4" : "TRANSPARENT",
|
|
165
|
+
children: W()
|
|
166
|
+
}
|
|
167
|
+
)
|
|
41
168
|
] })
|
|
42
|
-
]
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
] }),
|
|
49
|
-
/* @__PURE__ */ r(j, { height: 12 }),
|
|
50
|
-
/* @__PURE__ */ r(a, { $flexDirection: "row", $flexGap: 16, $flexWrap: !0, children: o && o.length > 0 && o.map((b) => {
|
|
51
|
-
const _ = $.find((w) => w.name === b), { flag_icon: x = "", label: y, name: A } = _ || {};
|
|
52
|
-
return /* @__PURE__ */ e(a, { $flexDirection: "row", $flexGap: 4, children: [
|
|
53
|
-
/* @__PURE__ */ r(C, { src: x, width: 30, height: 20, withLoader: !1 }),
|
|
54
|
-
/* @__PURE__ */ r(t, { $renderAs: "ab3-black", children: y })
|
|
55
|
-
] }, A);
|
|
56
|
-
}) })
|
|
57
|
-
] })
|
|
58
|
-
] })
|
|
59
|
-
] });
|
|
60
|
-
}), W = O;
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
});
|
|
173
|
+
P.displayName = "TeacherProfile";
|
|
174
|
+
const me = P;
|
|
61
175
|
export {
|
|
62
|
-
|
|
176
|
+
me as default
|
|
63
177
|
};
|
|
64
178
|
//# sourceMappingURL=teacher-profile.js.map
|