@cuemath/leap 2.9.9-as1 → 2.9.9-as2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +5 -5
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +16 -7
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +57 -64
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +8 -8
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js +31 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +6 -28
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +100 -91
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +94 -92
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/chapters-v2/comps/tag/tag.js +2 -2
- package/dist/features/chapters-v2/comps/tag/tag.js.map +1 -1
- package/dist/features/chapters-v2/utils/index.js +2 -5
- package/dist/features/chapters-v2/utils/index.js.map +1 -1
- package/dist/features/homework/card-menu-option.js +28 -0
- package/dist/features/homework/card-menu-option.js.map +1 -0
- package/dist/features/homework/card-menu-options.js +12 -28
- package/dist/features/homework/card-menu-options.js.map +1 -1
- package/dist/features/homework/card-title.js +10 -9
- package/dist/features/homework/card-title.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +51 -49
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +78 -72
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +32 -31
- 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/milestone-info.js +14 -14
- 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/outcome/outcome-styled.js +2 -6
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js.map +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +30 -29
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +19 -13
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
@@ -4,20 +4,20 @@ import k from "../../../../assets/line-icons/icons/check2.js";
|
|
4
4
|
import h from "../../../ui/arrow-tooltip/arrow-tooltip.js";
|
5
5
|
import A from "../../../ui/layout/flex-view.js";
|
6
6
|
import { ChapterItemWrapper as H, ChapterImageWrapper as P, ChapterProgressWrapper as j, ChapterProgressSVG as G, ChapterProgressSVGCircle as m, ChapterImage as V, StyledCheckIconWrapper as X, ChapterName as z } from "./chapter-item-styled.js";
|
7
|
-
const
|
7
|
+
const B = T(
|
8
8
|
({ milestoneId: o, chapter: i, onChapterClick: a, itemIndex: d }) => {
|
9
9
|
const {
|
10
10
|
name: l,
|
11
11
|
image_url: g,
|
12
12
|
progress_stat: u,
|
13
13
|
image_hue: C
|
14
|
-
} = i, { mandatory: $, optional: f } = u || {}, { completed: s = 0, total: c = 0 } = $ || {}, { total: I = 0 } = f || {}, [x,
|
14
|
+
} = i, { mandatory: $, optional: f } = u || {}, { completed: s = 0, total: c = 0 } = $ || {}, { total: I = 0 } = f || {}, [x, y] = b(!1), t = S(null), p = s > 0 ? Math.floor((s / c || 1) * 100) : 0, r = c + I, w = W(() => {
|
15
15
|
if (r === 0)
|
16
16
|
return null;
|
17
17
|
a(i, o);
|
18
18
|
}, [i, o, a, r]);
|
19
19
|
return _(() => {
|
20
|
-
t.current && t.current.scrollHeight > t.current.clientHeight &&
|
20
|
+
t.current && t.current.scrollHeight > t.current.clientHeight && y(!0);
|
21
21
|
}, [t]), /* @__PURE__ */ e(
|
22
22
|
h,
|
23
23
|
{
|
@@ -36,7 +36,7 @@ const F = T(
|
|
36
36
|
$gutterX: 1,
|
37
37
|
$flexGap: 8,
|
38
38
|
$background: "WHITE_1",
|
39
|
-
onClick:
|
39
|
+
onClick: w,
|
40
40
|
className: "goal-widget-chapter-item",
|
41
41
|
$bgColor: `${C}_1`,
|
42
42
|
shouldHideClick: r === 0,
|
@@ -96,6 +96,6 @@ const F = T(
|
|
96
96
|
}
|
97
97
|
);
|
98
98
|
export {
|
99
|
-
|
99
|
+
B as default
|
100
100
|
};
|
101
101
|
//# sourceMappingURL=chapter-item.js.map
|
@@ -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 { mandatory, optional } = chapterProgressStat || {};\n const { completed = 0, total = 0 } = mandatory || {};\n const { total: optionalTotal = 0 } = optional || {};\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n const completionPercentage
|
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 { mandatory, optional } = chapterProgressStat || {};\n const { completed = 0, total: totalMandatory = 0 } = mandatory || {};\n const { total: optionalTotal = 0 } = optional || {};\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n const completionPercentage =\n completed > 0 ? Math.floor((completed / totalMandatory || 1) * 100) : 0;\n const totalSheets = totalMandatory + optionalTotal;\n const handleOnChapterClick = useCallback(() => {\n if (totalSheets === 0) {\n return null;\n }\n\n onChapterClick(chapter, milestoneId);\n }, [chapter, milestoneId, onChapterClick, totalSheets]);\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 <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem=\"Coming soon! We’re building this chapter\"\n hidden={totalSheets > 0}\n parentWidth=\"100%\"\n zIndex={5}\n >\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 shouldHideClick={totalSheets === 0}\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 </ArrowTooltip>\n );\n },\n);\n\nexport default ChapterItem;\n"],"names":["ChapterItem","memo","milestoneId","chapter","onChapterClick","itemIndex","name","imageUrl","chapterProgressStat","imageHue","mandatory","optional","completed","totalMandatory","optionalTotal","showTitleTooltip","setShowTitleTooltip","useState","titleTextRef","useRef","completionPercentage","totalSheets","handleOnChapterClick","useCallback","useLayoutEffect","jsx","ArrowTooltip","jsxs","Styled.ChapterItemWrapper","Styled.ChapterImageWrapper","Styled.ChapterProgressWrapper","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Styled.ChapterImage","Styled.StyledCheckIconWrapper","Check2Icon","FlexView","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,WAAWC;AAAA,IACT,IAAAN,GACE,EAAE,WAAAO,GAAW,UAAAC,MAAaH,KAAuB,CAAA,GACjD,EAAE,WAAAI,IAAY,GAAG,OAAOC,IAAiB,EAAE,IAAIH,KAAa,IAC5D,EAAE,OAAOI,IAAgB,EAAE,IAAIH,KAAY,CAAA,GAC3C,CAACI,GAAkBC,CAAmB,IAAIC,EAAS,EAAK,GACxDC,IAAeC,EAAuB,IAAI,GAC1CC,IACJR,IAAY,IAAI,KAAK,OAAOA,IAAYC,KAAkB,KAAK,GAAG,IAAI,GAClEQ,IAAcR,IAAiBC,GAC/BQ,IAAuBC,EAAY,MAAM;AAC7C,UAAIF,MAAgB;AACX,eAAA;AAGT,MAAAjB,EAAeD,GAASD,CAAW;AAAA,OAClC,CAACC,GAASD,GAAaE,GAAgBiB,CAAW,CAAC;AAEtD,WAAAG,EAAgB,MAAM;AACpB,MACEN,EAAa,WACbA,EAAa,QAAQ,eAAeA,EAAa,QAAQ,gBAEzDF,EAAoB,EAAI;AAAA,IAC1B,GACC,CAACE,CAAY,CAAC,GAGf,gBAAAO;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,UAAS;AAAA,QACT,aAAY;AA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X;AAAA,gBAACC;AAAA,gBAAA;AAAA,kBACC,UAAS;AAAA,kBACT,UAAS;AAAA,kBACT,aAAapB;AAAA,kBACb,QAAQ,CAACS;AAAA,kBACT,QAAQ;AAAA,kBACR,QAAQ;AAAA,kBAER,UAAA,gBAAAU;AAAA,oBAACY;AAAAA,oBAAA;AAAA,sBACC,KAAKnB;AAAA,sBACL,WAAU;AAAA,sBACV,QAAO;AAAA,sBACP,QAAO;AAAA,sBAEN,UAAAZ;AAAA,oBAAA;AAAA,kBACH;AAAA,gBAAA;AAAA,cAAA,GAEJ;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"block-section-view.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-section-view.tsx"],"sourcesContent":["import type { INodeMenuOption } from '../../comps/node-card/node-menu-options/node-menu-options-types';\nimport type { IBlockSectionProps } from './block-sections-types';\nimport type { FC } from 'react';\n\nimport MoreVerticalIcon from '../../../../assets/line-icons/icons/more-vertical';\nimport SkipIcon from '../../../../assets/line-icons/icons/skip';\nimport ContextMenu from '../../../ui/context-menu/context-menu';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport NodeCard from '../../comps/node-card/node-card';\nimport NodeMenuOptions from '../../comps/node-card/node-menu-options/node-menu-options';\nimport { BLOCK_NAME } from '../../constants/block-constants';\nimport { getSheetNLessonCount } from '../../utils';\nimport * as Styled from './block-sections-styled';\n\nconst BlockSectionView: FC<IBlockSectionProps> = ({\n userType,\n imageHue,\n blockData,\n lessonIdx,\n isLastBlock,\n isGoalBlock,\n onNodeAttempt,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onBlockSkipUnskip,\n}) => {\n const { block_type: blockType, name, sheets, permissions } = blockData;\n\n const { can_skip: canSkip, can_un_skip: canUnskip } = permissions;\n const blockName = BLOCK_NAME[blockType];\n\n const sheetNLessonCount = getSheetNLessonCount(canUnskip, sheets.length, isGoalBlock, lessonIdx);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-skip',\n label: canUnskip ? `Revert 'Skip'` : 'Skip',\n icon: SkipIcon,\n disabled: false,\n onClick: () => onBlockSkipUnskip?.(blockData, canSkip),\n },\n ];\n\n if (userType === 'STUDENT' && canUnskip) return null;\n\n return (\n <Styled.BlockSectionWrapper\n $background={isGoalBlock ? `${imageHue}_1` : 'WHITE_1'}\n $gutterX={1}\n $lastBlock={isLastBlock}\n $flexGap={12}\n >\n <FlexView $flexGap={12}>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $justifyContent=\"space-between\">\n <FlexView $opacity={canUnskip ? 0.5 : 1}>\n <Text\n $renderAs=\"ac4\"\n $color=\"BLACK_T_60\"\n $textDecoration={canUnskip ? 'line-through' : 'none'}\n >\n {blockName === 'Puzzles' ? name : blockName}{' '}\n {userType !== 'STUDENT' && sheetNLessonCount}\n </Text>\n\n {isGoalBlock &&
|
1
|
+
{"version":3,"file":"block-section-view.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-section-view.tsx"],"sourcesContent":["import type { INodeMenuOption } from '../../comps/node-card/node-menu-options/node-menu-options-types';\nimport type { IBlockSectionProps } from './block-sections-types';\nimport type { FC } from 'react';\n\nimport MoreVerticalIcon from '../../../../assets/line-icons/icons/more-vertical';\nimport SkipIcon from '../../../../assets/line-icons/icons/skip';\nimport ContextMenu from '../../../ui/context-menu/context-menu';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport NodeCard from '../../comps/node-card/node-card';\nimport NodeMenuOptions from '../../comps/node-card/node-menu-options/node-menu-options';\nimport { BLOCK_NAME } from '../../constants/block-constants';\nimport { getSheetNLessonCount } from '../../utils';\nimport * as Styled from './block-sections-styled';\n\nconst BlockSectionView: FC<IBlockSectionProps> = ({\n userType,\n imageHue,\n blockData,\n lessonIdx,\n isLastBlock,\n isGoalBlock,\n onNodeAttempt,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onBlockSkipUnskip,\n}) => {\n const { block_type: blockType, name, sheets, permissions } = blockData;\n\n const { can_skip: canSkip, can_un_skip: canUnskip } = permissions;\n const blockName = BLOCK_NAME[blockType];\n\n const sheetNLessonCount = getSheetNLessonCount(canUnskip, sheets.length, isGoalBlock, lessonIdx);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-skip',\n label: canUnskip ? `Revert 'Skip'` : 'Skip',\n icon: SkipIcon,\n disabled: false,\n onClick: () => onBlockSkipUnskip?.(blockData, canSkip),\n },\n ];\n\n if (userType === 'STUDENT' && canUnskip) return null;\n\n return (\n <Styled.BlockSectionWrapper\n $background={isGoalBlock ? `${imageHue}_1` : 'WHITE_1'}\n $gutterX={1}\n $lastBlock={isLastBlock}\n $flexGap={12}\n >\n <FlexView $flexGap={12}>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $justifyContent=\"space-between\">\n <FlexView $opacity={canUnskip ? 0.5 : 1}>\n <Text\n $renderAs=\"ac4\"\n $color=\"BLACK_T_60\"\n $textDecoration={canUnskip ? 'line-through' : 'none'}\n >\n {blockName === 'Puzzles' ? name : blockName}{' '}\n {userType !== 'STUDENT' && sheetNLessonCount}\n </Text>\n\n {!!isGoalBlock && !!lessonIdx && (\n <Text\n $renderAs=\"ab2-bold\"\n $color=\"BLACK_1\"\n $textDecoration={canUnskip ? 'line-through' : 'none'}\n >\n {name}\n </Text>\n )}\n </FlexView>\n\n {userType === 'TEACHER' && (canSkip || canUnskip) && (\n <ContextMenu\n targetElement={\n <Styled.BlockOptionsWrapper\n $width={20}\n $height={20}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <MoreVerticalIcon width={16} height={16} />\n </Styled.BlockOptionsWrapper>\n }\n menuElement={<NodeMenuOptions options={menuOptions} />}\n menuOffset={5}\n menuZIndex={4}\n />\n )}\n </FlexView>\n\n <Styled.BlockSheetContainer $opacity={canUnskip ? 0.5 : 1}>\n {sheets.map(nodeData => (\n <NodeCard\n key={nodeData.node_id}\n imageHue={imageHue || 'BLUE'}\n userType={userType}\n nodeData={nodeData}\n blockType={blockType}\n isSkipped={canUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAttemptLocationChange={onNodeAttemptLocationChange}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n />\n ))}\n </Styled.BlockSheetContainer>\n </FlexView>\n </Styled.BlockSectionWrapper>\n );\n};\n\nexport default BlockSectionView;\n"],"names":["BlockSectionView","userType","imageHue","blockData","lessonIdx","isLastBlock","isGoalBlock","onNodeAttempt","onNodeAttemptLocationChange","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onBlockSkipUnskip","blockType","name","sheets","permissions","canSkip","canUnskip","blockName","BLOCK_NAME","sheetNLessonCount","getSheetNLessonCount","menuOptions","SkipIcon","jsx","Styled.BlockSectionWrapper","jsxs","FlexView","Text","ContextMenu","Styled.BlockOptionsWrapper","MoreVerticalIcon","NodeMenuOptions","Styled.BlockSheetContainer","nodeData","NodeCard"],"mappings":";;;;;;;;;;;AAeA,MAAMA,IAA2C,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,6BAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,mBAAAC;AACF,MAAM;AACJ,QAAM,EAAE,YAAYC,GAAW,MAAAC,GAAM,QAAAC,GAAQ,aAAAC,EAAgB,IAAAd,GAEvD,EAAE,UAAUe,GAAS,aAAaC,MAAcF,GAChDG,IA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L;AAAA,gBAACM;AAAAA,gBAAA;AAAA,kBACC,QAAQ;AAAA,kBACR,SAAS;AAAA,kBACT,iBAAgB;AAAA,kBAChB,aAAY;AAAA,kBAEZ,UAAC,gBAAAN,EAAAO,GAAA,EAAiB,OAAO,IAAI,QAAQ,IAAI;AAAA,gBAAA;AAAA,cAC3C;AAAA,cAEF,aAAa,gBAAAP,EAACQ,GAAgB,EAAA,SAASV,EAAa,CAAA;AAAA,cACpD,YAAY;AAAA,cACZ,YAAY;AAAA,YAAA;AAAA,UACd;AAAA,QAAA,GAEJ;AAAA,QAEA,gBAAAE,EAACS,GAAA,EAA2B,UAAUhB,IAAY,MAAM,GACrD,UAAOH,EAAA,IAAI,CACVoB,MAAA,gBAAAV;AAAA,UAACW;AAAA,UAAA;AAAA,YAEC,UAAUnC,KAAY;AAAA,YACtB,UAAAD;AAAA,YACA,UAAAmC;AAAA,YACA,WAAAtB;AAAA,YACA,WAAWK;AAAA,YACX,eAAAZ;AAAA,YACA,6BAAAC;AAAA,YACA,kBAAAC;AAAA,YACA,iBAAAC;AAAA,YACA,cAAAC;AAAA,YACA,YAAAC;AAAA,UAAA;AAAA,UAXKwB,EAAS;AAAA,QAajB,CAAA,GACH;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
@@ -1,26 +1,35 @@
|
|
1
1
|
import o from "styled-components";
|
2
|
-
import
|
3
|
-
const i = o(
|
2
|
+
import t from "../../../ui/layout/flex-view.js";
|
3
|
+
const i = o(t)(({ $lastBlock: r }) => `
|
4
4
|
padding-top: 32px;
|
5
5
|
${r ? "padding-bottom: 32px;" : "padding-bottom: 0px;"}
|
6
|
-
`),
|
6
|
+
`), a = o.div(({ $opacity: r }) => `
|
7
7
|
display: grid;
|
8
8
|
grid-template-columns: repeat(4, 1fr);
|
9
9
|
grid-row-gap: 12px;
|
10
10
|
grid-column-gap: 16px;
|
11
11
|
opacity: ${r ?? 1};
|
12
12
|
|
13
|
-
`),
|
13
|
+
`), n = o(t)(({ theme: r }) => `
|
14
14
|
cursor: pointer;
|
15
15
|
|
16
16
|
&:hover {
|
17
17
|
border-radius: 50%;
|
18
18
|
background: ${r.colors.WHITE_4};
|
19
19
|
}
|
20
|
-
`)
|
20
|
+
`), d = o(t)`
|
21
|
+
min-height: calc(
|
22
|
+
100vh - 168px - 56px + 64px
|
23
|
+
); // 168 chapter banner, 56 header height , 64 bottom padding
|
24
|
+
|
25
|
+
&:last-child {
|
26
|
+
padding-bottom: 64px;
|
27
|
+
}
|
28
|
+
`;
|
21
29
|
export {
|
22
|
-
|
30
|
+
n as BlockOptionsWrapper,
|
23
31
|
i as BlockSectionWrapper,
|
24
|
-
|
32
|
+
a as BlockSheetContainer,
|
33
|
+
d as ChapterDetailsWrapper
|
25
34
|
};
|
26
35
|
//# sourceMappingURL=block-sections-styled.js.map
|
package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"block-sections-styled.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\ninterface IBlockSectionWrapper {\n $lastBlock?: boolean;\n}\n\nconst BlockSectionWrapper = styled(FlexView)<IBlockSectionWrapper>(({ $lastBlock }) => {\n return `\n padding-top: 32px;\n ${$lastBlock ? 'padding-bottom: 32px;' : 'padding-bottom: 0px;'}\n `;\n});\n\ninterface IBlockSheetContainer {\n $opacity?: number;\n}\n\nconst BlockSheetContainer = styled.div<IBlockSheetContainer>(({ $opacity }) => {\n return `\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n grid-row-gap: 12px;\n grid-column-gap: 16px;\n opacity: ${$opacity ?? 1};\n\n `;\n});\n\nconst BlockOptionsWrapper = styled(FlexView)(({ theme }) => {\n return `\n cursor: pointer;\n \n &:hover {\n border-radius: 50%;\n background: ${theme.colors.WHITE_4}; \n }\n `;\n});\n\nexport { BlockSectionWrapper, BlockSheetContainer, BlockOptionsWrapper };\n"],"names":["BlockSectionWrapper","styled","FlexView","$lastBlock","BlockSheetContainer","$opacity","BlockOptionsWrapper","theme"],"mappings":";;AAQA,MAAMA,IAAsBC,EAAOC,CAAQ,EAAwB,CAAC,EAAE,YAAAC,QAC7D;AAAA;AAAA,MAEHA,IAAa,0BAA0B,sBAAsB;AAAA,GAElE,GAMKC,IAAsBH,EAAO,IAA0B,CAAC,EAAE,UAAAI,QACvD;AAAA;AAAA;AAAA;AAAA;AAAA,eAKMA,KAAY,CAAC;AAAA;AAAA,GAG3B,GAEKC,IAAsBL,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAK,QACvC;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKWA,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC;"}
|
1
|
+
{"version":3,"file":"block-sections-styled.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\ninterface IBlockSectionWrapper {\n $lastBlock?: boolean;\n}\n\nconst BlockSectionWrapper = styled(FlexView)<IBlockSectionWrapper>(({ $lastBlock }) => {\n return `\n padding-top: 32px;\n ${$lastBlock ? 'padding-bottom: 32px;' : 'padding-bottom: 0px;'}\n `;\n});\n\ninterface IBlockSheetContainer {\n $opacity?: number;\n}\n\nconst BlockSheetContainer = styled.div<IBlockSheetContainer>(({ $opacity }) => {\n return `\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n grid-row-gap: 12px;\n grid-column-gap: 16px;\n opacity: ${$opacity ?? 1};\n\n `;\n});\n\nconst BlockOptionsWrapper = styled(FlexView)(({ theme }) => {\n return `\n cursor: pointer;\n \n &:hover {\n border-radius: 50%;\n background: ${theme.colors.WHITE_4}; \n }\n `;\n});\n\nconst ChapterDetailsWrapper = styled(FlexView)`\n min-height: calc(\n 100vh - 168px - 56px + 64px\n ); // 168 chapter banner, 56 header height , 64 bottom padding\n\n &:last-child {\n padding-bottom: 64px;\n }\n`;\n\nexport { BlockSectionWrapper, ChapterDetailsWrapper, BlockSheetContainer, BlockOptionsWrapper };\n"],"names":["BlockSectionWrapper","styled","FlexView","$lastBlock","BlockSheetContainer","$opacity","BlockOptionsWrapper","theme","ChapterDetailsWrapper"],"mappings":";;AAQA,MAAMA,IAAsBC,EAAOC,CAAQ,EAAwB,CAAC,EAAE,YAAAC,QAC7D;AAAA;AAAA,MAEHA,IAAa,0BAA0B,sBAAsB;AAAA,GAElE,GAMKC,IAAsBH,EAAO,IAA0B,CAAC,EAAE,UAAAI,QACvD;AAAA;AAAA;AAAA;AAAA;AAAA,eAKMA,KAAY,CAAC;AAAA;AAAA,GAG3B,GAEKC,IAAsBL,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAK,QACvC;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKWA,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC,GAEKC,IAAwBP,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -1,83 +1,76 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
|
6
|
-
const G = w(E)`
|
7
|
-
min-height: calc(
|
8
|
-
100vh - 168px - 56px + 64px
|
9
|
-
); // 168 chapter banner, 56 header height , 64 bottom padding
|
10
|
-
|
11
|
-
&:last-child {
|
12
|
-
padding-bottom: 64px;
|
13
|
-
}
|
14
|
-
`, O = I((_) => {
|
1
|
+
import { jsxs as I, jsx as s } from "react/jsx-runtime";
|
2
|
+
import { memo as w, useMemo as x } from "react";
|
3
|
+
import h from "./block-section-view.js";
|
4
|
+
import { ChapterDetailsWrapper as L } from "./block-sections-styled.js";
|
5
|
+
const E = w((g) => {
|
15
6
|
const {
|
16
|
-
blocks:
|
17
|
-
imageHue:
|
18
|
-
userType:
|
19
|
-
coreBlocksRef:
|
20
|
-
onNodeAttempt:
|
7
|
+
blocks: t,
|
8
|
+
imageHue: n,
|
9
|
+
userType: l,
|
10
|
+
coreBlocksRef: _,
|
11
|
+
onNodeAttempt: i,
|
21
12
|
onNodeAttemptLocationChange: r,
|
22
|
-
onNodeMarkAsDone:
|
23
|
-
onNodeReattempt:
|
24
|
-
onNodeReview:
|
25
|
-
onNodeView:
|
26
|
-
onBlockSkipUnskip:
|
27
|
-
} =
|
28
|
-
let
|
29
|
-
const
|
30
|
-
(
|
31
|
-
|
32
|
-
|
13
|
+
onNodeMarkAsDone: c,
|
14
|
+
onNodeReattempt: p,
|
15
|
+
onNodeReview: d,
|
16
|
+
onNodeView: k,
|
17
|
+
onBlockSkipUnskip: m
|
18
|
+
} = g;
|
19
|
+
let a = 0;
|
20
|
+
const { goalBlocks: u, nonGoalBlocks: B } = x(
|
21
|
+
() => t.reduce(
|
22
|
+
(o, e) => (e.section_code === "GOALS" || e.section_code === "READINESS" ? o.goalBlocks.push(e) : o.nonGoalBlocks.push(e), o),
|
23
|
+
{ goalBlocks: [], nonGoalBlocks: [] }
|
24
|
+
),
|
25
|
+
[t]
|
33
26
|
);
|
34
|
-
return /* @__PURE__ */
|
35
|
-
|
27
|
+
return /* @__PURE__ */ I(
|
28
|
+
L,
|
36
29
|
{
|
37
30
|
$width: "100%",
|
38
|
-
$background:
|
31
|
+
$background: B.length ? "WHITE_1" : `${n}_1`,
|
39
32
|
children: [
|
40
|
-
/* @__PURE__ */
|
41
|
-
const { block_type:
|
42
|
-
let
|
43
|
-
const
|
44
|
-
return
|
45
|
-
|
33
|
+
/* @__PURE__ */ s("div", { ref: _, children: u.map((o, e) => {
|
34
|
+
const { block_type: N, block_id: S, is_skipped: A } = o;
|
35
|
+
let f = 0;
|
36
|
+
const G = e === u.length - 1;
|
37
|
+
return N === "GOAL" && (A || (a += 1), f = a), /* @__PURE__ */ s(
|
38
|
+
h,
|
46
39
|
{
|
47
40
|
blockData: o,
|
48
|
-
userType:
|
49
|
-
isLastBlock:
|
50
|
-
lessonIdx:
|
51
|
-
imageHue:
|
41
|
+
userType: l,
|
42
|
+
isLastBlock: G,
|
43
|
+
lessonIdx: f,
|
44
|
+
imageHue: n,
|
52
45
|
isGoalBlock: !0,
|
53
|
-
onNodeAttempt:
|
46
|
+
onNodeAttempt: i,
|
54
47
|
onNodeAttemptLocationChange: r,
|
55
|
-
onNodeMarkAsDone:
|
56
|
-
onNodeReattempt:
|
57
|
-
onNodeReview:
|
58
|
-
onNodeView:
|
59
|
-
onBlockSkipUnskip:
|
48
|
+
onNodeMarkAsDone: c,
|
49
|
+
onNodeReattempt: p,
|
50
|
+
onNodeReview: d,
|
51
|
+
onNodeView: k,
|
52
|
+
onBlockSkipUnskip: m
|
60
53
|
},
|
61
|
-
|
54
|
+
S
|
62
55
|
);
|
63
56
|
}) }),
|
64
|
-
|
65
|
-
const { block_id:
|
66
|
-
return /* @__PURE__ */
|
67
|
-
|
57
|
+
B.map((o) => {
|
58
|
+
const { block_id: e } = o;
|
59
|
+
return /* @__PURE__ */ s(
|
60
|
+
h,
|
68
61
|
{
|
69
62
|
blockData: o,
|
70
|
-
userType:
|
71
|
-
imageHue:
|
72
|
-
onNodeAttempt:
|
63
|
+
userType: l,
|
64
|
+
imageHue: n,
|
65
|
+
onNodeAttempt: i,
|
73
66
|
onNodeAttemptLocationChange: r,
|
74
|
-
onNodeMarkAsDone:
|
75
|
-
onNodeReattempt:
|
76
|
-
onNodeReview:
|
77
|
-
onNodeView:
|
78
|
-
onBlockSkipUnskip:
|
67
|
+
onNodeMarkAsDone: c,
|
68
|
+
onNodeReattempt: p,
|
69
|
+
onNodeReview: d,
|
70
|
+
onNodeView: k,
|
71
|
+
onBlockSkipUnskip: m
|
79
72
|
},
|
80
|
-
|
73
|
+
e
|
81
74
|
);
|
82
75
|
})
|
83
76
|
]
|
@@ -85,6 +78,6 @@ const G = w(E)`
|
|
85
78
|
);
|
86
79
|
});
|
87
80
|
export {
|
88
|
-
|
81
|
+
E as default
|
89
82
|
};
|
90
83
|
//# sourceMappingURL=block-sections.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"block-sections.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections.tsx"],"sourcesContent":["import type { IBlockSectionsProps } from './block-sections-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\
|
1
|
+
{"version":3,"file":"block-sections.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections.tsx"],"sourcesContent":["import type { IBlockSectionsProps } from './block-sections-types';\nimport type { FC } from 'react';\n\nimport { memo, useMemo } from 'react';\n\nimport BlockSectionView from './block-section-view';\nimport * as Styled from './block-sections-styled';\n\nconst BlockSections: FC<IBlockSectionsProps> = memo(props => {\n const {\n blocks,\n imageHue,\n userType,\n coreBlocksRef,\n onNodeAttempt,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onBlockSkipUnskip,\n } = props;\n\n let lessonCount = 0;\n\n const { goalBlocks, nonGoalBlocks } = useMemo(\n () =>\n blocks.reduce(\n (acc, block) => {\n if (block.section_code === 'GOALS' || block.section_code === 'READINESS') {\n acc.goalBlocks.push(block);\n } else {\n acc.nonGoalBlocks.push(block);\n }\n\n return acc;\n },\n { goalBlocks: [] as typeof blocks, nonGoalBlocks: [] as typeof blocks },\n ),\n [blocks],\n );\n\n return (\n <Styled.ChapterDetailsWrapper\n $width=\"100%\"\n $background={!nonGoalBlocks.length ? `${imageHue}_1` : 'WHITE_1'}\n >\n <div ref={coreBlocksRef}>\n {goalBlocks.map((blockData, idx) => {\n const { block_type: blockType, block_id: blockId, is_skipped: isSkipped } = blockData;\n let lessonIdx = 0;\n\n const isLastBlock = idx === goalBlocks.length - 1;\n\n if (blockType === 'GOAL') {\n if (!isSkipped) {\n lessonCount += 1;\n }\n\n lessonIdx = lessonCount;\n }\n\n return (\n <BlockSectionView\n blockData={blockData}\n userType={userType}\n isLastBlock={isLastBlock}\n key={blockId}\n lessonIdx={lessonIdx}\n imageHue={imageHue}\n isGoalBlock\n onNodeAttempt={onNodeAttempt}\n onNodeAttemptLocationChange={onNodeAttemptLocationChange}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n onBlockSkipUnskip={onBlockSkipUnskip}\n />\n );\n })}\n </div>\n\n {nonGoalBlocks.map(blockData => {\n const { block_id: blockId } = blockData;\n\n return (\n <BlockSectionView\n key={blockId}\n blockData={blockData}\n userType={userType}\n imageHue={imageHue}\n onNodeAttempt={onNodeAttempt}\n onNodeAttemptLocationChange={onNodeAttemptLocationChange}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n onBlockSkipUnskip={onBlockSkipUnskip}\n />\n );\n })}\n </Styled.ChapterDetailsWrapper>\n );\n});\n\nexport default BlockSections;\n"],"names":["BlockSections","memo","props","blocks","imageHue","userType","coreBlocksRef","onNodeAttempt","onNodeAttemptLocationChange","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onBlockSkipUnskip","lessonCount","goalBlocks","nonGoalBlocks","useMemo","acc","block","jsxs","Styled.ChapterDetailsWrapper","jsx","blockData","idx","blockType","blockId","isSkipped","lessonIdx","isLastBlock","BlockSectionView"],"mappings":";;;;AAQM,MAAAA,IAAyCC,EAAK,CAASC,MAAA;AACrD,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,mBAAAC;AAAA,EACE,IAAAX;AAEJ,MAAIY,IAAc;AAEZ,QAAA,EAAE,YAAAC,GAAY,eAAAC,EAAA,IAAkBC;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ACA,kBAAAC;AAAA,cACA,iBAAAC;AAAA,cACA,cAAAC;AAAA,cACA,YAAAC;AAAA,cACA,mBAAAC;AAAA,YAAA;AAAA,YAVKa;AAAA,UAAA;AAAA,QAWP,CAEH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
@@ -1,16 +1,16 @@
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
2
|
-
import { memo as
|
3
|
-
import { getNodeStateBasedTagInfo as
|
2
|
+
import { memo as p } from "react";
|
3
|
+
import { getNodeStateBasedTagInfo as S } from "../../utils/node-card-utils.js";
|
4
4
|
import { SheetTagWrapper as T } from "./node-card-styled.js";
|
5
|
-
const
|
6
|
-
const { state: e, accuracy:
|
5
|
+
const h = p((o) => {
|
6
|
+
const { state: e, accuracy: t, nodeType: a, dueDateTs: c, isStudent: r } = o, d = ["DYNAMIC", "ASSESSMENT", "CHAPTER_ASSESSMENT"].includes(a) ? t : void 0, {
|
7
7
|
icon: n,
|
8
8
|
top: s,
|
9
|
-
right:
|
10
|
-
} =
|
11
|
-
return /* @__PURE__ */ m(T, { $top: s, $right:
|
9
|
+
right: i
|
10
|
+
} = S(e, !!r, d, c);
|
11
|
+
return /* @__PURE__ */ m(T, { $top: s, $right: i, children: n });
|
12
12
|
});
|
13
13
|
export {
|
14
|
-
|
14
|
+
h as default
|
15
15
|
};
|
16
16
|
//# 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, dueDateTs, isStudent } = props;\n
|
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, dueDateTs, isStudent } = props;\n const dynamicNodeTypes = ['DYNAMIC', 'ASSESSMENT', 'CHAPTER_ASSESSMENT'];\n const isDynamicNode = dynamicNodeTypes.includes(nodeType);\n const accuracyValue = isDynamicNode ? accuracy : undefined;\n\n const {\n icon: NodeTagIcon,\n top,\n right,\n } = getNodeStateBasedTagInfo(state, !!isStudent, accuracyValue, dueDateTs);\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","dueDateTs","isStudent","accuracyValue","NodeTagIcon","top","right","getNodeStateBasedTagInfo","jsx","Styled.SheetTagWrapper"],"mappings":";;;;AAQM,MAAAA,IAAuCC,EAAK,CAASC,MAAA;AACzD,QAAM,EAAE,OAAAC,GAAO,UAAAC,GAAU,UAAAC,GAAU,WAAAC,GAAW,WAAAC,EAAc,IAAAL,GAGtDM,IAFmB,CAAC,WAAW,cAAc,oBAAoB,EAChC,SAASH,CAAQ,IAClBD,IAAW,QAE3C;AAAA,IACJ,MAAMK;AAAA,IACN,KAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,IACEC,EAAyBT,GAAO,CAAC,CAACI,GAAWC,GAAeF,CAAS;AAGvE,SAAA,gBAAAO,EAACC,GAAA,EAAuB,MAAMJ,GAAK,QAAQC,GACxC,UACHF,EAAA,CAAA;AAEJ,CAAC;"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
2
|
+
import { memo as p, useCallback as a } from "react";
|
3
|
+
import s from "../../../../ui/text/text.js";
|
4
|
+
import { NodeOptionWrapper as m } from "./node-menu-options-styled.js";
|
5
|
+
const $ = ({ option: n }) => {
|
6
|
+
const { icon: r, label: l, id: e, disabled: o, onClick: i } = n, c = a(() => {
|
7
|
+
o || i(e);
|
8
|
+
}, [o, e, i]);
|
9
|
+
return /* @__PURE__ */ d(
|
10
|
+
m,
|
11
|
+
{
|
12
|
+
$flexDirection: "row",
|
13
|
+
$alignItems: "center",
|
14
|
+
$flexGap: 8,
|
15
|
+
$gapX: 0.5,
|
16
|
+
$gutterX: 1,
|
17
|
+
$opacity: o ? 0.5 : 1,
|
18
|
+
$disabled: o,
|
19
|
+
onClick: c,
|
20
|
+
children: [
|
21
|
+
/* @__PURE__ */ t(r, { width: 20, height: 20 }),
|
22
|
+
/* @__PURE__ */ t(s, { $renderAs: "ub3", $color: "WHITE", children: l })
|
23
|
+
]
|
24
|
+
},
|
25
|
+
e
|
26
|
+
);
|
27
|
+
}, b = p($);
|
28
|
+
export {
|
29
|
+
b as default
|
30
|
+
};
|
31
|
+
//# sourceMappingURL=node-menu-option.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"node-menu-option.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.tsx"],"sourcesContent":["import type { INodeMenuOption } from './node-menu-options-types';\n\nimport { memo, useCallback } from 'react';\n\nimport Text from '../../../../ui/text/text';\nimport * as Styled from './node-menu-options-styled';\n\nconst NodeMenuOption = ({ option }: { option: INodeMenuOption }) => {\n const { icon: OptionIcon, label, id, disabled, onClick } = option;\n\n const handleNodeOptionClick = useCallback(() => {\n if (!disabled) {\n onClick(id);\n }\n }, [disabled, id, onClick]);\n\n return (\n <Styled.NodeOptionWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGap={8}\n $gapX={0.5}\n $gutterX={1}\n $opacity={disabled ? 0.5 : 1}\n $disabled={disabled}\n key={id}\n onClick={handleNodeOptionClick}\n >\n <OptionIcon width={20} height={20} />\n\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n {label}\n </Text>\n </Styled.NodeOptionWrapper>\n );\n};\n\nexport default memo(NodeMenuOption);\n"],"names":["NodeMenuOption","option","OptionIcon","label","id","disabled","onClick","handleNodeOptionClick","useCallback","jsxs","Styled.NodeOptionWrapper","jsx","Text","NodeMenuOption$1","memo"],"mappings":";;;;AAOA,MAAMA,IAAiB,CAAC,EAAE,QAAAC,QAA0C;AAClE,QAAM,EAAE,MAAMC,GAAY,OAAAC,GAAO,IAAAC,GAAI,UAAAC,GAAU,SAAAC,EAAY,IAAAL,GAErDM,IAAwBC,EAAY,MAAM;AAC9C,IAAKH,KACHC,EAAQF,CAAE;AAAA,EAEX,GAAA,CAACC,GAAUD,GAAIE,CAAO,CAAC;AAGxB,SAAA,gBAAAG;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,aAAY;AAAA,MACZ,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,UAAUL,IAAW,MAAM;AAAA,MAC3B,WAAWA;AAAA,MAEX,SAASE;AAAA,MAET,UAAA;AAAA,QAAA,gBAAAI,EAACT,GAAW,EAAA,OAAO,IAAI,QAAQ,IAAI;AAAA,0BAElCU,GAAK,EAAA,WAAU,OAAM,QAAO,SAC1B,UACHT,GAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAPKC;AAAA,EAAA;AAUX,GAEeS,IAAAC,EAAKd,CAAc;"}
|
@@ -1,31 +1,9 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import { NodeOptions as m
|
5
|
-
const
|
6
|
-
const { icon: n, label: l, id: i, disabled: r, onClick: d } = t;
|
7
|
-
return /* @__PURE__ */ p(
|
8
|
-
$,
|
9
|
-
{
|
10
|
-
$flexDirection: "row",
|
11
|
-
$alignItems: "center",
|
12
|
-
$flexGap: 8,
|
13
|
-
$gapX: 0.5,
|
14
|
-
$gutterX: 1,
|
15
|
-
$opacity: r ? 0.5 : 1,
|
16
|
-
$disabled: r,
|
17
|
-
onClick: () => {
|
18
|
-
r || d(i);
|
19
|
-
},
|
20
|
-
children: [
|
21
|
-
/* @__PURE__ */ e(n, { width: 20, height: 20 }),
|
22
|
-
/* @__PURE__ */ e(a, { $renderAs: "ub3", $color: "WHITE", children: l })
|
23
|
-
]
|
24
|
-
},
|
25
|
-
i
|
26
|
-
);
|
27
|
-
}) }));
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
2
|
+
import { memo as t } from "react";
|
3
|
+
import n from "./node-menu-option.js";
|
4
|
+
import { NodeOptions as m } from "./node-menu-options-styled.js";
|
5
|
+
const f = t(({ options: o }) => o.length === 0 ? null : /* @__PURE__ */ r(m, { $background: "BLACK_2", $borderColor: "WHITE_T_38", $gapX: 0.5, children: o.map((e) => /* @__PURE__ */ r(n, { option: e })) }));
|
28
6
|
export {
|
29
|
-
|
7
|
+
f as default
|
30
8
|
};
|
31
9
|
//# sourceMappingURL=node-menu-options.js.map
|
package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"node-menu-options.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.tsx"],"sourcesContent":["import type { INodeMenuOptions } from './node-menu-options-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport
|
1
|
+
{"version":3,"file":"node-menu-options.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.tsx"],"sourcesContent":["import type { INodeMenuOptions } from './node-menu-options-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport NodeMenuOption from './node-menu-option';\nimport * as Styled from './node-menu-options-styled';\n\nconst NodeMenuOptions: FC<INodeMenuOptions> = memo(({ options }) => {\n if (options.length === 0) return null;\n\n return (\n <Styled.NodeOptions $background=\"BLACK_2\" $borderColor=\"WHITE_T_38\" $gapX={0.5}>\n {options.map(optionInfo => (\n <NodeMenuOption option={optionInfo} />\n ))}\n </Styled.NodeOptions>\n );\n});\n\nexport default NodeMenuOptions;\n"],"names":["NodeMenuOptions","memo","options","Styled.NodeOptions","optionInfo","jsx","NodeMenuOption"],"mappings":";;;;AAQA,MAAMA,IAAwCC,EAAK,CAAC,EAAE,SAAAC,QAChDA,EAAQ,WAAW,IAAU,yBAG9BC,GAAA,EAAmB,aAAY,WAAU,cAAa,cAAa,OAAO,KACxE,UAAAD,EAAQ,IAAI,CACXE,MAAA,gBAAAC,EAACC,KAAe,QAAQF,EAAA,CAAY,CACrC,EACH,CAAA,CAEH;"}
|