@cuemath/leap 2.8.60-as4 → 2.8.60-beta-0.1
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/bin2.js +8 -7
- package/dist/assets/line-icons/icons/bin2.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +2 -2
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +24 -24
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +16 -15
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +8 -12
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +72 -76
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -1
- package/dist/features/chapters-v2/utils/index.js +4 -5
- package/dist/features/chapters-v2/utils/index.js.map +1 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +34 -62
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +75 -62
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +110 -127
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +4 -12
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +105 -128
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
- package/dist/features/milestone/create/milestone-create.js +43 -49
- package/dist/features/milestone/create/milestone-create.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +40 -42
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/goal-edit-container.js +62 -64
- package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/milestone-edit-container.js +52 -54
- package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +89 -96
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +28 -28
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +111 -120
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +61 -59
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +85 -83
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js +90 -88
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +98 -82
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +18 -16
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +71 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +31 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +38 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +79 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +18 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +51 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +11 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +144 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +1 -0
- package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
- package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +24 -39
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/theme/button.js +5 -5
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/index.d.ts +13 -39
- package/dist/index.js +377 -381
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/line-icons/icons/skip-colored.js +0 -43
- package/dist/assets/line-icons/icons/skip-colored.js.map +0 -1
- package/dist/features/homework/card-menu-options.js +0 -25
- package/dist/features/homework/card-menu-options.js.map +0 -1
- package/dist/features/homework/homework-card.js +0 -210
- package/dist/features/homework/homework-card.js.map +0 -1
- package/dist/features/homework/styles.js +0 -114
- package/dist/features/homework/styles.js.map +0 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +0 -165
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +0 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +0 -25
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +0 -82
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +0 -1
- package/dist/features/recent-chapters/api/get-recent-chapters.js +0 -9
- package/dist/features/recent-chapters/api/get-recent-chapters.js.map +0 -1
- package/dist/features/recent-chapters/recent-chapters-styled.js +0 -16
- package/dist/features/recent-chapters/recent-chapters-styled.js.map +0 -1
- package/dist/features/recent-chapters/recent-chapters.js +0 -43
- package/dist/features/recent-chapters/recent-chapters.js.map +0 -1
- package/dist/features/sheet-v2/resource-list/resource-list.js +0 -52
- package/dist/features/sheet-v2/resource-list/resource-list.js.map +0 -1
@@ -1,5 +1,5 @@
|
|
1
|
-
import { jsx as
|
2
|
-
const
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
2
|
+
const e = (o) => /* @__PURE__ */ l(
|
3
3
|
"svg",
|
4
4
|
{
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -7,19 +7,20 @@ const l = (e) => /* @__PURE__ */ o(
|
|
7
7
|
height: "24",
|
8
8
|
viewBox: "0 0 24 24",
|
9
9
|
fill: "none",
|
10
|
-
...
|
11
|
-
children: /* @__PURE__ */
|
10
|
+
...o,
|
11
|
+
children: /* @__PURE__ */ l(
|
12
12
|
"path",
|
13
13
|
{
|
14
14
|
fillRule: "evenodd",
|
15
15
|
clipRule: "evenodd",
|
16
16
|
d: "M11.1 6.97363C11.1 6.47657 11.5029 6.07363 12 6.07363C12.4971 6.07363 12.9 6.47657 12.9 6.97363H14.1C14.1 5.81383 13.1598 4.87363 12 4.87363C10.8402 4.87363 9.9 5.81383 9.9 6.97363H11.1ZM17 7.92636V9.12636L7 9.12636V7.92636L17 7.92636ZM9.1 17.4V9.99999H7.9V18V18.6H8.5H15.5H16.1V18V9.99999H14.9V17.4H9.1ZM10.4 16V11H11.6V16H10.4ZM12.4 16V11H13.6V16H12.4Z",
|
17
|
-
fill: "currentColor"
|
17
|
+
fill: "currentColor",
|
18
|
+
fillOpacity: "0.87"
|
18
19
|
}
|
19
20
|
)
|
20
21
|
}
|
21
|
-
),
|
22
|
+
), n = e;
|
22
23
|
export {
|
23
|
-
|
24
|
+
n as default
|
24
25
|
};
|
25
26
|
//# sourceMappingURL=bin2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"bin2.js","sources":["../../../../src/assets/line-icons/icons/bin2.tsx"],"sourcesContent":["const Bin2Icon: React.FC<React.SVGProps<SVGSVGElement>> = props => (\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 fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M11.1 6.97363C11.1 6.47657 11.5029 6.07363 12 6.07363C12.4971 6.07363 12.9 6.47657 12.9 6.97363H14.1C14.1 5.81383 13.1598 4.87363 12 4.87363C10.8402 4.87363 9.9 5.81383 9.9 6.97363H11.1ZM17 7.92636V9.12636L7 9.12636V7.92636L17 7.92636ZM9.1 17.4V9.99999H7.9V18V18.6H8.5H15.5H16.1V18V9.99999H14.9V17.4H9.1ZM10.4 16V11H11.6V16H10.4ZM12.4 16V11H13.6V16H12.4Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Bin2Icon;\n"],"names":["Bin2Icon","props","jsx","Bin2Icon$1"],"mappings":";AAAA,MAAMA,IAAoD,CACxDC,MAAA,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,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,UAAS;AAAA,QACT,GAAE;AAAA,QACF,MAAK;AAAA,MAAA;AAAA,
|
1
|
+
{"version":3,"file":"bin2.js","sources":["../../../../src/assets/line-icons/icons/bin2.tsx"],"sourcesContent":["const Bin2Icon: React.FC<React.SVGProps<SVGSVGElement>> = props => (\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 fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M11.1 6.97363C11.1 6.47657 11.5029 6.07363 12 6.07363C12.4971 6.07363 12.9 6.47657 12.9 6.97363H14.1C14.1 5.81383 13.1598 4.87363 12 4.87363C10.8402 4.87363 9.9 5.81383 9.9 6.97363H11.1ZM17 7.92636V9.12636L7 9.12636V7.92636L17 7.92636ZM9.1 17.4V9.99999H7.9V18V18.6H8.5H15.5H16.1V18V9.99999H14.9V17.4H9.1ZM10.4 16V11H11.6V16H10.4ZM12.4 16V11H13.6V16H12.4Z\"\n fill=\"currentColor\"\n fillOpacity=\"0.87\"\n />\n </svg>\n);\n\nexport default Bin2Icon;\n"],"names":["Bin2Icon","props","jsx","Bin2Icon$1"],"mappings":";AAAA,MAAMA,IAAoD,CACxDC,MAAA,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,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,UAAS;AAAA,QACT,GAAE;AAAA,QACF,MAAK;AAAA,QACL,aAAY;AAAA,MAAA;AAAA,IACd;AAAA,EAAA;AACF,GAGFC,IAAeH;"}
|
@@ -11,7 +11,7 @@ const R = C(
|
|
11
11
|
image_url: h,
|
12
12
|
progress_stat: m,
|
13
13
|
image_hue: g
|
14
|
-
} = o, { completed: c
|
14
|
+
} = o, { completed: c, total: d } = m, [$, u] = x(!1), t = I(null), s = c > 0 ? Math.floor((c / d || 1) * 100) : 0, f = w(() => {
|
15
15
|
a(o, r);
|
16
16
|
}, [o, r, a]);
|
17
17
|
return T(() => {
|
@@ -19,7 +19,7 @@ const R = C(
|
|
19
19
|
}, [t]), /* @__PURE__ */ i(
|
20
20
|
b,
|
21
21
|
{
|
22
|
-
id: `milestone-chapter-${r
|
22
|
+
id: `milestone-chapter-${r}-${p}`,
|
23
23
|
$alignItems: "center",
|
24
24
|
$gapX: 1,
|
25
25
|
$gutterX: 1,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapter-item.js","sources":["../../../../../src/features/chapters/chapters-list/chapter-item/chapter-item.tsx"],"sourcesContent":["import type { IChapterItemProps } from './chapter-item-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useLayoutEffect, useRef, useState, memo } from 'react';\n\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../ui/layout/flex-view';\nimport * as Styled from './chapter-item-styled';\n\nconst ChapterItem: FC<IChapterItemProps> = memo(\n ({ milestoneId, chapter, onChapterClick, itemIndex }) => {\n const {\n name,\n image_url: imageUrl,\n progress_stat: chapterProgressStat,\n image_hue: imageHue,\n } = chapter;\n const { completed
|
1
|
+
{"version":3,"file":"chapter-item.js","sources":["../../../../../src/features/chapters/chapters-list/chapter-item/chapter-item.tsx"],"sourcesContent":["import type { IChapterItemProps } from './chapter-item-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useLayoutEffect, useRef, useState, memo } from 'react';\n\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../ui/layout/flex-view';\nimport * as Styled from './chapter-item-styled';\n\nconst ChapterItem: FC<IChapterItemProps> = memo(\n ({ milestoneId, chapter, onChapterClick, itemIndex }) => {\n const {\n name,\n image_url: imageUrl,\n progress_stat: chapterProgressStat,\n image_hue: imageHue,\n } = chapter;\n const { completed, total } = chapterProgressStat;\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n\n const completionPercentage = completed > 0 ? Math.floor((completed / total || 1) * 100) : 0;\n\n const handleOnChapterClick = useCallback(() => {\n onChapterClick(chapter, milestoneId);\n }, [chapter, milestoneId, onChapterClick]);\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, [titleTextRef]);\n\n return (\n <Styled.ChapterItemWrapper\n id={`milestone-chapter-${milestoneId}-${itemIndex}`}\n $alignItems=\"center\"\n $gapX={1}\n $gutterX={1}\n $flexGap={8}\n $background=\"WHITE_1\"\n onClick={handleOnChapterClick}\n className=\"goal-widget-chapter-item\"\n $bgColor={`${imageHue}_1`}\n >\n <Styled.ChapterImageWrapper\n $width=\"fit-content\"\n $position=\"relative\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <Styled.ChapterProgressWrapper>\n <Styled.ChapterProgressSVG width=\"96px\" height=\"96px\">\n <Styled.ChapterProgressSVGCircle $progress={0} r=\"47\" cx=\"48\" cy=\"48\" />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progress={completionPercentage * 2.98}\n r=\"47\"\n cx=\"48\"\n cy=\"48\"\n />\n </Styled.ChapterProgressSVG>\n </Styled.ChapterProgressWrapper>\n\n <Styled.ChapterImage src={imageUrl} alt=\"Chapter Image\" />\n\n {completionPercentage === 100 && (\n <Styled.StyledCheckIconWrapper>\n <Check2Icon width={20} height={20} />\n </Styled.StyledCheckIconWrapper>\n )}\n </Styled.ChapterImageWrapper>\n\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={name}\n hidden={!showTitleTooltip}\n widthX={21.75}\n zIndex={5}\n >\n <Styled.ChapterName\n ref={titleTextRef}\n $renderAs=\"ab2\"\n $color=\"BLACK_T_87\"\n $align=\"center\"\n >\n {name}\n </Styled.ChapterName>\n </ArrowTooltip>\n </FlexView>\n </Styled.ChapterItemWrapper>\n );\n },\n);\n\nexport default ChapterItem;\n"],"names":["ChapterItem","memo","milestoneId","chapter","onChapterClick","itemIndex","name","imageUrl","chapterProgressStat","imageHue","completed","total","showTitleTooltip","setShowTitleTooltip","useState","titleTextRef","useRef","completionPercentage","handleOnChapterClick","useCallback","useLayoutEffect","jsxs","Styled.ChapterItemWrapper","Styled.ChapterImageWrapper","jsx","Styled.ChapterProgressWrapper","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Styled.ChapterImage","Styled.StyledCheckIconWrapper","Check2Icon","FlexView","ArrowTooltip","Styled.ChapterName"],"mappings":";;;;;;AAUA,MAAMA,IAAqCC;AAAA,EACzC,CAAC,EAAE,aAAAC,GAAa,SAAAC,GAAS,gBAAAC,GAAgB,WAAAC,QAAgB;AACjD,UAAA;AAAA,MACJ,MAAAC;AAAA,MACA,WAAWC;AAAA,MACX,eAAeC;AAAA,MACf,W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A;AAAA,kBACL;AAAA,gBAAA,EAAA,CACF,EACF,CAAA;AAAA,kCAECW,GAAA,EAAoB,KAAKrB,GAAU,KAAI,iBAAgB;AAAA,gBAEvDU,MAAyB,OACvB,gBAAAO,EAAAK,GAAA,EACC,UAAC,gBAAAL,EAAAM,GAAA,EAAW,OAAO,IAAI,QAAQ,GAAA,CAAI,EACrC,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,UAEC,gBAAAN,EAAAO,GAAA,EAAS,iBAAgB,UAAS,aAAY,UAC7C,UAAA,gBAAAP;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,aAAa1B;AAAA,cACb,QAAQ,CAACM;AAAA,cACT,QAAQ;AAAA,cACR,QAAQ;AAAA,cAER,UAAA,gBAAAY;AAAA,gBAACS;AAAAA,gBAAA;AAAA,kBACC,KAAKlB;AAAA,kBACL,WAAU;AAAA,kBACV,QAAO;AAAA,kBACP,QAAO;AAAA,kBAEN,UAAAT;AAAA,gBAAA;AAAA,cACH;AAAA,YAAA;AAAA,UAAA,GAEJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as
|
3
|
-
import { ILLUSTRATIONS as
|
1
|
+
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
2
|
+
import { memo as x, useCallback as y, useEffect as p } from "react";
|
3
|
+
import { ILLUSTRATIONS as A } from "../../../assets/illustrations/illustrations.js";
|
4
4
|
import I from "../../../assets/line-icons/icons/back2.js";
|
5
5
|
import w from "../../ui/buttons/button/button.js";
|
6
6
|
import L from "../../ui/buttons/icon-button/icon-button.js";
|
@@ -9,13 +9,13 @@ import S from "../../ui/loader/app-loader/app-loader.js";
|
|
9
9
|
import _ from "../../ui/text/text.js";
|
10
10
|
import { useGetChapterDetails as b } from "../api/chapter.js";
|
11
11
|
import D from "./block-sections/block-sections.js";
|
12
|
-
import
|
13
|
-
import { ContentWrapper as T, BackButtonContainer as
|
14
|
-
const
|
12
|
+
import v from "./chapter-banner/chapter-banner.js";
|
13
|
+
import { ContentWrapper as T, BackButtonContainer as j, BackButtonWrapper as E, LoaderWrapper as P } from "./chapter-details-styled.js";
|
14
|
+
const R = x((l) => {
|
15
15
|
const {
|
16
16
|
userChapterId: i,
|
17
17
|
studentId: n,
|
18
|
-
userType:
|
18
|
+
userType: c,
|
19
19
|
onBlockSkipUnskip: h,
|
20
20
|
onNodeAttempt: d,
|
21
21
|
onNodeAttemptLocationChange: g,
|
@@ -24,20 +24,20 @@ const P = B((c) => {
|
|
24
24
|
onNodeReview: C,
|
25
25
|
onNodeView: k,
|
26
26
|
onExit: $
|
27
|
-
} =
|
28
|
-
get:
|
27
|
+
} = l, {
|
28
|
+
get: a,
|
29
29
|
data: e,
|
30
30
|
isProcessing: r,
|
31
|
-
isProcessingFailed:
|
32
|
-
isStale:
|
33
|
-
} = b(), o =
|
34
|
-
|
35
|
-
}, [
|
36
|
-
return
|
31
|
+
isProcessingFailed: B,
|
32
|
+
isStale: s
|
33
|
+
} = b(), o = y(() => {
|
34
|
+
a(i, void 0, { studentId: n });
|
35
|
+
}, [a, i, n]);
|
36
|
+
return p(() => {
|
37
37
|
o();
|
38
|
-
}, [o]),
|
39
|
-
!r &&
|
40
|
-
}, [o, r,
|
38
|
+
}, [o]), p(() => {
|
39
|
+
!r && s && o();
|
40
|
+
}, [o, r, s]), B ? /* @__PURE__ */ m(N, { $flexGapX: 1.5, $height: "100vh", $justifyContent: "center", $alignItems: "center", children: [
|
41
41
|
/* @__PURE__ */ t(_, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
|
42
42
|
/* @__PURE__ */ t(
|
43
43
|
w,
|
@@ -50,7 +50,7 @@ const P = B((c) => {
|
|
50
50
|
onClick: o
|
51
51
|
}
|
52
52
|
)
|
53
|
-
] }) : !e && r ? /* @__PURE__ */ t(S, { height: "80vh" }) : /* @__PURE__ */
|
53
|
+
] }) : !e && r ? /* @__PURE__ */ t(S, { height: "80vh" }) : /* @__PURE__ */ m(
|
54
54
|
T,
|
55
55
|
{
|
56
56
|
$widthX: 50,
|
@@ -58,7 +58,7 @@ const P = B((c) => {
|
|
58
58
|
$justifyContent: "center",
|
59
59
|
$alignItems: "center",
|
60
60
|
children: [
|
61
|
-
|
61
|
+
/* @__PURE__ */ t(j, { $height: "100%", children: /* @__PURE__ */ t(E, { children: /* @__PURE__ */ t(
|
62
62
|
L,
|
63
63
|
{
|
64
64
|
Icon: I,
|
@@ -68,9 +68,9 @@ const P = B((c) => {
|
|
68
68
|
onClick: $
|
69
69
|
}
|
70
70
|
) }) }),
|
71
|
-
r && /* @__PURE__ */ t(
|
71
|
+
r && /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t("img", { src: A.LOADER_1, alt: "loader" }) }),
|
72
72
|
e && /* @__PURE__ */ t(
|
73
|
-
|
73
|
+
v,
|
74
74
|
{
|
75
75
|
title: e.name,
|
76
76
|
imageHue: e.image_hue,
|
@@ -82,7 +82,7 @@ const P = B((c) => {
|
|
82
82
|
D,
|
83
83
|
{
|
84
84
|
imageHue: e.image_hue,
|
85
|
-
userType:
|
85
|
+
userType: c,
|
86
86
|
blocks: e.blocks,
|
87
87
|
onBlockSkipUnskip: h,
|
88
88
|
onNodeAttempt: d,
|
@@ -96,7 +96,7 @@ const P = B((c) => {
|
|
96
96
|
]
|
97
97
|
}
|
98
98
|
);
|
99
|
-
}), Q =
|
99
|
+
}), Q = R;
|
100
100
|
export {
|
101
101
|
Q as default
|
102
102
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import type { IChapterDetails } from './chapter-details-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { useGetChapterDetails } from '../api/chapter';\nimport BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(props => {\n const {\n userChapterId,\n studentId,\n userType,\n onBlockSkipUnskip,\n onNodeAttempt,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onExit,\n } = props;\n\n const {\n get: getChapterDetails,\n data: chapterDetails,\n isProcessing,\n isProcessingFailed,\n isStale,\n } = useGetChapterDetails();\n\n const fetchChapterDetails = useCallback(() => {\n getChapterDetails(userChapterId, undefined, { studentId });\n }, [getChapterDetails, userChapterId, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchChapterDetails();\n }\n }, [fetchChapterDetails, isProcessing, isStale]);\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapterDetails}\n />\n </FlexView>\n );\n }\n\n if (!chapterDetails && isProcessing) {\n return <AppLoader height=\"80vh\" />;\n }\n\n return (\n <Styled.ContentWrapper\n $widthX={50}\n $disablePointerEvents={isProcessing}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n
|
1
|
+
{"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import type { IChapterDetails } from './chapter-details-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { useGetChapterDetails } from '../api/chapter';\nimport BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(props => {\n const {\n userChapterId,\n studentId,\n userType,\n onBlockSkipUnskip,\n onNodeAttempt,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onExit,\n } = props;\n\n const {\n get: getChapterDetails,\n data: chapterDetails,\n isProcessing,\n isProcessingFailed,\n isStale,\n } = useGetChapterDetails();\n\n const fetchChapterDetails = useCallback(() => {\n getChapterDetails(userChapterId, undefined, { studentId });\n }, [getChapterDetails, userChapterId, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchChapterDetails();\n }\n }, [fetchChapterDetails, isProcessing, isStale]);\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapterDetails}\n />\n </FlexView>\n );\n }\n\n if (!chapterDetails && isProcessing) {\n return <AppLoader height=\"80vh\" />;\n }\n\n return (\n <Styled.ContentWrapper\n $widthX={50}\n $disablePointerEvents={isProcessing}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <Styled.BackButtonContainer $height=\"100%\">\n <Styled.BackButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary-gray\"\n analyticsLabel=\"chapter_page_exit\"\n size=\"xsmall\"\n onClick={onExit}\n />\n </Styled.BackButtonWrapper>\n </Styled.BackButtonContainer>\n\n {isProcessing && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loader\" />\n </Styled.LoaderWrapper>\n )}\n\n {chapterDetails && (\n <ChapterBanner\n title={chapterDetails.name}\n imageHue={chapterDetails.image_hue}\n imageUrl={chapterDetails.image_url}\n progressStats={chapterDetails?.progress_stat}\n />\n )}\n\n {chapterDetails && (\n <BlockSections\n imageHue={chapterDetails.image_hue}\n userType={userType}\n blocks={chapterDetails.blocks}\n onBlockSkipUnskip={onBlockSkipUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAttemptLocationChange={onNodeAttemptLocationChange}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n />\n )}\n </Styled.ContentWrapper>\n );\n});\n\nexport default ChapterDetails;\n"],"names":["ChapterDetails","memo","props","userChapterId","studentId","userType","onBlockSkipUnskip","onNodeAttempt","onNodeAttemptLocationChange","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onExit","getChapterDetails","chapterDetails","isProcessing","isProcessingFailed","isStale","useGetChapterDetails","fetchChapterDetails","useCallback","useEffect","jsxs","FlexView","jsx","Text","Button","AppLoader","Styled.ContentWrapper","Styled.BackButtonContainer","Styled.BackButtonWrapper","IconButton","Back2Icon","Styled.LoaderWrapper","ILLUSTRATIONS","ChapterBanner","BlockSections","ChapterDetails$1"],"mappings":";;;;;;;;;;;;;AAiBA,MAAMA,IAAsCC,EAAK,CAASC,MAAA;AAClD,QAAA;AAAA,IACJ,eAAAC;AAAA,IAC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ClC,UAAC,gBAAAL,EAAAM,GAAA,EACC,UAAA,gBAAAN;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,MAAMC;AAAA,YACN,UAAS;AAAA,YACT,gBAAe;AAAA,YACf,MAAK;AAAA,YACL,SAASpB;AAAA,UAAA;AAAA,WAEb,EACF,CAAA;AAAA,QAECG,KACC,gBAAAS,EAACS,GAAA,EACC,UAAA,gBAAAT,EAAC,OAAI,EAAA,KAAKU,EAAc,UAAU,KAAI,SAAA,CAAS,EACjD,CAAA;AAAA,QAGDpB,KACC,gBAAAU;AAAA,UAACW;AAAA,UAAA;AAAA,YACC,OAAOrB,EAAe;AAAA,YACtB,UAAUA,EAAe;AAAA,YACzB,UAAUA,EAAe;AAAA,YACzB,eAAeA,KAAA,gBAAAA,EAAgB;AAAA,UAAA;AAAA,QACjC;AAAA,QAGDA,KACC,gBAAAU;AAAA,UAACY;AAAA,UAAA;AAAA,YACC,UAAUtB,EAAe;AAAA,YACzB,UAAAV;AAAA,YACA,QAAQU,EAAe;AAAA,YACvB,mBAAAT;AAAA,YACA,eAAAC;AAAA,YACA,6BAAAC;AAAA,YACA,kBAAAC;AAAA,YACA,iBAAAC;AAAA,YACA,cAAAC;AAAA,YACA,YAAAC;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAED0B,IAAetC;"}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import e from "styled-components";
|
2
2
|
import d from "../../../../assets/line-icons/icons/important.js";
|
3
3
|
import c from "../../../../assets/line-icons/icons/lock2.js";
|
4
|
-
import
|
4
|
+
import t from "../../../ui/layout/flex-view.js";
|
5
5
|
import l from "../../../ui/text/text.js";
|
6
|
-
const
|
6
|
+
const m = e(t)(({
|
7
7
|
$showOutline: o,
|
8
8
|
theme: r,
|
9
9
|
$disabled: n,
|
@@ -64,7 +64,7 @@ const f = t(e)(({
|
|
64
64
|
${o && !s && `outline: 1px solid ${a};`};
|
65
65
|
}
|
66
66
|
`;
|
67
|
-
}), g =
|
67
|
+
}), g = e(d)(({ theme: o }) => {
|
68
68
|
const { layout: r } = o;
|
69
69
|
return `
|
70
70
|
width: ${r.gutter * 0.75}px;
|
@@ -73,54 +73,55 @@ const f = t(e)(({
|
|
73
73
|
top: -2.5px;
|
74
74
|
right: -2.5px;
|
75
75
|
`;
|
76
|
-
}), k = t
|
76
|
+
}), k = e(t)(({ $bgImage: o }) => `
|
77
77
|
background-image: url(${o});
|
78
78
|
|
79
79
|
& .context-menu {
|
80
80
|
justify-self: flex-end;
|
81
81
|
margin-left: auto;
|
82
82
|
}
|
83
|
-
`), $ = t
|
83
|
+
`), $ = e(t)`
|
84
84
|
border-radius: 50%;
|
85
|
-
`, v = t
|
85
|
+
`, v = e(t)(() => `
|
86
86
|
position: relative;
|
87
87
|
padding: 12px 8px 12px 12px;
|
88
|
-
`), w = t
|
88
|
+
`), w = e(t)(({ $top: o, $right: r }) => `
|
89
89
|
position: absolute;
|
90
90
|
top: ${o ?? 0}px;
|
91
91
|
right: ${r ?? 0}px;
|
92
92
|
z-index: 3;
|
93
93
|
`);
|
94
|
-
|
94
|
+
e(c)(({}) => `
|
95
95
|
width: 28px;
|
96
96
|
height: 28px;
|
97
97
|
`);
|
98
|
-
const I = t
|
98
|
+
const I = e(t)(({ theme: o }) => {
|
99
99
|
const { BLACK_1: r, WHITE_1: n } = o.colors;
|
100
100
|
return `
|
101
101
|
position: absolute;
|
102
102
|
top: -10px;
|
103
|
-
|
103
|
+
left: -10px;
|
104
|
+
border-radius: 50%;
|
104
105
|
background: ${r};
|
105
106
|
|
106
107
|
path {
|
107
108
|
fill: ${n};
|
108
109
|
}
|
109
110
|
`;
|
110
|
-
}), y =
|
111
|
+
}), y = e(l)(() => `
|
111
112
|
display: -webkit-box;
|
112
113
|
-webkit-box-orient: vertical;
|
113
114
|
-webkit-line-clamp: 2;
|
114
115
|
text-overflow: ellipsis;
|
115
116
|
overflow: hidden;
|
116
|
-
`), C = t
|
117
|
+
`), C = e(t)(({ theme: o }) => `
|
117
118
|
cursor: pointer;
|
118
119
|
|
119
120
|
&:hover {
|
120
121
|
border-radius: 50%;
|
121
122
|
background: ${o.colors.WHITE_5};
|
122
123
|
}
|
123
|
-
`), W = t
|
124
|
+
`), W = e(t)(({ theme: o, $visible: r }) => `
|
124
125
|
cursor: pointer;
|
125
126
|
|
126
127
|
position: absolute;
|
@@ -141,7 +142,7 @@ const I = t(e)(({ theme: o }) => {
|
|
141
142
|
export {
|
142
143
|
$ as IconWrapper,
|
143
144
|
I as InProgressIconWrapper,
|
144
|
-
|
145
|
+
m as NodeCardContainer,
|
145
146
|
v as NodeCardContentWrapper,
|
146
147
|
k as NodeCardInfoWrapper,
|
147
148
|
y as NodeCardTitle,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"node-card-styled.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport ImportantIcon from '../../../../assets/line-icons/icons/important';\nimport Lock2Icon from '../../../../assets/line-icons/icons/lock2';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface INodeCardContainer {\n $showOutline?: boolean;\n $disabled: boolean;\n $isSheetLocked?: boolean;\n}\n\nconst NodeCardContainer = styled(FlexView)<INodeCardContainer>(({\n $showOutline,\n theme,\n $disabled,\n $isSheetLocked,\n}) => {\n const { BLACK_1, BLACK, BLACK_T_15 } = theme.colors;\n\n return `\n cursor: ${$disabled ? 'not-allowed' : 'pointer'};\n ${$disabled ? 'pointer-events: none;' : 'pointer-events: auto;'};\n position: relative;\n border-image: linear-gradient(to right, ${BLACK_T_15} 0%, ${BLACK_T_15} 100%);\n ${$showOutline && `outline: 1px solid ${BLACK_T_15};`};\n\n .node-card-border {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n width: 100%;\n height: 100%;\n pointer-events: none;\n background: transparent;\n }\n\n .node-card-border > .border-path {\n fill: none;\n stroke: ${BLACK_T_15};\n stroke-width: 1.5;\n }\n\n .node-card-border > .border-path-animation {\n fill: none;\n stroke: ${BLACK};\n stroke-width: 1.5;\n //* view box size 170 + 56 + 170 + 56 = 452\n //* 452 / 2 = 226\n stroke-dasharray: 226 226;\n stroke-dashoffset: 0;\n\n animation: dashmove 6s linear infinite;\n }\n \n @keyframes dashmove {\n to {\n stroke-dashoffset: -900;\n }\n }\n \n &:hover {\n ${\n !$disabled &&\n `\n .node-card-border > .border-path-animation {\n stroke: ${BLACK_1};\n stroke-dasharray: 452;\n animation: none;\n }\n `\n }\n\n ${$showOutline && !$isSheetLocked && `outline: 1px solid ${BLACK};`};\n }\n `;\n});\n\nconst StyledImportantIcon = styled(ImportantIcon)(({ theme }) => {\n const { layout } = theme;\n\n return `\n width: ${layout.gutter * 0.75}px;\n height: ${layout.gutter * 0.75}px;\n position: absolute;\n top: -2.5px;\n right: -2.5px;\n `;\n});\n\ninterface INodeCardInfoWrapper {\n $bgImage: string;\n}\n\nconst NodeCardInfoWrapper = styled(FlexView)<INodeCardInfoWrapper>(({ $bgImage }) => {\n return `\n background-image: url(${$bgImage});\n\n & .context-menu {\n justify-self: flex-end;\n margin-left: auto;\n }\n `;\n});\n\nconst IconWrapper = styled(FlexView)`\n border-radius: 50%;\n`;\n\nconst NodeCardContentWrapper = styled(FlexView)(() => {\n return `\n position: relative;\n padding: 12px 8px 12px 12px;\n `;\n});\n\ninterface ISheetTagWrapper {\n $top?: number;\n $right?: number;\n}\n\nconst SheetTagWrapper = styled(FlexView)<ISheetTagWrapper>(({ $top, $right }) => {\n return `\n position: absolute;\n top: ${$top ?? 0}px;\n right: ${$right ?? 0}px;\n z-index: 3;\n`;\n});\n\nconst StyledLockIcon = styled(Lock2Icon)(({}) => {\n return `\n width: 28px;\n height: 28px;\n `;\n});\n\nconst InProgressIconWrapper = styled(FlexView)(({ theme }) => {\n const { BLACK_1, WHITE_1 } = theme.colors;\n\n return `\n position: absolute;\n top: -10px;\n
|
1
|
+
{"version":3,"file":"node-card-styled.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport ImportantIcon from '../../../../assets/line-icons/icons/important';\nimport Lock2Icon from '../../../../assets/line-icons/icons/lock2';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface INodeCardContainer {\n $showOutline?: boolean;\n $disabled: boolean;\n $isSheetLocked?: boolean;\n}\n\nconst NodeCardContainer = styled(FlexView)<INodeCardContainer>(({\n $showOutline,\n theme,\n $disabled,\n $isSheetLocked,\n}) => {\n const { BLACK_1, BLACK, BLACK_T_15 } = theme.colors;\n\n return `\n cursor: ${$disabled ? 'not-allowed' : 'pointer'};\n ${$disabled ? 'pointer-events: none;' : 'pointer-events: auto;'};\n position: relative;\n border-image: linear-gradient(to right, ${BLACK_T_15} 0%, ${BLACK_T_15} 100%);\n ${$showOutline && `outline: 1px solid ${BLACK_T_15};`};\n\n .node-card-border {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n width: 100%;\n height: 100%;\n pointer-events: none;\n background: transparent;\n }\n\n .node-card-border > .border-path {\n fill: none;\n stroke: ${BLACK_T_15};\n stroke-width: 1.5;\n }\n\n .node-card-border > .border-path-animation {\n fill: none;\n stroke: ${BLACK};\n stroke-width: 1.5;\n //* view box size 170 + 56 + 170 + 56 = 452\n //* 452 / 2 = 226\n stroke-dasharray: 226 226;\n stroke-dashoffset: 0;\n\n animation: dashmove 6s linear infinite;\n }\n \n @keyframes dashmove {\n to {\n stroke-dashoffset: -900;\n }\n }\n \n &:hover {\n ${\n !$disabled &&\n `\n .node-card-border > .border-path-animation {\n stroke: ${BLACK_1};\n stroke-dasharray: 452;\n animation: none;\n }\n `\n }\n\n ${$showOutline && !$isSheetLocked && `outline: 1px solid ${BLACK};`};\n }\n `;\n});\n\nconst StyledImportantIcon = styled(ImportantIcon)(({ theme }) => {\n const { layout } = theme;\n\n return `\n width: ${layout.gutter * 0.75}px;\n height: ${layout.gutter * 0.75}px;\n position: absolute;\n top: -2.5px;\n right: -2.5px;\n `;\n});\n\ninterface INodeCardInfoWrapper {\n $bgImage: string;\n}\n\nconst NodeCardInfoWrapper = styled(FlexView)<INodeCardInfoWrapper>(({ $bgImage }) => {\n return `\n background-image: url(${$bgImage});\n\n & .context-menu {\n justify-self: flex-end;\n margin-left: auto;\n }\n `;\n});\n\nconst IconWrapper = styled(FlexView)`\n border-radius: 50%;\n`;\n\nconst NodeCardContentWrapper = styled(FlexView)(() => {\n return `\n position: relative;\n padding: 12px 8px 12px 12px;\n `;\n});\n\ninterface ISheetTagWrapper {\n $top?: number;\n $right?: number;\n}\n\nconst SheetTagWrapper = styled(FlexView)<ISheetTagWrapper>(({ $top, $right }) => {\n return `\n position: absolute;\n top: ${$top ?? 0}px;\n right: ${$right ?? 0}px;\n z-index: 3;\n`;\n});\n\nconst StyledLockIcon = styled(Lock2Icon)(({}) => {\n return `\n width: 28px;\n height: 28px;\n `;\n});\n\nconst InProgressIconWrapper = styled(FlexView)(({ theme }) => {\n const { BLACK_1, WHITE_1 } = theme.colors;\n\n return `\n position: absolute;\n top: -10px;\n left: -10px;\n border-radius: 50%;\n background: ${BLACK_1};\n\n path {\n fill: ${WHITE_1};\n }\n `;\n});\n\nconst NodeCardTitle = styled(Text)(() => {\n return `\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n `;\n});\n\nconst NodeKebabMenuWrapper = styled(FlexView)(({ theme }) => {\n return `\n cursor: pointer;\n \n &:hover {\n border-radius: 50%;\n background: ${theme.colors.WHITE_5}; \n }\n `;\n});\n\ninterface INodeOptionsMenuWrapper {\n $visible: boolean;\n}\n\nconst NodeMenuOptionsWrapper = styled(FlexView)<INodeOptionsMenuWrapper>(({ theme, $visible }) => {\n return `\n cursor: pointer;\n\n position: absolute;\n z-index: 6;\n top: calc(100% + 4px);\n left: 0;\n\n transform-origin: top;\n transform: scaleY(${$visible ? 1 : 0});\n opacity: ${$visible ? 1 : 0};\n transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;\n \n &:hover {\n border-radius: 50%;\n background: ${theme.colors.WHITE_5}; \n }\n `;\n});\n\nexport {\n NodeCardContainer,\n StyledImportantIcon,\n NodeCardInfoWrapper,\n IconWrapper,\n NodeCardContentWrapper,\n SheetTagWrapper,\n StyledLockIcon,\n InProgressIconWrapper,\n NodeCardTitle,\n NodeKebabMenuWrapper,\n NodeMenuOptionsWrapper,\n};\n"],"names":["NodeCardContainer","styled","FlexView","$showOutline","theme","$disabled","$isSheetLocked","BLACK_1","BLACK","BLACK_T_15","StyledImportantIcon","ImportantIcon","layout","NodeCardInfoWrapper","$bgImage","IconWrapper","NodeCardContentWrapper","SheetTagWrapper","$top","$right","Lock2Icon","InProgressIconWrapper","WHITE_1","NodeCardTitle","Text","NodeKebabMenuWrapper","NodeMenuOptionsWrapper","$visible"],"mappings":";;;;;AAaA,MAAMA,IAAoBC,EAAOC,CAAQ,EAAsB,CAAC;AAAA,EAC9D,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAAC;AACF,MAAM;AACJ,QAAM,EAAE,SAAAC,GAAS,OAAAC,GAAO,YAAAC,EAAA,IAAeL,EAAM;AAEtC,SAAA;AAAA,cACKC,IAAY,gBAAgB,SAAS;AAAA,MAC7CA,IAAY,0BAA0B,uBAAuB;AAAA;AAAA,8CAErBI,CAAU,QAAQA,CAAU;AAAA,MACpEN,KAAgB,sBAAsBM,CAAU,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAezCA,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAMVD,CAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AAE,QACxC;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKWA,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC,GAMKsB,IAAyBzB,EAAOC,CAAQ,EAA2B,CAAC,EAAE,OAAAE,GAAO,UAAAuB,QAC1E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBASeA,IAAW,IAAI,CAAC;AAAA,eACzBA,IAAW,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKXvB,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC;"}
|
@@ -1,16 +1,12 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { memo as
|
3
|
-
import { getNodeStateBasedTagInfo as
|
4
|
-
import { SheetTagWrapper as
|
5
|
-
const
|
6
|
-
const { state: t, accuracy: e, nodeType:
|
7
|
-
|
8
|
-
top: n,
|
9
|
-
right: s
|
10
|
-
} = p(t, c, r);
|
11
|
-
return /* @__PURE__ */ d(g, { $top: n, $right: s, children: i });
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
2
|
+
import { memo as s } from "react";
|
3
|
+
import { getNodeStateBasedTagInfo as d } from "../../utils/node-card-utils.js";
|
4
|
+
import { SheetTagWrapper as p } from "./node-card-styled.js";
|
5
|
+
const T = s((o) => {
|
6
|
+
const { state: t, accuracy: e, nodeType: r } = o, a = r === "DYNAMIC" ? e : void 0, { icon: c, top: i, right: n } = d(t, a);
|
7
|
+
return /* @__PURE__ */ m(p, { $top: i, $right: n, children: c });
|
12
8
|
});
|
13
9
|
export {
|
14
|
-
|
10
|
+
T as default
|
15
11
|
};
|
16
12
|
//# sourceMappingURL=node-card-tags.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"node-card-tags.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-tags.tsx"],"sourcesContent":["import type { INodeCardTagsProps } from './node-card-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport { getNodeStateBasedTagInfo } from '../../utils/node-card-utils';\nimport * as Styled from './node-card-styled';\n\nconst NodeCardTags: FC<INodeCardTagsProps> = memo(props => {\n const { state, accuracy, nodeType
|
1
|
+
{"version":3,"file":"node-card-tags.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-tags.tsx"],"sourcesContent":["import type { INodeCardTagsProps } from './node-card-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport { getNodeStateBasedTagInfo } from '../../utils/node-card-utils';\nimport * as Styled from './node-card-styled';\n\nconst NodeCardTags: FC<INodeCardTagsProps> = memo(props => {\n const { state, accuracy, nodeType } = props;\n\n const isDynamicNode = nodeType === 'DYNAMIC';\n const accuracyValue = isDynamicNode ? accuracy : undefined;\n\n const { icon: NodeTagIcon, top, right } = getNodeStateBasedTagInfo(state, accuracyValue);\n\n return (\n <Styled.SheetTagWrapper $top={top} $right={right}>\n {NodeTagIcon}\n </Styled.SheetTagWrapper>\n );\n});\n\nexport default NodeCardTags;\n"],"names":["NodeCardTags","memo","props","state","accuracy","nodeType","accuracyValue","NodeTagIcon","top","right","getNodeStateBasedTagInfo","jsx","Styled.SheetTagWrapper"],"mappings":";;;;AAQM,MAAAA,IAAuCC,EAAK,CAASC,MAAA;AACzD,QAAM,EAAE,OAAAC,GAAO,UAAAC,GAAU,UAAAC,EAAA,IAAaH,GAGhCI,IADgBD,MAAa,YACGD,IAAW,QAE3C,EAAE,MAAMG,GAAa,KAAAC,GAAK,OAAAC,MAAUC,EAAyBP,GAAOG,CAAa;AAGrF,SAAA,gBAAAK,EAACC,GAAA,EAAuB,MAAMJ,GAAK,QAAQC,GACxC,UACHF,EAAA,CAAA;AAEJ,CAAC;"}
|