@cuemath/leap 3.5.19-as1 → 3.5.19-link.0
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/line-icons/icons/change-icon.js +41 -0
- package/dist/assets/line-icons/icons/change-icon.js.map +1 -0
- package/dist/features/timeline/comps/accordion-item/accordion-item.js +39 -51
- package/dist/features/timeline/comps/accordion-item/accordion-item.js.map +1 -1
- package/dist/features/timeline/comps/daily-timeline-items/daily-timeline-items.js +10 -9
- package/dist/features/timeline/comps/daily-timeline-items/daily-timeline-items.js.map +1 -1
- package/dist/features/timeline/comps/no-activity.js +5 -4
- package/dist/features/timeline/comps/no-activity.js.map +1 -1
- package/dist/features/timeline/comps/utils.js +9 -9
- package/dist/features/timeline/comps/utils.js.map +1 -1
- package/dist/features/timeline/daily-timeline-types.js.map +1 -1
- package/dist/features/trial-session/api/course-stream.js.map +1 -1
- package/dist/features/trial-session/api/trial-nodes.js +6 -5
- package/dist/features/trial-session/api/trial-nodes.js.map +1 -1
- package/dist/features/trial-session/comps/confirmation-modal/confirmation-modal-styled.js +68 -0
- package/dist/features/trial-session/comps/confirmation-modal/confirmation-modal-styled.js.map +1 -0
- package/dist/features/trial-session/comps/confirmation-modal/confirmation-modal.js +65 -0
- package/dist/features/trial-session/comps/confirmation-modal/confirmation-modal.js.map +1 -0
- package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js +41 -0
- package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js.map +1 -0
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js +90 -71
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js.map +1 -1
- package/dist/features/trial-session/comps/worksheet/worksheet.js +27 -23
- package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +26 -25
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
- package/dist/features/trial-session/left-panel/index.js +37 -34
- package/dist/features/trial-session/left-panel/index.js.map +1 -1
- package/dist/features/trial-session/left-panel/left-panel-styled.js +7 -4
- package/dist/features/trial-session/left-panel/left-panel-styled.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/trial-session/trial-session-view.js +77 -74
- package/dist/features/trial-session/trial-session-view.js.map +1 -1
- package/dist/features/ui/theme/button.js +17 -0
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/index.d.ts +31 -54
- package/dist/index.js +735 -733
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/features/timeline/comps/accordion-item/accordian-item-styled.js +0 -30
- package/dist/features/timeline/comps/accordion-item/accordian-item-styled.js.map +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsxs as o, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
const r = (e) => /* @__PURE__ */ o(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: "24",
|
|
7
|
+
height: "24",
|
|
8
|
+
viewBox: "0 0 24 24",
|
|
9
|
+
fill: "none",
|
|
10
|
+
...e,
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ l(
|
|
13
|
+
"path",
|
|
14
|
+
{
|
|
15
|
+
"fill-rule": "evenodd",
|
|
16
|
+
"clip-rule": "evenodd",
|
|
17
|
+
d: "M9.02871 1.71387C9.02871 4.46573 11.0498 6.59958 13.4287 6.59958V7.79958C11.6238 7.79958 10.0456 6.88395 9.02871 5.4782L9.02871 20.8569H7.82871L7.82871 5.4782C6.81178 6.88395 5.2336 7.79958 3.42871 7.79958L3.42871 6.59958C5.80763 6.59958 7.82871 4.46573 7.82871 1.71387L9.02871 1.71387Z",
|
|
18
|
+
fill: "currentColor"
|
|
19
|
+
}
|
|
20
|
+
),
|
|
21
|
+
/* @__PURE__ */ l(
|
|
22
|
+
"path",
|
|
23
|
+
{
|
|
24
|
+
d: "M23.1166 10.933C20.3647 10.933 18.2309 12.9541 18.2309 15.333H17.0309C17.0309 13.5282 17.9465 11.95 19.3523 10.933V9.73305C17.9465 8.71612 17.0309 7.13793 17.0309 5.33305L18.2309 5.33305C18.2309 7.71196 20.3647 9.73305 23.1166 9.73305V10.933Z",
|
|
25
|
+
fill: "currentColor"
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ l(
|
|
29
|
+
"path",
|
|
30
|
+
{
|
|
31
|
+
d: "M20.1922 10.7838C17.5048 10.9905 14.633 11.9213 12.4922 13.5954C10.3711 15.2542 8.96862 17.6355 9.12807 20.8251L7.84403 20.8887C7.66078 17.2214 9.30024 14.4595 11.7003 12.5826C14.0809 10.721 17.2096 9.72327 20.0935 9.5014L20.1922 10.7838Z",
|
|
32
|
+
fill: "currentColor"
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
), n = r;
|
|
38
|
+
export {
|
|
39
|
+
n as default
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=change-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-icon.js","sources":["../../../../src/assets/line-icons/icons/change-icon.tsx"],"sourcesContent":["import { type FC, type SVGProps } from 'react';\n\nconst ChangeIcon: FC<SVGProps<SVGSVGElement>> = props => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n {...props}\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M9.02871 1.71387C9.02871 4.46573 11.0498 6.59958 13.4287 6.59958V7.79958C11.6238 7.79958 10.0456 6.88395 9.02871 5.4782L9.02871 20.8569H7.82871L7.82871 5.4782C6.81178 6.88395 5.2336 7.79958 3.42871 7.79958L3.42871 6.59958C5.80763 6.59958 7.82871 4.46573 7.82871 1.71387L9.02871 1.71387Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M23.1166 10.933C20.3647 10.933 18.2309 12.9541 18.2309 15.333H17.0309C17.0309 13.5282 17.9465 11.95 19.3523 10.933V9.73305C17.9465 8.71612 17.0309 7.13793 17.0309 5.33305L18.2309 5.33305C18.2309 7.71196 20.3647 9.73305 23.1166 9.73305V10.933Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M20.1922 10.7838C17.5048 10.9905 14.633 11.9213 12.4922 13.5954C10.3711 15.2542 8.96862 17.6355 9.12807 20.8251L7.84403 20.8887C7.66078 17.2214 9.30024 14.4595 11.7003 12.5826C14.0809 10.721 17.2096 9.72327 20.0935 9.5014L20.1922 10.7838Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default ChangeIcon;\n"],"names":["ChangeIcon","props","jsxs","jsx","ChangeIcon$1"],"mappings":";AAEA,MAAMA,IAA0C,CAASC,MAErD,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAK;AAAA,IACJ,GAAGD;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,aAAU;AAAA,UACV,aAAU;AAAA,UACV,GAAE;AAAA,UACF,MAAK;AAAA,QAAA;AAAA,MACP;AAAA,MACA,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA,QAAA;AAAA,MACP;AAAA,MACA,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA,QAAA;AAAA,MACP;AAAA,IAAA;AAAA,EAAA;AAAA,GAKNC,IAAeJ;"}
|
|
@@ -1,71 +1,59 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import z from "../../../ui/buttons/text-button/text-button.js";
|
|
2
|
+
import { memo as L, useMemo as R, useCallback as E } from "react";
|
|
3
|
+
import $ from "../../../ui/buttons/text-button/text-button.js";
|
|
5
4
|
import l from "../../../ui/layout/flex-view.js";
|
|
6
|
-
import
|
|
7
|
-
import { getStateConf as
|
|
5
|
+
import d from "../../../ui/text/text.js";
|
|
6
|
+
import { getStateConf as g } from "../utils.js";
|
|
8
7
|
import { BLOCK_TYPE as k } from "../../../chapters-v2/constants/block-constants.js";
|
|
9
|
-
import { CODING_ACTIVITY_NODE_TYPES as
|
|
10
|
-
import { NODE_STATE as
|
|
11
|
-
import { NODE_TYPES as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
subtext: a,
|
|
21
|
-
user_node_id: _,
|
|
8
|
+
import { CODING_ACTIVITY_NODE_TYPES as z } from "../constants.js";
|
|
9
|
+
import { NODE_STATE as K, CARD_TYPE as N, USER_TYPE as s } from "../../daily-timeline-types.js";
|
|
10
|
+
import { NODE_TYPES as P } from "../../../../types/models/worksheet.js";
|
|
11
|
+
const O = L(
|
|
12
|
+
({ type: T, userType: r, card: h, onPuzzleClick: m, onReviewClick: a }) => {
|
|
13
|
+
const {
|
|
14
|
+
label: A,
|
|
15
|
+
title: b,
|
|
16
|
+
state: n,
|
|
17
|
+
subtext: _,
|
|
18
|
+
user_node_id: o,
|
|
22
19
|
block_type: p,
|
|
23
20
|
user_block_id: u,
|
|
24
21
|
node_type: f
|
|
25
|
-
} =
|
|
22
|
+
} = h, c = p === k.SAT_MOCK_TEST, x = f === P.PUZZLE_CARD, [C, w] = g(n), t = n === K.COMPLETED, D = R(() => T === N.CIRCLE ? !1 : r === s.TEACHER ? !c || t : r === s.STUDENT ? t && !z.includes(
|
|
26
23
|
f
|
|
27
|
-
) : !1, [
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
|
|
31
|
-
}, [
|
|
24
|
+
) : !1, [r, T, c, t, f]), I = t && r === s.STUDENT || r === s.TEACHER, S = E(() => {
|
|
25
|
+
o && m && m(o, n);
|
|
26
|
+
}, [m, o, n]), B = E(() => {
|
|
27
|
+
a && o && a(o, c, u);
|
|
28
|
+
}, [c, a, u, o]);
|
|
32
29
|
return /* @__PURE__ */ i(l, { $flexDirection: "row", $flexGapX: 1.5, children: [
|
|
33
|
-
/* @__PURE__ */ e(l, { $justifyContent: "flex-end", $height: 18, $background: "WHITE", children: /* @__PURE__ */ e(l, { $background: w, $
|
|
30
|
+
/* @__PURE__ */ e(l, { $justifyContent: "flex-end", $height: 18, $background: "WHITE", children: /* @__PURE__ */ e(l, { $background: w, $borderRadiusX: 0.5, $width: 16, $height: 16, children: C && /* @__PURE__ */ e(C, { width: 16, height: 16 }) }) }),
|
|
34
31
|
/* @__PURE__ */ i(l, { $flexRowGapX: 0.25, children: [
|
|
35
|
-
/* @__PURE__ */ i(
|
|
36
|
-
/* @__PURE__ */ i(
|
|
37
|
-
|
|
32
|
+
/* @__PURE__ */ i(d, { $renderAs: "ub2", $color: "BLACK_1", children: [
|
|
33
|
+
/* @__PURE__ */ i(d, { $renderAs: "ub2-bold", $inline: !0, $color: "BLACK_1", children: [
|
|
34
|
+
A,
|
|
38
35
|
":"
|
|
39
36
|
] }),
|
|
40
37
|
" ",
|
|
41
|
-
|
|
38
|
+
b
|
|
42
39
|
] }),
|
|
43
|
-
x ?
|
|
44
|
-
|
|
40
|
+
x ? I ? /* @__PURE__ */ e(
|
|
41
|
+
$,
|
|
45
42
|
{
|
|
46
|
-
label:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
G,
|
|
51
|
-
{
|
|
52
|
-
$color: "BLACK_T_60",
|
|
53
|
-
$renderAs: C.sizes.small.textVariant,
|
|
54
|
-
$buttonSize: "small",
|
|
55
|
-
$isParent: o === t.PARENT,
|
|
56
|
-
children: r ? "View reviewed puzzle" : "View assigned puzzle"
|
|
57
|
-
}
|
|
58
|
-
)
|
|
43
|
+
label: t ? "View reviewed puzzle" : "View assigned puzzle",
|
|
44
|
+
size: "small",
|
|
45
|
+
color: "BLACK_T_60",
|
|
46
|
+
onClick: S
|
|
59
47
|
}
|
|
60
|
-
) : /* @__PURE__ */ e(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
) : /* @__PURE__ */ e(d, { $renderAs: "ub3", $color: "BLACK_T_60", children: _ }) : /* @__PURE__ */ i(l, { $flexDirection: "row", $flexGapX: 0.75, $alignItems: "center", children: [
|
|
49
|
+
_ && /* @__PURE__ */ e(d, { $renderAs: "ub3", $color: "BLACK_T_60", children: _ }),
|
|
50
|
+
D && /* @__PURE__ */ e(
|
|
51
|
+
$,
|
|
64
52
|
{
|
|
65
53
|
label: "Review",
|
|
66
54
|
size: "small",
|
|
67
55
|
color: "BLACK_T_60",
|
|
68
|
-
onClick:
|
|
56
|
+
onClick: B
|
|
69
57
|
}
|
|
70
58
|
)
|
|
71
59
|
] })
|
|
@@ -73,8 +61,8 @@ const M = I(
|
|
|
73
61
|
] });
|
|
74
62
|
}
|
|
75
63
|
);
|
|
76
|
-
|
|
64
|
+
O.displayName = "AccordionItem";
|
|
77
65
|
export {
|
|
78
|
-
|
|
66
|
+
O as default
|
|
79
67
|
};
|
|
80
68
|
//# sourceMappingURL=accordion-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-item.js","sources":["../../../../../src/features/timeline/comps/accordion-item/accordion-item.tsx"],"sourcesContent":["import { memo, useCallback, useMemo, type FC } from 'react';\
|
|
1
|
+
{"version":3,"file":"accordion-item.js","sources":["../../../../../src/features/timeline/comps/accordion-item/accordion-item.tsx"],"sourcesContent":["import { memo, useCallback, useMemo, type FC } from 'react';\n\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport type { IAccordionItemProps } from './accordion-item-types';\nimport { getStateConf } from '../utils';\nimport { BLOCK_TYPE } from '../../../chapters-v2/constants/block-constants';\nimport { type TColorNames } from '../../../ui/types';\nimport { CODING_ACTIVITY_NODE_TYPES } from '../constants';\nimport { CARD_TYPE, NODE_STATE, USER_TYPE } from '../../daily-timeline-types';\nimport { NODE_TYPES } from '../../../../types/models/worksheet';\n\nconst AccordionItem: FC<IAccordionItemProps> = memo(\n ({ type, userType, card, onPuzzleClick, onReviewClick }) => {\n const {\n label,\n title,\n state,\n subtext,\n user_node_id: userNodeId,\n block_type: blockType,\n user_block_id: userBlockId,\n node_type: nodeType,\n } = card;\n const isSatMockTestBlock = blockType === BLOCK_TYPE.SAT_MOCK_TEST;\n const isPuzzleCard = nodeType === NODE_TYPES.PUZZLE_CARD;\n const [Icon, bgColor] = getStateConf(state) as [FC<React.SVGProps<SVGSVGElement>>, TColorNames];\n const isCompleted = state === NODE_STATE.COMPLETED;\n const shouldShowReview = useMemo(() => {\n if (type === CARD_TYPE.CIRCLE) return false;\n\n if (userType === USER_TYPE.TEACHER) return !isSatMockTestBlock || isCompleted;\n\n if (userType === USER_TYPE.STUDENT)\n return (\n isCompleted &&\n !CODING_ACTIVITY_NODE_TYPES.includes(\n nodeType as (typeof CODING_ACTIVITY_NODE_TYPES)[number],\n )\n );\n\n return false;\n }, [userType, type, isSatMockTestBlock, isCompleted, nodeType]);\n\n const canReviewPuzzle =\n (isCompleted && userType === USER_TYPE.STUDENT) || userType === USER_TYPE.TEACHER;\n\n const handlePuzzleClick = useCallback(() => {\n if (userNodeId && onPuzzleClick) {\n onPuzzleClick(userNodeId, state);\n }\n }, [onPuzzleClick, userNodeId, state]);\n\n const handleReviewClick = useCallback(() => {\n if (onReviewClick && userNodeId) {\n onReviewClick(userNodeId, isSatMockTestBlock, userBlockId);\n }\n }, [isSatMockTestBlock, onReviewClick, userBlockId, userNodeId]);\n\n return (\n <FlexView $flexDirection=\"row\" $flexGapX={1.5}>\n <FlexView $justifyContent=\"flex-end\" $height={18} $background=\"WHITE\">\n <FlexView $background={bgColor} $borderRadiusX={0.5} $width={16} $height={16}>\n {Icon && <Icon width={16} height={16} />}\n </FlexView>\n </FlexView>\n <FlexView $flexRowGapX={0.25}>\n <Text $renderAs=\"ub2\" $color=\"BLACK_1\">\n <Text $renderAs=\"ub2-bold\" $inline $color=\"BLACK_1\">\n {label}:\n </Text>{' '}\n {title}\n </Text>\n {isPuzzleCard ? (\n canReviewPuzzle ? (\n <TextButton\n label={isCompleted ? 'View reviewed puzzle' : 'View assigned puzzle'}\n size=\"small\"\n color=\"BLACK_T_60\"\n onClick={handlePuzzleClick}\n />\n ) : (\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {subtext}\n </Text>\n )\n ) : (\n <FlexView $flexDirection=\"row\" $flexGapX={0.75} $alignItems=\"center\">\n {subtext && (\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {subtext}\n </Text>\n )}\n {shouldShowReview && (\n <TextButton\n label=\"Review\"\n size=\"small\"\n color=\"BLACK_T_60\"\n onClick={handleReviewClick}\n />\n )}\n </FlexView>\n )}\n </FlexView>\n </FlexView>\n );\n },\n);\n\nAccordionItem.displayName = 'AccordionItem';\n\nexport default AccordionItem;\n"],"names":["AccordionItem","memo","type","userType","card","onPuzzleClick","onReviewClick","label","title","state","subtext","userNodeId","blockType","userBlockId","nodeType","isSatMockTestBlock","BLOCK_TYPE","isPuzzleCard","NODE_TYPES","Icon","bgColor","getStateConf","isCompleted","NODE_STATE","shouldShowReview","useMemo","CARD_TYPE","USER_TYPE","CODING_ACTIVITY_NODE_TYPES","canReviewPuzzle","handlePuzzleClick","useCallback","handleReviewClick","jsxs","FlexView","jsx","Text","TextButton"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAyCC;AAAA,EAC7C,CAAC,EAAE,MAAAC,GAAM,UAAAC,GAAU,MAAAC,GAAM,eAAAC,GAAe,eAAAC,QAAoB;AACpD,UAAA;AAAA,MACJ,OAAAC;AAAA,MACA,OAAAC;AAAA,MACA,OAAAC;AAAA,MACA,SAAAC;AAAA,MACA,cAAcC;AAAA,MACd,YAAYC;AAAA,MACZ,eAAeC;AAAA,MACf,WAAWC;AAAA,IACT,IAAAV,GACEW,IAAqBH,MAAcI,EAAW,eAC9CC,IAAeH,MAAaI,EAAW,aACvC,CAACC,GAAMC,CAAO,IAAIC,EAAaZ,CAAK,GACpCa,IAAcb,MAAUc,EAAW,WACnCC,IAAmBC,EAAQ,MAC3BvB,MAASwB,EAAU,SAAe,KAElCvB,MAAawB,EAAU,UAAgB,CAACZ,KAAsBO,IAE9DnB,MAAawB,EAAU,UAEvBL,KACA,CAACM,EAA2B;AAAA,MAC1Bd;AAAA,IAAA,IAIC,IACN,CAACX,GAAUD,GAAMa,GAAoBO,GAAaR,CAAQ,CAAC,GAExDe,IACHP,KAAenB,MAAawB,EAAU,WAAYxB,MAAawB,EAAU,SAEtEG,IAAoBC,EAAY,MAAM;AAC1C,MAAIpB,KAAcN,KAChBA,EAAcM,GAAYF,CAAK;AAAA,IAEhC,GAAA,CAACJ,GAAeM,GAAYF,CAAK,CAAC,GAE/BuB,IAAoBD,EAAY,MAAM;AAC1C,MAAIzB,KAAiBK,KACLL,EAAAK,GAAYI,GAAoBF,CAAW;AAAA,OAE1D,CAACE,GAAoBT,GAAeO,GAAaF,CAAU,CAAC;AAE/D,WACG,gBAAAsB,EAAAC,GAAA,EAAS,gBAAe,OAAM,WAAW,KACxC,UAAA;AAAA,MAAC,gBAAAC,EAAAD,GAAA,EAAS,iBAAgB,YAAW,SAAS,IAAI,aAAY,SAC5D,UAAA,gBAAAC,EAACD,GAAS,EAAA,aAAad,GAAS,gBAAgB,KAAK,QAAQ,IAAI,SAAS,IACvE,UAAQD,KAAA,gBAAAgB,EAAChB,GAAK,EAAA,OAAO,IAAI,QAAQ,GAAI,CAAA,EACxC,CAAA,GACF;AAAA,MACA,gBAAAc,EAACC,GAAS,EAAA,cAAc,MACtB,UAAA;AAAA,QAAA,gBAAAD,EAACG,GAAK,EAAA,WAAU,OAAM,QAAO,WAC3B,UAAA;AAAA,UAAA,gBAAAH,EAACG,KAAK,WAAU,YAAW,SAAO,IAAC,QAAO,WACvC,UAAA;AAAA,YAAA7B;AAAA,YAAM;AAAA,UAAA,GACT;AAAA,UAAQ;AAAA,UACPC;AAAA,QAAA,GACH;AAAA,QACCS,IACCY,IACE,gBAAAM;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,OAAOf,IAAc,yBAAyB;AAAA,YAC9C,MAAK;AAAA,YACL,OAAM;AAAA,YACN,SAASQ;AAAA,UAAA;AAAA,QAAA,IAGV,gBAAAK,EAAAC,GAAA,EAAK,WAAU,OAAM,QAAO,cAC1B,UAAA1B,EACH,CAAA,IAGF,gBAAAuB,EAACC,KAAS,gBAAe,OAAM,WAAW,MAAM,aAAY,UACzD,UAAA;AAAA,UAAAxB,uBACE0B,GAAK,EAAA,WAAU,OAAM,QAAO,cAC1B,UACH1B,GAAA;AAAA,UAEDc,KACC,gBAAAW;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,OAAM;AAAA,cACN,MAAK;AAAA,cACL,OAAM;AAAA,cACN,SAASL;AAAA,YAAA;AAAA,UACX;AAAA,QAAA,GAEJ;AAAA,MAAA,GAEJ;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF;AAEAhC,EAAc,cAAc;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as e, jsxs as m, Fragment as b } from "react/jsx-runtime";
|
|
2
|
-
import { memo as y, useState as L, useMemo as x, useCallback as
|
|
3
|
-
import
|
|
2
|
+
import { memo as y, useState as L, useMemo as x, useCallback as w } from "react";
|
|
3
|
+
import D from "../../../../assets/line-icons/icons/plus.js";
|
|
4
4
|
import S from "../../../ui/accordion-section/accordion-section.js";
|
|
5
5
|
import r from "../../../ui/layout/flex-view.js";
|
|
6
6
|
import N from "../../../../assets/line-icons/icons/minus.js";
|
|
7
7
|
import k from "../../../ui/image/image.js";
|
|
8
8
|
import h from "../../../ui/text/text.js";
|
|
9
9
|
import V from "../accordion-item/accordion-item.js";
|
|
10
|
-
import { Wrapper as
|
|
10
|
+
import { Wrapper as X, TagContainer as j, SectionFooter as B, Card as M } from "./daily-timeline-items-styled.js";
|
|
11
11
|
import { getTimelineCardIcon as P } from "../utils.js";
|
|
12
12
|
import { useUIContext as W } from "../../../ui/context/context.js";
|
|
13
13
|
import { DAILY_TIMELINE_ANALYTICS_EVENTS as u } from "../../daily-timeline-events.js";
|
|
@@ -24,7 +24,7 @@ const F = y((I) => {
|
|
|
24
24
|
isLastItem: C,
|
|
25
25
|
fromDate: l,
|
|
26
26
|
studentId: c
|
|
27
|
-
} = I, [_, A] = L(!1), d = x(() => P(t), [t]), { onEvent: a } = W(), T =
|
|
27
|
+
} = I, [_, A] = L(!1), d = x(() => P(t), [t]), { onEvent: a } = W(), T = w(
|
|
28
28
|
(o) => {
|
|
29
29
|
A(o), a(
|
|
30
30
|
o ? u.TIMELINE_VIEW_EXPANDED : u.TIMELINE_VIEW_COLLAPSED,
|
|
@@ -38,11 +38,11 @@ const F = y((I) => {
|
|
|
38
38
|
},
|
|
39
39
|
[l, a, c, t, i]
|
|
40
40
|
);
|
|
41
|
-
return /* @__PURE__ */ e(
|
|
41
|
+
return /* @__PURE__ */ e(X, { $borderColor: "BLACK_1", $shouldAddBorder: C, children: /* @__PURE__ */ e(
|
|
42
42
|
S,
|
|
43
43
|
{
|
|
44
44
|
headerElement: /* @__PURE__ */ m(r, { children: [
|
|
45
|
-
E && s && /* @__PURE__ */ e(
|
|
45
|
+
E && s && /* @__PURE__ */ e(j, { $position: "absolute", $background: "BLACK_5", $gutter: 4, children: /* @__PURE__ */ e(h, { $renderAs: "ab4-black", $color: "WHITE", children: s }) }),
|
|
46
46
|
/* @__PURE__ */ m(
|
|
47
47
|
r,
|
|
48
48
|
{
|
|
@@ -50,6 +50,7 @@ const F = y((I) => {
|
|
|
50
50
|
$alignItems: "center",
|
|
51
51
|
$justifyContent: "space-between",
|
|
52
52
|
$heightX: 4,
|
|
53
|
+
$widthX: 30,
|
|
53
54
|
$gutterX: 1,
|
|
54
55
|
$gapX: 1.32,
|
|
55
56
|
children: [
|
|
@@ -66,13 +67,13 @@ const F = y((I) => {
|
|
|
66
67
|
]
|
|
67
68
|
}
|
|
68
69
|
),
|
|
69
|
-
_ ? /* @__PURE__ */ e(N, { width: 20, height: 20 }) : /* @__PURE__ */ e(
|
|
70
|
+
_ ? /* @__PURE__ */ e(N, { width: 20, height: 20 }) : /* @__PURE__ */ e(D, { width: 20, height: 20 })
|
|
70
71
|
]
|
|
71
72
|
}
|
|
72
73
|
)
|
|
73
74
|
] }),
|
|
74
|
-
bodyElement: n.length > 0 ? /* @__PURE__ */ e(
|
|
75
|
-
|
|
75
|
+
bodyElement: n.length > 0 ? /* @__PURE__ */ e(B, { $gutter: 32, children: n.map((o, p) => /* @__PURE__ */ e(
|
|
76
|
+
M,
|
|
76
77
|
{
|
|
77
78
|
$isLastCard: p === n.length - 1,
|
|
78
79
|
children: /* @__PURE__ */ e(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daily-timeline-items.js","sources":["../../../../../src/features/timeline/comps/daily-timeline-items/daily-timeline-items.tsx"],"sourcesContent":["import { memo, useCallback, useMemo, useState, type FC } from 'react';\n\nimport PlusIcon from '../../../../assets/line-icons/icons/plus';\nimport AccordionSection from '../../../ui/accordion-section/accordion-section';\nimport FlexView from '../../../ui/layout/flex-view';\nimport MinusIcon from '../../../../assets/line-icons/icons/minus';\nimport Image from '../../../ui/image/image';\nimport Text from '../../../ui/text/text';\nimport AccordionItem from '../accordion-item/accordion-item';\nimport * as Styled from './daily-timeline-items-styled';\nimport { getTimelineCardIcon } from '../utils';\nimport { type IDailyTimelineItemsProps } from './daily-timeline-items.types';\nimport { useUIContext } from '../../../ui/context/context';\nimport { DAILY_TIMELINE_ANALYTICS_EVENTS } from '../../daily-timeline-events';\n\nconst DailyTimelineItems: FC<IDailyTimelineItemsProps> = memo(props => {\n const {\n type,\n summary,\n cards,\n onPuzzleClick,\n onReviewClick,\n courseStream,\n shouldShowTag,\n userType,\n isLastItem,\n fromDate,\n studentId,\n } = props;\n const [isExpended, setIsExpended] = useState(false);\n\n const timelineIcon = useMemo(() => getTimelineCardIcon(type), [type]);\n const { onEvent: trackEvent } = useUIContext();\n\n const handleExpand = useCallback(\n (val: boolean) => {\n setIsExpended(val);\n trackEvent(\n val\n ? DAILY_TIMELINE_ANALYTICS_EVENTS.TIMELINE_VIEW_EXPANDED\n : DAILY_TIMELINE_ANALYTICS_EVENTS.TIMELINE_VIEW_COLLAPSED,\n {\n timeline_date: fromDate,\n student_id: studentId,\n timeline_section_type: type,\n timeline_section_subject: summary,\n },\n );\n },\n [fromDate, trackEvent, studentId, type, summary],\n );\n\n return (\n <Styled.Wrapper $borderColor=\"BLACK_1\" $shouldAddBorder={isLastItem}>\n <AccordionSection\n headerElement={\n <FlexView>\n {shouldShowTag && courseStream && (\n <Styled.TagContainer $position=\"absolute\" $background=\"BLACK_5\" $gutter={4}>\n <Text $renderAs=\"ab4-black\" $color=\"WHITE\">\n {courseStream}\n </Text>\n </Styled.TagContainer>\n )}\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n $heightX={4}\n $gutterX={1}\n $gapX={1.32}\n >\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $flexGapX={1.125}\n >\n <FlexView>{timelineIcon && <Image src={timelineIcon} />}</FlexView>\n <Text $renderAs=\"ab2\" $color=\"BLACK_1\">\n {summary ?? ''}\n </Text>\n </FlexView>\n {isExpended ? (\n <MinusIcon width={20} height={20} />\n ) : (\n <PlusIcon width={20} height={20} />\n )}\n </FlexView>\n </FlexView>\n }\n bodyElement={\n cards.length > 0 ? (\n <Styled.SectionFooter $gutter={32}>\n {cards.map((card, index) => (\n <Styled.Card\n key={card.node_id ?? `card-${index}`}\n $isLastCard={index === cards.length - 1}\n >\n <AccordionItem\n card={card}\n onPuzzleClick={onPuzzleClick}\n onReviewClick={onReviewClick}\n type={type}\n userType={userType}\n />\n </Styled.Card>\n ))}\n </Styled.SectionFooter>\n ) : (\n <></>\n )\n }\n defaultVisible={false}\n onBodyVisibilityChange={handleExpand}\n />\n </Styled.Wrapper>\n );\n});\n\nDailyTimelineItems.displayName = 'DailyTimelineItems';\n\nexport default DailyTimelineItems;\n"],"names":["DailyTimelineItems","memo","props","type","summary","cards","onPuzzleClick","onReviewClick","courseStream","shouldShowTag","userType","isLastItem","fromDate","studentId","isExpended","setIsExpended","useState","timelineIcon","useMemo","getTimelineCardIcon","trackEvent","useUIContext","handleExpand","useCallback","val","DAILY_TIMELINE_ANALYTICS_EVENTS","Styled.Wrapper","jsx","AccordionSection","FlexView","Styled.TagContainer","Text","jsxs","Image","MinusIcon","PlusIcon","Styled.SectionFooter","card","index","Styled.Card","AccordionItem","Fragment"],"mappings":";;;;;;;;;;;;;AAeM,MAAAA,IAAmDC,EAAK,CAASC,MAAA;AAC/D,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,cAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,EACE,IAAAX,GACE,CAACY,GAAYC,CAAa,IAAIC,EAAS,EAAK,GAE5CC,IAAeC,EAAQ,MAAMC,EAAoBhB,CAAI,GAAG,CAACA,CAAI,CAAC,GAC9D,EAAE,SAASiB,EAAW,IAAIC,EAAa,GAEvCC,IAAeC;AAAA,IACnB,CAACC,MAAiB;AAChB,MAAAT,EAAcS,CAAG,GACjBJ;AAAA,QACEI,IACIC,EAAgC,yBAChCA,EAAgC;AAAA,QACpC;AAAA,UACE,eAAeb;AAAA,UACf,YAAYC;AAAA,UACZ,uBAAuBV;AAAA,UACvB,0BAA0BC;AAAA,QAC5B;AAAA,MAAA;AAAA,IAEJ;AAAA,IACA,CAACQ,GAAUQ,GAAYP,GAAWV,GAAMC,CAAO;AAAA,EAAA;AAGjD,2BACGsB,GAAA,EAAe,cAAa,WAAU,kBAAkBf,GACvD,UAAA,gBAAAgB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,iCACGC,GACE,EAAA,UAAA;AAAA,QAAApB,KAAiBD,KACf,gBAAAmB,EAAAG,GAAA,EAAoB,WAAU,YAAW,aAAY,WAAU,SAAS,GACvE,4BAACC,GAAK,EAAA,WAAU,aAAY,QAAO,SAChC,YACH,CAAA,GACF;AAAA,QAEF,gBAAAC;AAAA,UAACH;AAAA,UAAA;AAAA,YACC,gBAAe;AAAA,YACf,aAAY;AAAA,YACZ,iBAAgB;AAAA,YAChB,UAAU;AAAA,YACV,UAAU;AAAA,YACV,OAAO;AAAA,YAEP,UAAA;AAAA,cAAA,gBAAAG;AAAA,gBAACH;AAAA,gBAAA;AAAA,kBACC,gBAAe;AAAA,kBACf,aAAY;AAAA,kBACZ,iBAAgB;AAAA,kBAChB,WAAW;AAAA,kBAEX,UAAA;AAAA,oBAAA,gBAAAF,EAACE,KAAU,UAAgBZ,KAAA,gBAAAU,EAACM,GAAM,EAAA,KAAKhB,EAAc,CAAA,GAAG;AAAA,sCACvDc,GAAK,EAAA,WAAU,OAAM,QAAO,WAC1B,eAAW,IACd;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACF;AAAA,cACCjB,IACC,gBAAAa,EAACO,GAAU,EAAA,OAAO,IAAI,QAAQ,GAAI,CAAA,IAEjC,gBAAAP,EAAAQ,GAAA,EAAS,OAAO,IAAI,QAAQ,IAAI;AAAA,YAAA;AAAA,UAAA;AAAA,QAErC;AAAA,MAAA,GACF;AAAA,MAEF,aACE9B,EAAM,SAAS,sBACZ+B,GAAA,EAAqB,SAAS,IAC5B,UAAA/B,EAAM,IAAI,CAACgC,GAAMC,MAChB,gBAAAX;AAAA,QAACY;AAAAA,QAAA;AAAA,UAEC,aAAaD,MAAUjC,EAAM,SAAS;AAAA,UAEtC,UAAA,gBAAAsB;AAAA,YAACa;AAAA,YAAA;AAAA,cACC,MAAAH;AAAA,cACA,eAAA/B;AAAA,cACA,eAAAC;AAAA,cACA,MAAAJ;AAAA,cACA,UAAAO;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,QATK2B,EAAK,WAAW,QAAQC,CAAK;AAAA,MAWrC,CAAA,GACH,IAEE,gBAAAX,EAAAc,GAAA,CAAA,CAAA;AAAA,MAGN,gBAAgB;AAAA,MAChB,wBAAwBnB;AAAA,IAAA;AAAA,EAE5B,EAAA,CAAA;AAEJ,CAAC;AAEDtB,EAAmB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"daily-timeline-items.js","sources":["../../../../../src/features/timeline/comps/daily-timeline-items/daily-timeline-items.tsx"],"sourcesContent":["import { memo, useCallback, useMemo, useState, type FC } from 'react';\n\nimport PlusIcon from '../../../../assets/line-icons/icons/plus';\nimport AccordionSection from '../../../ui/accordion-section/accordion-section';\nimport FlexView from '../../../ui/layout/flex-view';\nimport MinusIcon from '../../../../assets/line-icons/icons/minus';\nimport Image from '../../../ui/image/image';\nimport Text from '../../../ui/text/text';\nimport AccordionItem from '../accordion-item/accordion-item';\nimport * as Styled from './daily-timeline-items-styled';\nimport { getTimelineCardIcon } from '../utils';\nimport { type IDailyTimelineItemsProps } from './daily-timeline-items.types';\nimport { useUIContext } from '../../../ui/context/context';\nimport { DAILY_TIMELINE_ANALYTICS_EVENTS } from '../../daily-timeline-events';\n\nconst DailyTimelineItems: FC<IDailyTimelineItemsProps> = memo(props => {\n const {\n type,\n summary,\n cards,\n onPuzzleClick,\n onReviewClick,\n courseStream,\n shouldShowTag,\n userType,\n isLastItem,\n fromDate,\n studentId,\n } = props;\n const [isExpended, setIsExpended] = useState(false);\n\n const timelineIcon = useMemo(() => getTimelineCardIcon(type), [type]);\n const { onEvent: trackEvent } = useUIContext();\n\n const handleExpand = useCallback(\n (val: boolean) => {\n setIsExpended(val);\n trackEvent(\n val\n ? DAILY_TIMELINE_ANALYTICS_EVENTS.TIMELINE_VIEW_EXPANDED\n : DAILY_TIMELINE_ANALYTICS_EVENTS.TIMELINE_VIEW_COLLAPSED,\n {\n timeline_date: fromDate,\n student_id: studentId,\n timeline_section_type: type,\n timeline_section_subject: summary,\n },\n );\n },\n [fromDate, trackEvent, studentId, type, summary],\n );\n\n return (\n <Styled.Wrapper $borderColor=\"BLACK_1\" $shouldAddBorder={isLastItem}>\n <AccordionSection\n headerElement={\n <FlexView>\n {shouldShowTag && courseStream && (\n <Styled.TagContainer $position=\"absolute\" $background=\"BLACK_5\" $gutter={4}>\n <Text $renderAs=\"ab4-black\" $color=\"WHITE\">\n {courseStream}\n </Text>\n </Styled.TagContainer>\n )}\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n $heightX={4}\n $widthX={30}\n $gutterX={1}\n $gapX={1.32}\n >\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $flexGapX={1.125}\n >\n <FlexView>{timelineIcon && <Image src={timelineIcon} />}</FlexView>\n <Text $renderAs=\"ab2\" $color=\"BLACK_1\">\n {summary ?? ''}\n </Text>\n </FlexView>\n {isExpended ? (\n <MinusIcon width={20} height={20} />\n ) : (\n <PlusIcon width={20} height={20} />\n )}\n </FlexView>\n </FlexView>\n }\n bodyElement={\n cards.length > 0 ? (\n <Styled.SectionFooter $gutter={32}>\n {cards.map((card, index) => (\n <Styled.Card\n key={card.node_id ?? `card-${index}`}\n $isLastCard={index === cards.length - 1}\n >\n <AccordionItem\n card={card}\n onPuzzleClick={onPuzzleClick}\n onReviewClick={onReviewClick}\n type={type}\n userType={userType}\n />\n </Styled.Card>\n ))}\n </Styled.SectionFooter>\n ) : (\n <></>\n )\n }\n defaultVisible={false}\n onBodyVisibilityChange={handleExpand}\n />\n </Styled.Wrapper>\n );\n});\n\nDailyTimelineItems.displayName = 'DailyTimelineItems';\n\nexport default DailyTimelineItems;\n"],"names":["DailyTimelineItems","memo","props","type","summary","cards","onPuzzleClick","onReviewClick","courseStream","shouldShowTag","userType","isLastItem","fromDate","studentId","isExpended","setIsExpended","useState","timelineIcon","useMemo","getTimelineCardIcon","trackEvent","useUIContext","handleExpand","useCallback","val","DAILY_TIMELINE_ANALYTICS_EVENTS","Styled.Wrapper","jsx","AccordionSection","FlexView","Styled.TagContainer","Text","jsxs","Image","MinusIcon","PlusIcon","Styled.SectionFooter","card","index","Styled.Card","AccordionItem","Fragment"],"mappings":";;;;;;;;;;;;;AAeM,MAAAA,IAAmDC,EAAK,CAASC,MAAA;AAC/D,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,cAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,EACE,IAAAX,GACE,CAACY,GAAYC,CAAa,IAAIC,EAAS,EAAK,GAE5CC,IAAeC,EAAQ,MAAMC,EAAoBhB,CAAI,GAAG,CAACA,CAAI,CAAC,GAC9D,EAAE,SAASiB,EAAW,IAAIC,EAAa,GAEvCC,IAAeC;AAAA,IACnB,CAACC,MAAiB;AAChB,MAAAT,EAAcS,CAAG,GACjBJ;AAAA,QACEI,IACIC,EAAgC,yBAChCA,EAAgC;AAAA,QACpC;AAAA,UACE,eAAeb;AAAA,UACf,YAAYC;AAAA,UACZ,uBAAuBV;AAAA,UACvB,0BAA0BC;AAAA,QAC5B;AAAA,MAAA;AAAA,IAEJ;AAAA,IACA,CAACQ,GAAUQ,GAAYP,GAAWV,GAAMC,CAAO;AAAA,EAAA;AAGjD,2BACGsB,GAAA,EAAe,cAAa,WAAU,kBAAkBf,GACvD,UAAA,gBAAAgB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,iCACGC,GACE,EAAA,UAAA;AAAA,QAAApB,KAAiBD,KACf,gBAAAmB,EAAAG,GAAA,EAAoB,WAAU,YAAW,aAAY,WAAU,SAAS,GACvE,4BAACC,GAAK,EAAA,WAAU,aAAY,QAAO,SAChC,YACH,CAAA,GACF;AAAA,QAEF,gBAAAC;AAAA,UAACH;AAAA,UAAA;AAAA,YACC,gBAAe;AAAA,YACf,aAAY;AAAA,YACZ,iBAAgB;AAAA,YAChB,UAAU;AAAA,YACV,SAAS;AAAA,YACT,UAAU;AAAA,YACV,OAAO;AAAA,YAEP,UAAA;AAAA,cAAA,gBAAAG;AAAA,gBAACH;AAAA,gBAAA;AAAA,kBACC,gBAAe;AAAA,kBACf,aAAY;AAAA,kBACZ,iBAAgB;AAAA,kBAChB,WAAW;AAAA,kBAEX,UAAA;AAAA,oBAAA,gBAAAF,EAACE,KAAU,UAAgBZ,KAAA,gBAAAU,EAACM,GAAM,EAAA,KAAKhB,EAAc,CAAA,GAAG;AAAA,sCACvDc,GAAK,EAAA,WAAU,OAAM,QAAO,WAC1B,eAAW,IACd;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACF;AAAA,cACCjB,IACC,gBAAAa,EAACO,GAAU,EAAA,OAAO,IAAI,QAAQ,GAAI,CAAA,IAEjC,gBAAAP,EAAAQ,GAAA,EAAS,OAAO,IAAI,QAAQ,IAAI;AAAA,YAAA;AAAA,UAAA;AAAA,QAErC;AAAA,MAAA,GACF;AAAA,MAEF,aACE9B,EAAM,SAAS,sBACZ+B,GAAA,EAAqB,SAAS,IAC5B,UAAA/B,EAAM,IAAI,CAACgC,GAAMC,MAChB,gBAAAX;AAAA,QAACY;AAAAA,QAAA;AAAA,UAEC,aAAaD,MAAUjC,EAAM,SAAS;AAAA,UAEtC,UAAA,gBAAAsB;AAAA,YAACa;AAAA,YAAA;AAAA,cACC,MAAAH;AAAA,cACA,eAAA/B;AAAA,cACA,eAAAC;AAAA,cACA,MAAAJ;AAAA,cACA,UAAAO;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,QATK2B,EAAK,WAAW,QAAQC,CAAK;AAAA,MAWrC,CAAA,GACH,IAEE,gBAAAX,EAAAc,GAAA,CAAA,CAAA;AAAA,MAGN,gBAAgB;AAAA,MAChB,wBAAwBnB;AAAA,IAAA;AAAA,EAE5B,EAAA,CAAA;AAEJ,CAAC;AAEDtB,EAAmB,cAAc;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
2
|
+
import { memo as i } from "react";
|
|
3
|
+
import e from "../../ui/image/image.js";
|
|
4
4
|
import m from "../../ui/layout/flex-view.js";
|
|
5
5
|
import c from "../../ui/text/text.js";
|
|
6
6
|
import { ILLUSTRATIONS as $ } from "../../../assets/illustrations/illustrations.js";
|
|
@@ -13,16 +13,17 @@ const o = () => /* @__PURE__ */ t(
|
|
|
13
13
|
$gutterX: 1,
|
|
14
14
|
$gapX: 1.32,
|
|
15
15
|
$heightX: 4,
|
|
16
|
+
$widthX: 30,
|
|
16
17
|
$borderColor: "BLACK_T_15",
|
|
17
18
|
$background: "BLACK_T_04",
|
|
18
19
|
children: [
|
|
19
|
-
/* @__PURE__ */ r(
|
|
20
|
+
/* @__PURE__ */ r(e, { src: $.NO_ACTIVITY }),
|
|
20
21
|
/* @__PURE__ */ r(c, { $renderAs: "ab2", $color: "BLACK_T_38", children: "No Activity" })
|
|
21
22
|
]
|
|
22
23
|
}
|
|
23
24
|
);
|
|
24
25
|
o.displayName = "NoActivity";
|
|
25
|
-
const f =
|
|
26
|
+
const f = i(o);
|
|
26
27
|
export {
|
|
27
28
|
f as default
|
|
28
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-activity.js","sources":["../../../../src/features/timeline/comps/no-activity.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\n\nconst NoActivity = () => {\n return (\n <FlexView\n $flexDirection=\"row\"\n $flexGapX={0.75}\n $alignItems=\"center\"\n $gutterX={1}\n $gapX={1.32}\n $heightX={4}\n $borderColor=\"BLACK_T_15\"\n $background=\"BLACK_T_04\"\n >\n <Image src={ILLUSTRATIONS.NO_ACTIVITY} />\n <Text $renderAs=\"ab2\" $color=\"BLACK_T_38\">\n No Activity\n </Text>\n </FlexView>\n );\n};\n\nNoActivity.displayName = 'NoActivity';\n\nexport default memo(NoActivity);\n"],"names":["NoActivity","jsxs","FlexView","jsx","Image","ILLUSTRATIONS","Text","NoActivity$1","memo"],"mappings":";;;;;;AAOA,MAAMA,IAAa,MAEf,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,gBAAe;AAAA,IACf,WAAW;AAAA,IACX,aAAY;AAAA,IACZ,UAAU;AAAA,IACV,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAa;AAAA,IACb,aAAY;AAAA,IAEZ,UAAA;AAAA,MAAC,gBAAAC,EAAAC,GAAA,EAAM,KAAKC,EAAc,YAAa,CAAA;AAAA,wBACtCC,GAAK,EAAA,WAAU,OAAM,QAAO,cAAa,UAE1C,eAAA;AAAA,IAAA;AAAA,EAAA;AAAA;AAKNN,EAAW,cAAc;AAEzB,MAAeO,IAAAC,EAAKR,CAAU;"}
|
|
1
|
+
{"version":3,"file":"no-activity.js","sources":["../../../../src/features/timeline/comps/no-activity.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\n\nconst NoActivity = () => {\n return (\n <FlexView\n $flexDirection=\"row\"\n $flexGapX={0.75}\n $alignItems=\"center\"\n $gutterX={1}\n $gapX={1.32}\n $heightX={4}\n $widthX={30}\n $borderColor=\"BLACK_T_15\"\n $background=\"BLACK_T_04\"\n >\n <Image src={ILLUSTRATIONS.NO_ACTIVITY} />\n <Text $renderAs=\"ab2\" $color=\"BLACK_T_38\">\n No Activity\n </Text>\n </FlexView>\n );\n};\n\nNoActivity.displayName = 'NoActivity';\n\nexport default memo(NoActivity);\n"],"names":["NoActivity","jsxs","FlexView","jsx","Image","ILLUSTRATIONS","Text","NoActivity$1","memo"],"mappings":";;;;;;AAOA,MAAMA,IAAa,MAEf,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,gBAAe;AAAA,IACf,WAAW;AAAA,IACX,aAAY;AAAA,IACZ,UAAU;AAAA,IACV,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,IACT,cAAa;AAAA,IACb,aAAY;AAAA,IAEZ,UAAA;AAAA,MAAC,gBAAAC,EAAAC,GAAA,EAAM,KAAKC,EAAc,YAAa,CAAA;AAAA,wBACtCC,GAAK,EAAA,WAAU,OAAM,QAAO,cAAa,UAE1C,eAAA;AAAA,IAAA;AAAA,EAAA;AAAA;AAKNN,EAAW,cAAc;AAEzB,MAAeO,IAAAC,EAAKR,CAAU;"}
|
|
@@ -3,19 +3,19 @@ import a from "../../../assets/line-icons/icons/check2.js";
|
|
|
3
3
|
import m from "../../../assets/line-icons/icons/cross.js";
|
|
4
4
|
import n from "../../../assets/line-icons/icons/status.js";
|
|
5
5
|
import { CARD_TYPE as e, NODE_STATE as o } from "../daily-timeline-types.js";
|
|
6
|
-
import { formatDate as
|
|
7
|
-
const
|
|
6
|
+
import { formatDate as c } from "../../../node_modules/date-fns/format.js";
|
|
7
|
+
const N = (t) => {
|
|
8
8
|
switch (t) {
|
|
9
9
|
case o.COMPLETED:
|
|
10
|
-
return [a, "
|
|
10
|
+
return [a, "GREEN_2"];
|
|
11
11
|
case o.IN_PROGRESS:
|
|
12
|
-
return [n, "
|
|
12
|
+
return [n, "YELLOW_2"];
|
|
13
13
|
case o.PENDING:
|
|
14
|
-
return [m, "
|
|
14
|
+
return [m, "ORANGE_2"];
|
|
15
15
|
default:
|
|
16
16
|
return [n, "GREY_2"];
|
|
17
17
|
}
|
|
18
|
-
},
|
|
18
|
+
}, i = (t) => {
|
|
19
19
|
switch (t) {
|
|
20
20
|
case e.CW:
|
|
21
21
|
return r.CW_ICON;
|
|
@@ -30,11 +30,11 @@ const i = (t) => {
|
|
|
30
30
|
day: t.getDate(),
|
|
31
31
|
month: t.getMonth() + 1,
|
|
32
32
|
year: t.getFullYear(),
|
|
33
|
-
monthName:
|
|
33
|
+
monthName: c(t, "MMM")
|
|
34
34
|
});
|
|
35
35
|
export {
|
|
36
36
|
_ as getDayMonthYear,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
N as getStateConf,
|
|
38
|
+
i as getTimelineCardIcon
|
|
39
39
|
};
|
|
40
40
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../src/features/timeline/comps/utils.ts"],"sourcesContent":["import { format } from 'date-fns';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Check2Icon from '../../../assets/line-icons/icons/check2';\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport StatusIcon from '../../../assets/line-icons/icons/status';\nimport { CARD_TYPE, NODE_STATE } from '../daily-timeline-types';\n\nexport const getStateConf = (state: NODE_STATE) => {\n switch (state) {\n case NODE_STATE.COMPLETED:\n return [Check2Icon, '
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../src/features/timeline/comps/utils.ts"],"sourcesContent":["import { format } from 'date-fns';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Check2Icon from '../../../assets/line-icons/icons/check2';\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport StatusIcon from '../../../assets/line-icons/icons/status';\nimport { CARD_TYPE, NODE_STATE } from '../daily-timeline-types';\n\nexport const getStateConf = (state: NODE_STATE) => {\n switch (state) {\n case NODE_STATE.COMPLETED:\n return [Check2Icon, 'GREEN_2'];\n case NODE_STATE.IN_PROGRESS:\n return [StatusIcon, 'YELLOW_2'];\n case NODE_STATE.PENDING:\n return [CrossIcon, 'ORANGE_2'];\n default:\n return [StatusIcon, 'GREY_2'];\n }\n};\n\nexport const getTimelineCardIcon = (type: CARD_TYPE) => {\n switch (type) {\n case CARD_TYPE.CW:\n return ILLUSTRATIONS.CW_ICON;\n case CARD_TYPE.HW:\n return ILLUSTRATIONS.HW_ICON;\n case CARD_TYPE.CIRCLE:\n return ILLUSTRATIONS.CIRCLE_ICON;\n default:\n return null;\n }\n};\n\nexport const getDayMonthYear = (dateObj: Date) => ({\n day: dateObj.getDate(),\n month: dateObj.getMonth() + 1,\n year: dateObj.getFullYear(),\n monthName: format(dateObj, 'MMM'),\n});\n"],"names":["getStateConf","state","NODE_STATE","Check2Icon","StatusIcon","CrossIcon","getTimelineCardIcon","type","CARD_TYPE","ILLUSTRATIONS","getDayMonthYear","dateObj","format"],"mappings":";;;;;;AAQa,MAAAA,IAAe,CAACC,MAAsB;AACjD,UAAQA,GAAO;AAAA,IACb,KAAKC,EAAW;AACP,aAAA,CAACC,GAAY,SAAS;AAAA,IAC/B,KAAKD,EAAW;AACP,aAAA,CAACE,GAAY,UAAU;AAAA,IAChC,KAAKF,EAAW;AACP,aAAA,CAACG,GAAW,UAAU;AAAA,IAC/B;AACS,aAAA,CAACD,GAAY,QAAQ;AAAA,EAChC;AACF,GAEaE,IAAsB,CAACC,MAAoB;AACtD,UAAQA,GAAM;AAAA,IACZ,KAAKC,EAAU;AACb,aAAOC,EAAc;AAAA,IACvB,KAAKD,EAAU;AACb,aAAOC,EAAc;AAAA,IACvB,KAAKD,EAAU;AACb,aAAOC,EAAc;AAAA,IACvB;AACS,aAAA;AAAA,EACX;AACF,GAEaC,IAAkB,CAACC,OAAmB;AAAA,EACjD,KAAKA,EAAQ,QAAQ;AAAA,EACrB,OAAOA,EAAQ,SAAA,IAAa;AAAA,EAC5B,MAAMA,EAAQ,YAAY;AAAA,EAC1B,WAAWC,EAAOD,GAAS,KAAK;AAClC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daily-timeline-types.js","sources":["../../../src/features/timeline/daily-timeline-types.ts"],"sourcesContent":["import { type TCourseStream } from '../milestone/create/milestone-create-types';\nimport { type
|
|
1
|
+
{"version":3,"file":"daily-timeline-types.js","sources":["../../../src/features/timeline/daily-timeline-types.ts"],"sourcesContent":["import { type TCourseStream } from '../milestone/create/milestone-create-types';\nimport { type ITimelineData } from './api/use-daily-timeline-get';\n\nexport enum NODE_STATE {\n COMPLETED = 'COMPLETED',\n IN_PROGRESS = 'IN_PROGRESS',\n PENDING = 'PENDING',\n NOT_STARTED = 'NOT_STARTED',\n}\n\nexport enum USER_TYPE {\n TEACHER = 'TEACHER',\n STUDENT = 'STUDENT',\n PARENT = 'PARENT',\n}\n\nexport enum CARD_TYPE {\n CW = 'CW',\n HW = 'HW',\n CIRCLE = 'CIRCLE',\n}\n\nexport interface IDailyTimelineProps {\n userType: USER_TYPE;\n studentId: string;\n courseStreams?: TCourseStream[];\n onPuzzleClick?: (userNodeId: string, state: NODE_STATE) => void;\n onReviewClick?: (\n userNodeId: string | null,\n isSatMockTestBlock: boolean,\n userBlockId: string | null,\n ) => void;\n scrollAreaHeight?: string | number;\n}\n\nexport interface IDailyTimelineItemsProps extends IDailyTimelineProps {\n entry: ITimelineData;\n isFirstElement: boolean;\n shouldShowTag: boolean;\n}\n"],"names":["NODE_STATE","USER_TYPE","CARD_TYPE"],"mappings":"AAGY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,cAAc,eACdA,EAAA,UAAU,WACVA,EAAA,cAAc,eAJJA,IAAAA,KAAA,CAAA,CAAA,GAOAC,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,UAAU,WACVA,EAAA,SAAS,UAHCA,IAAAA,KAAA,CAAA,CAAA,GAMAC,sBAAAA,OACVA,EAAA,KAAK,MACLA,EAAA,KAAK,MACLA,EAAA,SAAS,UAHCA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"course-stream.js","sources":["../../../../src/features/trial-session/api/course-stream.ts"],"sourcesContent":["import { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../constants/api';\nimport type { TPreferenceSchema } from '../trial-session-types';\n\ntype TPreferencesBody = {\n preferences: TPreferenceSchema[];\n};\n\ntype TPreferencesMeta = {\n stream: string;\n studentId: string;\n};\n\nconst { usePost: usePostStudentPreferences } = createPostAPI<\n { id: string },\n TPreferencesBody,\n TPreferencesMeta\n>({\n getURL: (_, { studentId, stream }) =>\n `${BASE_URL_V1}/students/${studentId}/course-streams/${stream}/preferences/`,\n});\n\nexport { usePostStudentPreferences };\n"],"names":["usePostStudentPreferences","createPostAPI","_","studentId","stream","BASE_URL_V1"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"course-stream.js","sources":["../../../../src/features/trial-session/api/course-stream.ts"],"sourcesContent":["import { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../constants/api';\nimport type { TPreferenceSchema } from '../trial-session-types';\n\ntype TPreferencesBody = {\n preferences: TPreferenceSchema[];\n grade?: string;\n};\n\ntype TPreferencesMeta = {\n stream: string;\n studentId: string;\n};\n\nconst { usePost: usePostStudentPreferences } = createPostAPI<\n { id: string },\n TPreferencesBody,\n TPreferencesMeta\n>({\n getURL: (_, { studentId, stream }) =>\n `${BASE_URL_V1}/students/${studentId}/course-streams/${stream}/preferences/`,\n});\n\nexport { usePostStudentPreferences };\n"],"names":["usePostStudentPreferences","createPostAPI","_","studentId","stream","BASE_URL_V1"],"mappings":";;AAeA,MAAM,EAAE,SAASA,EAA0B,IAAIC,EAI7C;AAAA,EACA,QAAQ,CAACC,GAAG,EAAE,WAAAC,GAAW,QAAAC,EAAA,MACvB,GAAGC,CAAW,aAAaF,CAAS,mBAAmBC,CAAM;AACjE,CAAC;"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { createPatchAPI as
|
|
2
|
-
import { BASE_URL_V2 as
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { createPatchAPI as r } from "@cuemath/rest-api";
|
|
2
|
+
import { BASE_URL_V2 as o } from "../../../constants/api.js";
|
|
3
|
+
import { stringify as s } from "../../../helpers/query-string.js";
|
|
4
|
+
const { usePatch: c } = r({
|
|
5
|
+
getURL: (e, m, t) => `${o}/students/${e}/nodes/trial/resume/?${s(t)}`
|
|
5
6
|
});
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
c as useResumeTrialWorksheet
|
|
8
9
|
};
|
|
9
10
|
//# sourceMappingURL=trial-nodes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trial-nodes.js","sources":["../../../../src/features/trial-session/api/trial-nodes.ts"],"sourcesContent":["import { createPatchAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V2 } from '../../../constants/api';\nimport type { IResumeWorksheetModel } from '../../../types/models/worksheet';\n\nconst { usePatch: useResumeTrialWorksheet } = createPatchAPI<\n IResumeWorksheetModel,\n Record<string, unknown
|
|
1
|
+
{"version":3,"file":"trial-nodes.js","sources":["../../../../src/features/trial-session/api/trial-nodes.ts"],"sourcesContent":["import { createPatchAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V2 } from '../../../constants/api';\nimport type { IResumeWorksheetModel } from '../../../types/models/worksheet';\nimport { stringify } from '../../../helpers/query-string';\n\ntype TResumeWorksheetMata = {\n reset_attempt?: boolean;\n};\n\nconst { usePatch: useResumeTrialWorksheet } = createPatchAPI<\n IResumeWorksheetModel,\n Record<string, unknown>,\n TResumeWorksheetMata\n>({\n getURL: (studentId, _, query) =>\n `${BASE_URL_V2}/students/${studentId}/nodes/trial/resume/?${stringify(query)}`,\n});\n\nexport { useResumeTrialWorksheet };\n"],"names":["useResumeTrialWorksheet","createPatchAPI","studentId","_","query","BASE_URL_V2","stringify"],"mappings":";;;AAUA,MAAM,EAAE,UAAUA,EAAwB,IAAIC,EAI5C;AAAA,EACA,QAAQ,CAACC,GAAWC,GAAGC,MACrB,GAAGC,CAAW,aAAaH,CAAS,wBAAwBI,EAAUF,CAAK,CAAC;AAChF,CAAC;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import o from "styled-components";
|
|
2
|
+
import a from "../../../ui/layout/flex-view.js";
|
|
3
|
+
const i = o(a)(({ $isClosing: t }) => (console.log("isClosing", t), `
|
|
4
|
+
position: absolute;
|
|
5
|
+
top: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
left: 0;
|
|
9
|
+
z-index: 1;
|
|
10
|
+
backdrop-filter: blur(40px);
|
|
11
|
+
animation: ${t ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
|
|
12
|
+
|
|
13
|
+
@keyframes backdropFadeIn {
|
|
14
|
+
from {
|
|
15
|
+
opacity: 0;
|
|
16
|
+
}
|
|
17
|
+
to {
|
|
18
|
+
opacity: 1;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@keyframes backdropFadeOut {
|
|
23
|
+
from {
|
|
24
|
+
opacity: 1;
|
|
25
|
+
}
|
|
26
|
+
to {
|
|
27
|
+
opacity: 0;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`)), s = o(a)(
|
|
31
|
+
({ $isClosing: t }) => `
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: max-content;
|
|
34
|
+
overflow: auto;
|
|
35
|
+
position: fixed;
|
|
36
|
+
left: 0;
|
|
37
|
+
right: 0;
|
|
38
|
+
bottom: 0;
|
|
39
|
+
animation: ${t ? "slideOut" : "slideIn"} 0.3s forwards;
|
|
40
|
+
|
|
41
|
+
@keyframes slideIn {
|
|
42
|
+
from {
|
|
43
|
+
transform: translateY(100%);
|
|
44
|
+
opacity: 0;
|
|
45
|
+
}
|
|
46
|
+
to {
|
|
47
|
+
transform: translateY(0%);
|
|
48
|
+
opacity: 1;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@keyframes slideOut {
|
|
53
|
+
from {
|
|
54
|
+
transform: translateY(0%);
|
|
55
|
+
opacity: 1;E
|
|
56
|
+
}
|
|
57
|
+
to {
|
|
58
|
+
transform: translateY(100%);
|
|
59
|
+
opacity: 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`
|
|
63
|
+
);
|
|
64
|
+
export {
|
|
65
|
+
i as Container,
|
|
66
|
+
s as ModalWrapper
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=confirmation-modal-styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmation-modal-styled.js","sources":["../../../../../src/features/trial-session/comps/confirmation-modal/confirmation-modal-styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst Container = styled(FlexView)<{ $isClosing: boolean }>(({ $isClosing }) => {\n console.log('isClosing', $isClosing);\n return `\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 1;\n backdrop-filter: blur(40px);\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`;\n});\n\nconst ModalWrapper = styled(FlexView)<{ $isClosing?: boolean }>(\n ({ $isClosing }) => `\n width: 100%;\n height: max-content;\n overflow: auto;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n animation: ${$isClosing ? 'slideOut' : 'slideIn'} 0.3s forwards;\n\n @keyframes slideIn {\n from {\n transform: translateY(100%);\n opacity: 0;\n }\n to {\n transform: translateY(0%);\n opacity: 1;\n }\n }\n\n @keyframes slideOut {\n from {\n transform: translateY(0%);\n opacity: 1;E\n }\n to {\n transform: translateY(100%);\n opacity: 0;\n }\n }\n `,\n);\n\nexport { Container, ModalWrapper };\n"],"names":["Container","styled","FlexView","$isClosing","ModalWrapper"],"mappings":";;AAGA,MAAMA,IAAYC,EAAOC,CAAQ,EAA2B,CAAC,EAAE,YAAAC,SACrD,QAAA,IAAI,aAAaA,CAAU,GAC5B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAQMA,IAAa,oBAAoB,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoB/D,GAEKC,IAAeH,EAAOC,CAAQ;AAAA,EAClC,CAAC,EAAE,YAAAC,EAAA,MAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAQLA,IAAa,aAAa,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBpD;"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as o, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as f } from "react";
|
|
3
|
+
import { Container as p, ModalWrapper as C } from "./confirmation-modal-styled.js";
|
|
4
|
+
import u from "../../../ui/layout/flex-view.js";
|
|
5
|
+
import x from "../../../ui/text/text.js";
|
|
6
|
+
import n from "../../../ui/buttons/button/button.js";
|
|
7
|
+
import $ from "./hooks/use-confirmation-modal.js";
|
|
8
|
+
import { useTrialSessionContext as g } from "../../context/use-trial-session-context.js";
|
|
9
|
+
const h = f(() => {
|
|
10
|
+
const { formData: a } = g(), { modalConfig: i, openModal: l } = $(), { confirmationModalActive: r } = a || {}, {
|
|
11
|
+
title: t,
|
|
12
|
+
cancelText: m = "Cancel",
|
|
13
|
+
confirmText: s = "Confirm",
|
|
14
|
+
onCancel: c,
|
|
15
|
+
onConfirm: d
|
|
16
|
+
} = i || {};
|
|
17
|
+
return l ? /* @__PURE__ */ o(
|
|
18
|
+
p,
|
|
19
|
+
{
|
|
20
|
+
$background: "BLACK_T_38",
|
|
21
|
+
$flexDirection: "column-reverse",
|
|
22
|
+
$isClosing: !r,
|
|
23
|
+
children: /* @__PURE__ */ e(
|
|
24
|
+
C,
|
|
25
|
+
{
|
|
26
|
+
$background: "WHITE",
|
|
27
|
+
$gapX: 1.5,
|
|
28
|
+
$gutterX: 1.5,
|
|
29
|
+
$flexGapX: 1.5,
|
|
30
|
+
$isClosing: !r,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ o(x, { $renderAs: "ab1-bold", children: t }),
|
|
33
|
+
/* @__PURE__ */ e(u, { $flexGapX: 1, children: [
|
|
34
|
+
/* @__PURE__ */ o(
|
|
35
|
+
n,
|
|
36
|
+
{
|
|
37
|
+
renderAs: "secondary-danger",
|
|
38
|
+
size: "small",
|
|
39
|
+
label: s,
|
|
40
|
+
shape: "square",
|
|
41
|
+
onClick: d
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ o(
|
|
45
|
+
n,
|
|
46
|
+
{
|
|
47
|
+
renderAs: "secondary",
|
|
48
|
+
size: "small",
|
|
49
|
+
label: m,
|
|
50
|
+
shape: "square",
|
|
51
|
+
onClick: c
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
) : null;
|
|
60
|
+
});
|
|
61
|
+
h.displayName = "TrialConfirmationModal";
|
|
62
|
+
export {
|
|
63
|
+
h as default
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=confirmation-modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmation-modal.js","sources":["../../../../../src/features/trial-session/comps/confirmation-modal/confirmation-modal.tsx"],"sourcesContent":["import { memo } from 'react';\nimport * as Styled from './confirmation-modal-styled';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport Button from '../../../ui/buttons/button/button';\nimport useConfirmationModal from './hooks/use-confirmation-modal';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\n\nconst ConfirmationModal = memo(() => {\n const { formData } = useTrialSessionContext();\n const { modalConfig, openModal } = useConfirmationModal();\n\n const { confirmationModalActive } = formData || {};\n const {\n title,\n cancelText = 'Cancel',\n confirmText = 'Confirm',\n onCancel: handleCancel,\n onConfirm: handleConfirm,\n } = modalConfig || {};\n\n if (!openModal) return null;\n\n return (\n <Styled.Container\n $background=\"BLACK_T_38\"\n $flexDirection=\"column-reverse\"\n $isClosing={!confirmationModalActive}\n >\n <Styled.ModalWrapper\n $background=\"WHITE\"\n $gapX={1.5}\n $gutterX={1.5}\n $flexGapX={1.5}\n $isClosing={!confirmationModalActive}\n >\n <Text $renderAs=\"ab1-bold\">{title}</Text>\n <FlexView $flexGapX={1}>\n <Button\n renderAs=\"secondary-danger\"\n size=\"small\"\n label={confirmText}\n shape=\"square\"\n onClick={handleConfirm}\n />\n <Button\n renderAs=\"secondary\"\n size=\"small\"\n label={cancelText}\n shape=\"square\"\n onClick={handleCancel}\n />\n </FlexView>\n </Styled.ModalWrapper>\n </Styled.Container>\n );\n});\n\nConfirmationModal.displayName = 'TrialConfirmationModal';\n\nexport default ConfirmationModal;\n"],"names":["ConfirmationModal","memo","formData","useTrialSessionContext","modalConfig","openModal","useConfirmationModal","confirmationModalActive","title","cancelText","confirmText","handleCancel","handleConfirm","jsx","Styled.Container","jsxs","Styled.ModalWrapper","Text","FlexView","Button"],"mappings":";;;;;;;;AAQM,MAAAA,IAAoBC,EAAK,MAAM;AAC7B,QAAA,EAAE,UAAAC,MAAaC,KACf,EAAE,aAAAC,GAAa,WAAAC,EAAU,IAAIC,EAAqB,GAElD,EAAE,yBAAAC,EAAA,IAA4BL,KAAY,IAC1C;AAAA,IACJ,OAAAM;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,aAAAC,IAAc;AAAA,IACd,UAAUC;AAAA,IACV,WAAWC;AAAA,EAAA,IACTR,KAAe,CAAA;AAEf,SAACC,IAGH,gBAAAQ;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAY;AAAA,MACZ,gBAAe;AAAA,MACf,YAAY,CAACP;AAAA,MAEb,UAAA,gBAAAQ;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAY;AAAA,UACZ,OAAO;AAAA,UACP,UAAU;AAAA,UACV,WAAW;AAAA,UACX,YAAY,CAACT;AAAA,UAEb,UAAA;AAAA,YAAC,gBAAAM,EAAAI,GAAA,EAAK,WAAU,YAAY,UAAMT,GAAA;AAAA,YAClC,gBAAAO,EAACG,GAAS,EAAA,WAAW,GACnB,UAAA;AAAA,cAAA,gBAAAL;AAAA,gBAACM;AAAA,gBAAA;AAAA,kBACC,UAAS;AAAA,kBACT,MAAK;AAAA,kBACL,OAAOT;AAAA,kBACP,OAAM;AAAA,kBACN,SAASE;AAAA,gBAAA;AAAA,cACX;AAAA,cACA,gBAAAC;AAAA,gBAACM;AAAA,gBAAA;AAAA,kBACC,UAAS;AAAA,kBACT,MAAK;AAAA,kBACL,OAAOV;AAAA,kBACP,OAAM;AAAA,kBACN,SAASE;AAAA,gBAAA;AAAA,cACX;AAAA,YAAA,GACF;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA,IAhCmB;AAmCzB,CAAC;AAEDX,EAAkB,cAAc;"}
|