@cuemath/leap 2.9.9-as1 → 2.9.9-as3
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 +102 -93
- 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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"milestone-info.js","sources":["../../../../../../src/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.tsx"],"sourcesContent":["import type { IMileStoneInfoWrapperProps } from './milestone-widget-types';\n\nimport React, { memo, useLayoutEffect, useMemo, useRef, useState } from 'react';\n\nimport Check2Icon from '../../../../../assets/line-icons/icons/check2';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport GoalActionCtas from './goals/goal-action-ctas';\nimport { GOAL_CATEGORY_BASED_IMAGES } from './milestone-constants';\nimport {\n getGoalCategoryBasedColorTheme,\n getMilestoneWidgetStatusInfo,\n getRemainingDaysToCompleteGoal,\n} from './milestone-utils';\nimport * as Styled from './milestone-widget-styled';\nimport OutcomeWrapper from './outcome/outcome';\n\nconst MilestoneInfoWrapper: React.FC<IMileStoneInfoWrapperProps> = memo(\n ({ isClassOngoing, isStudentPresent, isExpanded, ...restMilestoneInfoWrapperProps }) => {\n const {\n milestone,\n studentId,\n studentName,\n teacherName,\n parentName,\n userType,\n courseStream,\n outcomes,\n onEdit,\n onDraftPublish,\n onAddOutcome,\n } = restMilestoneInfoWrapperProps;\n\n const {\n milestone_name: milestoneName,\n milestone_date_ts: dueDate,\n milestone_state: milestoneState,\n goal_category: goalCategory,\n goal_code: goalCode,\n progress_stat: progressStat,\n } = milestone;\n\n const { completed = 0, total = 0 } = progressStat || {};\n const isOutcomePending = milestoneState === 'OUTCOME_PENDING';\n const progressCompletionPercentage =\n completed > 0 ? Math.floor((completed / total || 1) * 100) : 0;\n\n const titleTextRef = useRef<HTMLDivElement>(null);\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n\n const { textColor: goalCategoryTextColor, borderColor } =\n getGoalCategoryBasedColorTheme(goalCategory);\n\n const outcomeStatusInfo = getMilestoneWidgetStatusInfo(milestoneState);\n const backgroundColor =\n (isOutcomePending ? outcomeStatusInfo?.progressBackgroundColor : borderColor) || 'WHITE_5';\n\n const isGoalCreation = useMemo(() => typeof goalCode === 'string', [goalCode]);\n const remainingDays = getRemainingDaysToCompleteGoal(dueDate);\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, [titleTextRef]);\n\n if (!goalCategory) return null;\n\n return (\n <FlexView\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n $flexGapX={1}\n >\n <FlexView $flexDirection=\"row\" $flexGapX={1.5}>\n <FlexView\n $widthX={4}\n $heightX={4}\n $background=\"WHITE_T_38\"\n $position=\"relative\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $borderRadiusX={2}\n >\n <Styled.ChapterProgressSVG width=\"64px\" height=\"64px\">\n <Styled.ChapterProgressSVGCircle $progress={0} r=\"31\" cx=\"32\" cy=\"32\" />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progressBackground=\"BLACK_1\"\n $progress={progressCompletionPercentage * 2}\n r=\"31\"\n cx=\"32\"\n cy=\"32\"\n />\n </Styled.ChapterProgressSVG>\n\n <FlexView $widthX={4} $heightX={4} $justifyContent=\"center\" $alignItems=\"center\">\n <Image\n src={GOAL_CATEGORY_BASED_IMAGES[goalCategory]}\n withLoader\n width={40}\n height={40}\n />\n </FlexView>\n\n {progressCompletionPercentage === 100 && (\n <Styled.StyledCheckIconWrapper>\n <Check2Icon width={20} height={20} />\n </Styled.StyledCheckIconWrapper>\n )}\n </FlexView>\n\n <FlexView $flexGap={16}>\n <FlexView $flexGap={4}>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGap={4}>\n <Text $renderAs=\"ac4-black\" $color={goalCategoryTextColor}>\n {goalCategory.split('_').join(' ')}\n </Text>\n\n {isOutcomePending && (\n <FlexView\n $flexDirection=\"row\"\n $gap={4}\n $gutter={4}\n $alignItems=\"center\"\n $background={backgroundColor}\n >\n <Text $renderAs=\"ac4\" $color=\"WHITE\">\n Outcome pending\n </Text>\n </FlexView>\n )}\n\n {milestoneState === 'DRAFT' && (\n <FlexView\n $flexDirection=\"row\"\n $gap={4}\n $gutter={4}\n $alignItems=\"center\"\n $background={borderColor}\n >\n <Text $renderAs=\"ac4\">Draft</Text>\n </FlexView>\n )}\n </FlexView>\n\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={milestoneName}\n hidden={!showTitleTooltip}\n >\n <Styled.MilestoneTitle\n ref={titleTextRef}\n $renderAs={!isGoalCreation ? 'ab1' : 'ah4'}\n $color=\"BLACK_1\"\n >\n {milestoneName}\n </Styled.MilestoneTitle>\n </ArrowTooltip>\n\n {milestoneState !== 'DRAFT' && (\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {!!total && `${progressCompletionPercentage}% complete`}\n {!!total && milestoneState === 'ACTIVE' && remainingDays}\n </Text>\n )}\n </FlexView>\n\n {outcomes?.length ? (\n <>\n <Separator width={40} height={1} background=\"BLACK_T_15\" />\n <OutcomeWrapper outcomes={outcomes} />\n </>\n ) : undefined}\n </FlexView>\n </FlexView>\n\n {userType === 'TEACHER' && (\n <GoalActionCtas\n milestone={milestone}\n studentId={studentId}\n studentName={studentName}\n teacherName={teacherName ?? ''}\n parentName={parentName ?? ''}\n onAddOutcome={onAddOutcome}\n isClassOngoing={Boolean(isClassOngoing)}\n isStudentPresent={Boolean(isStudentPresent)}\n onDraftPublish={onDraftPublish}\n onEdit={onEdit}\n courseStream={courseStream}\n />\n )}\n </FlexView>\n );\n },\n);\n\nexport default MilestoneInfoWrapper;\n"],"names":["MilestoneInfoWrapper","memo","isClassOngoing","isStudentPresent","isExpanded","restMilestoneInfoWrapperProps","milestone","studentId","studentName","teacherName","parentName","userType","courseStream","outcomes","onEdit","onDraftPublish","onAddOutcome","milestoneName","dueDate","milestoneState","goalCategory","goalCode","progressStat","completed","total","isOutcomePending","progressCompletionPercentage","titleTextRef","useRef","showTitleTooltip","setShowTitleTooltip","useState","goalCategoryTextColor","borderColor","getGoalCategoryBasedColorTheme","outcomeStatusInfo","getMilestoneWidgetStatusInfo","backgroundColor","isGoalCreation","useMemo","remainingDays","getRemainingDaysToCompleteGoal","useLayoutEffect","jsxs","FlexView","Styled.ChapterProgressSVG","jsx","Styled.ChapterProgressSVGCircle","Image","GOAL_CATEGORY_BASED_IMAGES","Styled.StyledCheckIconWrapper","Check2Icon","Text","ArrowTooltip","Styled.MilestoneTitle","Fragment","Separator","OutcomeWrapper","GoalActionCtas"],"mappings":";;;;;;;;;;;;;AAoBA,MAAMA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;AAAA,cAAA,GAEJ;AAAA,cAEC3B,KAAA,QAAAA,EAAU,SAEP,gBAAA8B,EAAAY,GAAA,EAAA,UAAA;AAAA,gBAAA,gBAAAT,EAACU,KAAU,OAAO,IAAI,QAAQ,GAAG,YAAW,cAAa;AAAA,gBACzD,gBAAAV,EAACW,MAAe,UAAA5C,GAAoB;AAAA,cAAA,EACtC,CAAA,IACE;AAAA,YAAA,GACN;AAAA,UAAA,GACF;AAAA,UAECF,MAAa,aACZ,gBAAAmC;AAAA,YAACY;AAAA,YAAA;AAAA,cACC,WAAApD;AAAA,cACA,WAAAC;AAAA,cACA,aAAAC;AAAA,cACA,aAAaC,KAAe;AAAA,cAC5B,YAAYC,KAAc;AAAA,cAC1B,cAAAM;AAAA,cACA,gBAAgB,EAAQd;AAAA,cACxB,kBAAkB,EAAQC;AAAA,cAC1B,gBAAAY;AAAA,cACA,QAAAD;AAAA,cACA,cAAAF;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,IA9HoB;AAAA,EAkI5B;AACF;"}
|
1
|
+
{"version":3,"file":"milestone-info.js","sources":["../../../../../../src/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.tsx"],"sourcesContent":["import type { IMileStoneInfoWrapperProps } from './milestone-widget-types';\n\nimport React, { memo, useLayoutEffect, useMemo, useRef, useState } from 'react';\n\nimport Check2Icon from '../../../../../assets/line-icons/icons/check2';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport GoalActionCtas from './goals/goal-action-ctas';\nimport { GOAL_CATEGORY_BASED_IMAGES } from './milestone-constants';\nimport {\n getGoalCategoryBasedColorTheme,\n getMilestoneWidgetStatusInfo,\n getRemainingDaysToCompleteGoal,\n} from './milestone-utils';\nimport * as Styled from './milestone-widget-styled';\nimport OutcomeWrapper from './outcome/outcome';\n\nconst MilestoneInfoWrapper: React.FC<IMileStoneInfoWrapperProps> = memo(\n ({ isClassOngoing, isStudentPresent, isExpanded, ...restMilestoneInfoWrapperProps }) => {\n const {\n milestone,\n studentId,\n studentName,\n teacherName,\n parentName,\n userType,\n courseStream,\n outcomes,\n onEdit,\n onDraftPublish,\n onAddOutcome,\n } = restMilestoneInfoWrapperProps;\n\n const {\n milestone_name: milestoneName,\n milestone_date_ts: dueDate,\n milestone_state: milestoneState,\n goal_category: goalCategory,\n goal_code: goalCode,\n progress_stat: progressStat,\n } = milestone;\n\n const { completed = 0, total = 0 } = progressStat || {};\n const isOutcomePending = milestoneState === 'OUTCOME_PENDING';\n const progressCompletionPercentage =\n completed > 0 ? Math.floor((completed / total || 1) * 100) : 0;\n\n const titleTextRef = useRef<HTMLDivElement>(null);\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n\n const { textColor: goalCategoryTextColor, borderColor } =\n getGoalCategoryBasedColorTheme(goalCategory);\n\n const outcomeStatusInfo = getMilestoneWidgetStatusInfo(milestoneState);\n const backgroundColor =\n (isOutcomePending ? outcomeStatusInfo?.progressBackgroundColor : borderColor) || 'WHITE_5';\n\n const isGoalCreation = useMemo(() => typeof goalCode === 'string', [goalCode]);\n const remainingDays = getRemainingDaysToCompleteGoal(dueDate);\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, [titleTextRef]);\n\n if (!goalCategory) return null;\n\n return (\n <FlexView\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n $flexGapX={1}\n >\n <FlexView $flexDirection=\"row\" $flexGapX={1.5}>\n <FlexView\n $widthX={4}\n $heightX={4}\n $background=\"WHITE_T_38\"\n $position=\"relative\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $borderRadiusX={2}\n >\n <Styled.ChapterProgressSVG width=\"64px\" height=\"64px\">\n <Styled.ChapterProgressSVGCircle $progress={0} r=\"31\" cx=\"32\" cy=\"32\" />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progressBackground=\"BLACK_1\"\n $progress={progressCompletionPercentage * 2}\n r=\"31\"\n cx=\"32\"\n cy=\"32\"\n />\n </Styled.ChapterProgressSVG>\n\n <FlexView $widthX={4} $heightX={4} $justifyContent=\"center\" $alignItems=\"center\">\n <Image\n src={GOAL_CATEGORY_BASED_IMAGES[goalCategory]}\n withLoader\n width={40}\n height={40}\n />\n </FlexView>\n\n {progressCompletionPercentage === 100 && (\n <Styled.StyledCheckIconWrapper>\n <Check2Icon width={20} height={20} />\n </Styled.StyledCheckIconWrapper>\n )}\n </FlexView>\n\n <FlexView $flexGap={16}>\n <FlexView $flexGap={4}>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGap={4}>\n <Text $renderAs=\"ac4-black\" $color={goalCategoryTextColor}>\n {goalCategory.split('_').join(' ')}\n </Text>\n\n {isOutcomePending && (\n <FlexView\n $flexDirection=\"row\"\n $gap={4}\n $gutter={4}\n $alignItems=\"center\"\n $background={backgroundColor}\n >\n <Text $renderAs=\"ac4\" $color=\"WHITE\">\n Outcome pending\n </Text>\n </FlexView>\n )}\n\n {milestoneState === 'DRAFT' && (\n <FlexView\n $flexDirection=\"row\"\n $gap={4}\n $gutter={4}\n $alignItems=\"center\"\n $background={borderColor}\n >\n <Text $renderAs=\"ac4\">Draft</Text>\n </FlexView>\n )}\n </FlexView>\n\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={milestoneName}\n hidden={!showTitleTooltip}\n >\n <Styled.MilestoneTitle\n ref={titleTextRef}\n $renderAs={!isGoalCreation ? 'ab1' : 'ah4'}\n $color=\"BLACK_1\"\n >\n {milestoneName}\n </Styled.MilestoneTitle>\n </ArrowTooltip>\n\n {!!total && milestoneState !== 'DRAFT' && (\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {`${progressCompletionPercentage}% complete`}\n {milestoneState === 'ACTIVE' && remainingDays}\n </Text>\n )}\n </FlexView>\n\n {!!outcomes?.length && (\n <>\n <Separator width={40} height={1} background=\"BLACK_T_15\" />\n <OutcomeWrapper outcomes={outcomes} />\n </>\n )}\n </FlexView>\n </FlexView>\n\n {userType === 'TEACHER' && (\n <GoalActionCtas\n milestone={milestone}\n studentId={studentId}\n studentName={studentName}\n teacherName={teacherName ?? ''}\n parentName={parentName ?? ''}\n onAddOutcome={onAddOutcome}\n isClassOngoing={Boolean(isClassOngoing)}\n isStudentPresent={Boolean(isStudentPresent)}\n onDraftPublish={onDraftPublish}\n onEdit={onEdit}\n courseStream={courseStream}\n />\n )}\n </FlexView>\n );\n },\n);\n\nexport default MilestoneInfoWrapper;\n"],"names":["MilestoneInfoWrapper","memo","isClassOngoing","isStudentPresent","isExpanded","restMilestoneInfoWrapperProps","milestone","studentId","studentName","teacherName","parentName","userType","courseStream","outcomes","onEdit","onDraftPublish","onAddOutcome","milestoneName","dueDate","milestoneState","goalCategory","goalCode","progressStat","completed","total","isOutcomePending","progressCompletionPercentage","titleTextRef","useRef","showTitleTooltip","setShowTitleTooltip","useState","goalCategoryTextColor","borderColor","getGoalCategoryBasedColorTheme","outcomeStatusInfo","getMilestoneWidgetStatusInfo","backgroundColor","isGoalCreation","useMemo","remainingDays","getRemainingDaysToCompleteGoal","useLayoutEffect","jsxs","FlexView","Styled.ChapterProgressSVG","jsx","Styled.ChapterProgressSVGCircle","Image","GOAL_CATEGORY_BASED_IMAGES","Styled.StyledCheckIconWrapper","Check2Icon","Text","ArrowTooltip","Styled.MilestoneTitle","Fragment","Separator","OutcomeWrapper","GoalActionCtas"],"mappings":";;;;;;;;;;;;;AAoBA,MAAMA,KAA6DC;AAAA,EACjE,CAAC,EAAE,gBAAAC,GAAgB,kBAAAC,GAAkB,YAAAC,IAAY,GAAGC,QAAoC;AAChF,UAAA;AAAA,MACJ,WAAAC;AAAA,MACA,WAAAC;AAAA,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AAa;AAAA,gBACzD,gBAAAV,EAACW,MAAe,UAAA5C,GAAoB;AAAA,cAAA,GACtC;AAAA,YAAA,GAEJ;AAAA,UAAA,GACF;AAAA,UAECF,MAAa,aACZ,gBAAAmC;AAAA,YAACY;AAAA,YAAA;AAAA,cACC,WAAApD;AAAA,cACA,WAAAC;AAAA,cACA,aAAAC;AAAA,cACA,aAAaC,KAAe;AAAA,cAC5B,YAAYC,KAAc;AAAA,cAC1B,cAAAM;AAAA,cACA,gBAAgB,EAAQd;AAAA,cACxB,kBAAkB,EAAQC;AAAA,cAC1B,gBAAAY;AAAA,cACA,QAAAD;AAAA,cACA,cAAAF;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,IA9HoB;AAAA,EAkI5B;AACF;"}
|
@@ -1,11 +1,7 @@
|
|
1
1
|
import t from "styled-components";
|
2
|
-
import
|
2
|
+
import n from "../../../../../../assets/line-icons/icons/info.js";
|
3
3
|
import e from "../../../../../ui/layout/flex-view.js";
|
4
4
|
import r from "../../../../../ui/text/text.js";
|
5
|
-
t.div`
|
6
|
-
height: 48px;
|
7
|
-
overflow: scroll;
|
8
|
-
`;
|
9
5
|
const m = t(e)`
|
10
6
|
transform: translateY(2px);
|
11
7
|
`, f = t(r)(() => `
|
@@ -29,7 +25,7 @@ t(e)(({ theme: o }) => {
|
|
29
25
|
grid-row-gap: ${i * 0.625}px;
|
30
26
|
`;
|
31
27
|
});
|
32
|
-
t(
|
28
|
+
t(n)(
|
33
29
|
() => `
|
34
30
|
position: relative;
|
35
31
|
cursor: pointer;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"outcome-styled.js","sources":["../../../../../../../src/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport InfoIcon from '../../../../../../assets/line-icons/icons/info';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Text from '../../../../../ui/text/text';\n\nconst
|
1
|
+
{"version":3,"file":"outcome-styled.js","sources":["../../../../../../../src/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport InfoIcon from '../../../../../../assets/line-icons/icons/info';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Text from '../../../../../ui/text/text';\n\nconst NumbersWrapper = styled(FlexView)`\n transform: translateY(2px);\n`;\n\nconst StyledText = 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 OutcomeLabelText = styled(Text)`\n transform: translateY(2px);\n`;\n\nconst OutcomeInfoWrapper = styled(FlexView)(({ theme }) => {\n const {\n layout: { gutter },\n } = theme;\n\n return `\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n justify-content: space-between;\n grid-row-gap: ${gutter * 0.625}px;\n `;\n});\n\nconst StyledInfoIcon = styled(InfoIcon)(\n () => `\n position: relative;\n cursor: pointer;\n `,\n);\n\nexport { StyledText, NumbersWrapper, OutcomeLabelText, OutcomeInfoWrapper, StyledInfoIcon };\n"],"names":["NumbersWrapper","styled","FlexView","StyledText","Text","theme","gutter","InfoIcon"],"mappings":";;;;AAMM,MAAAA,IAAiBC,EAAOC,CAAQ;AAAA;AAAA,GAIhCC,IAAaF,EAAOG,CAAI,EAAE,MACvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAOR;AAEwBH,EAAOG,CAAI;AAAA;AAAA;AAITH,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAG,QAAY;AACnD,QAAA;AAAA,IACJ,QAAQ,EAAE,QAAAC,EAAO;AAAA,EACf,IAAAD;AAEG,SAAA;AAAA;AAAA;AAAA;AAAA,oBAIWC,IAAS,KAAK;AAAA;AAElC,CAAC;AAEsBL,EAAOM,CAAQ;AAAA,EACpC,MAAM;AAAA;AAAA;AAAA;AAIR;"}
|
@@ -4,70 +4,71 @@ import { memo as x } from "react";
|
|
4
4
|
import A from "../../../../assets/line-icons/icons/plus2.js";
|
5
5
|
import N from "../../../homework/homework-card.js";
|
6
6
|
import w from "../../../ui/buttons/icon-button/icon-button.js";
|
7
|
-
import
|
8
|
-
import { MILESTONE_WIDGET_MIN_HEIGHT as
|
7
|
+
import g from "../../../ui/layout/flex-view.js";
|
8
|
+
import { MILESTONE_WIDGET_MIN_HEIGHT as O } from "../../constants.js";
|
9
9
|
import { TESTS_CREATION_ANALYTICS_EVENTS as j } from "../tests-creation/tests-creation-analytics-events.js";
|
10
|
-
import { TestSheetItemWrapper as
|
11
|
-
const
|
10
|
+
import { TestSheetItemWrapper as H, IconContainer as M, IconButtonCover as R } from "./test-list-view-styled.js";
|
11
|
+
const b = (e) => {
|
12
|
+
if (!(e != null && e.length)) return "";
|
12
13
|
const o = /* @__PURE__ */ new Set();
|
13
|
-
|
14
|
-
o.add(
|
15
|
-
|
16
|
-
},
|
14
|
+
for (const n of e)
|
15
|
+
o.add(n.chapter_name);
|
16
|
+
return [...o].join(", ");
|
17
|
+
}, P = x(
|
17
18
|
({
|
18
19
|
milestoneId: e,
|
19
20
|
studentId: o,
|
20
|
-
sheets:
|
21
|
+
sheets: n,
|
21
22
|
userType: i,
|
22
|
-
onCreateNewTest:
|
23
|
+
onCreateNewTest: a,
|
23
24
|
isMilestoneActive: c,
|
24
|
-
canUpdatedPlan:
|
25
|
-
...
|
25
|
+
canUpdatedPlan: l,
|
26
|
+
...d
|
26
27
|
}) => /* @__PURE__ */ C(
|
27
|
-
|
28
|
+
g,
|
28
29
|
{
|
29
|
-
$height:
|
30
|
+
$height: O,
|
30
31
|
$position: "relative",
|
31
32
|
$justifyContent: "space-between",
|
32
33
|
children: [
|
33
|
-
/* @__PURE__ */ t(
|
34
|
+
/* @__PURE__ */ t(H, { children: n.map((s, m) => {
|
34
35
|
const {
|
35
|
-
items:
|
36
|
-
node_id:
|
36
|
+
items: T,
|
37
|
+
node_id: p,
|
37
38
|
sheet_time: h,
|
38
|
-
total_questions:
|
39
|
+
total_questions: r,
|
39
40
|
worksheet_id: u,
|
40
|
-
is_timed:
|
41
|
-
} = s,
|
41
|
+
is_timed: f
|
42
|
+
} = s, _ = Math.ceil((h || 0) / 60), I = b(T), $ = f ? `${_} Mins` : "", E = `${r ? `${r} ${S.pluralize(r, "Question")}` : ""} • ${$}`;
|
42
43
|
return /* @__PURE__ */ t(
|
43
44
|
N,
|
44
45
|
{
|
45
46
|
userType: i,
|
46
47
|
header: I,
|
47
|
-
subHeader:
|
48
|
+
subHeader: E,
|
48
49
|
nodeData: s,
|
49
50
|
renderAs: "milestone",
|
50
51
|
studentId: o,
|
51
|
-
shouldOpenOnRight: (
|
52
|
-
...
|
52
|
+
shouldOpenOnRight: (m + 1) % 3 === 0,
|
53
|
+
...d
|
53
54
|
},
|
54
|
-
`${u}_${
|
55
|
+
`${u}_${p}_${m}`
|
55
56
|
);
|
56
57
|
}) }),
|
57
|
-
i === "TEACHER" &&
|
58
|
-
|
58
|
+
i === "TEACHER" && l && /* @__PURE__ */ t(
|
59
|
+
M,
|
59
60
|
{
|
60
61
|
$flexDirection: "row",
|
61
62
|
$justifyContent: "flex-end",
|
62
63
|
$gapX: 1,
|
63
64
|
$gutterX: 1,
|
64
|
-
children: /* @__PURE__ */ t(
|
65
|
+
children: /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(
|
65
66
|
w,
|
66
67
|
{
|
67
68
|
Icon: A,
|
68
69
|
renderAs: "secondary",
|
69
70
|
analyticsLabel: j.CUSTOM_TEST_CREATION_STARTED,
|
70
|
-
onClick:
|
71
|
+
onClick: a,
|
71
72
|
disabled: !c,
|
72
73
|
analyticsProps: {
|
73
74
|
milestone_id: e
|
@@ -81,6 +82,6 @@ const R = (e) => {
|
|
81
82
|
)
|
82
83
|
);
|
83
84
|
export {
|
84
|
-
|
85
|
+
P as default
|
85
86
|
};
|
86
87
|
//# sourceMappingURL=test-list-view.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"test-list-view.js","sources":["../../../../../src/features/milestone/milestone-tests/test-list-v2/test-list-view.tsx"],"sourcesContent":["import type { TNodeDataTestItemsDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\nimport type { ITestSheetsList } from './types';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport { memo } from 'react';\n\nimport Plus2Icon from '../../../../assets/line-icons/icons/plus2';\nimport HomeworkCard from '../../../homework/homework-card';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { MILESTONE_WIDGET_MIN_HEIGHT } from '../../constants';\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../tests-creation/tests-creation-analytics-events';\nimport * as Styled from './test-list-view-styled';\n\nconst getTopicNameFromItems = (items?: TNodeDataTestItemsDataProps[]) => {\n const
|
1
|
+
{"version":3,"file":"test-list-view.js","sources":["../../../../../src/features/milestone/milestone-tests/test-list-v2/test-list-view.tsx"],"sourcesContent":["import type { TNodeDataTestItemsDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\nimport type { ITestSheetsList } from './types';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport { memo } from 'react';\n\nimport Plus2Icon from '../../../../assets/line-icons/icons/plus2';\nimport HomeworkCard from '../../../homework/homework-card';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { MILESTONE_WIDGET_MIN_HEIGHT } from '../../constants';\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../tests-creation/tests-creation-analytics-events';\nimport * as Styled from './test-list-view-styled';\n\nconst getTopicNameFromItems = (items?: TNodeDataTestItemsDataProps[]): string => {\n if (!items?.length) return '';\n\n const uniqueTopics = new Set<string>();\n\n for (const item of items) {\n uniqueTopics.add(item.chapter_name);\n }\n\n return [...uniqueTopics].join(', ');\n};\n\nconst TestSheetsList: FC<ITestSheetsList> = memo(\n ({\n milestoneId,\n studentId,\n sheets,\n userType,\n onCreateNewTest,\n isMilestoneActive,\n canUpdatedPlan,\n ...sheetCallbacks\n }) => {\n return (\n <FlexView\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n $position=\"relative\"\n $justifyContent=\"space-between\"\n >\n <Styled.TestSheetItemWrapper>\n {sheets.map((sheet, idx) => {\n const {\n items,\n node_id: nodeId,\n sheet_time: sheetTime,\n total_questions: totalQuestions,\n worksheet_id: worksheetId,\n is_timed: isTimed,\n } = sheet;\n const totalSheetTime = Math.ceil((sheetTime || 0) / 60);\n const testChapterName = getTopicNameFromItems(items);\n const sheetTimeText = isTimed ? `${totalSheetTime} Mins` : '';\n const totalQuestionsText = totalQuestions\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}`\n : '';\n const subHeader = `${totalQuestionsText} • ${sheetTimeText}`;\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n userType={userType}\n header={testChapterName}\n subHeader={subHeader}\n nodeData={sheet}\n renderAs=\"milestone\"\n studentId={studentId}\n shouldOpenOnRight={(idx + 1) % 3 === 0}\n {...sheetCallbacks}\n />\n );\n })}\n </Styled.TestSheetItemWrapper>\n\n {userType === 'TEACHER' && canUpdatedPlan && (\n <Styled.IconContainer\n $flexDirection=\"row\"\n $justifyContent=\"flex-end\"\n $gapX={1}\n $gutterX={1}\n >\n <Styled.IconButtonCover>\n <IconButton\n Icon={Plus2Icon}\n renderAs=\"secondary\"\n analyticsLabel={TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_CREATION_STARTED}\n onClick={onCreateNewTest}\n disabled={!isMilestoneActive}\n analyticsProps={{\n milestone_id: milestoneId,\n }}\n />\n </Styled.IconButtonCover>\n </Styled.IconContainer>\n )}\n </FlexView>\n );\n },\n);\n\nexport default TestSheetsList;\n"],"names":["getTopicNameFromItems","items","uniqueTopics","item","TestSheetsList","memo","milestoneId","studentId","sheets","userType","onCreateNewTest","isMilestoneActive","canUpdatedPlan","sheetCallbacks","jsxs","FlexView","MILESTONE_WIDGET_MIN_HEIGHT","jsx","Styled.TestSheetItemWrapper","sheet","idx","nodeId","sheetTime","totalQuestions","worksheetId","isTimed","totalSheetTime","testChapterName","sheetTimeText","subHeader","pluralize","HomeworkCard","Styled.IconContainer","Styled.IconButtonCover","IconButton","Plus2Icon","TESTS_CREATION_ANALYTICS_EVENTS"],"mappings":";;;;;;;;;;AAeA,MAAMA,IAAwB,CAACC,MAAkD;AAC3E,MAAA,EAACA,KAAA,QAAAA,EAAO,QAAe,QAAA;AAErB,QAAAC,wBAAmB;AAEzB,aAAWC,KAAQF;AACJ,IAAAC,EAAA,IAAIC,EAAK,YAAY;AAGpC,SAAO,CAAC,GAAGD,CAAY,EAAE,KAAK,IAAI;AACpC,GAEME,IAAsCC;AAAA,EAC1C,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,MAGD,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAASC;AAAA,MACT,WAAU;AAAA,MACV,iBAAgB;AAAA,MAEhB,UAAA;AAAA,QAAA,gBAAAC,EAACC,GAAA,EACE,YAAO,IAAI,CAACC,GAAOC,MAAQ;AACpB,gBAAA;AAAA,YACJ,OAAAnB;AAAA,YACA,SAASoB;AAAA,YACT,YAAYC;AAAA,YACZ,iBAAiBC;AAAA,YACjB,cAAcC;AAAA,YACd,UAAUC;AAAA,UACR,IAAAN,GACEO,IAAiB,KAAK,MAAMJ,KAAa,KAAK,EAAE,GAChDK,IAAkB3B,EAAsBC,CAAK,GAC7C2B,IAAgBH,IAAU,GAAGC,CAAc,UAAU,IAIrDG,IAAY,GAHSN,IACvB,GAAGA,CAAc,IAAIO,EAAU,UAAAP,GAAgB,UAAU,CAAC,KAC1D,EACmC,MAAMK,CAAa;AAGxD,iBAAA,gBAAAX;AAAA,YAACc;AAAA,YAAA;AAAA,cAEC,UAAAtB;AAAA,cACA,QAAQkB;AAAA,cACR,WAAAE;AAAA,cACA,UAAUV;AAAA,cACV,UAAS;AAAA,cACT,WAAAZ;AAAA,cACA,oBAAoBa,IAAM,KAAK,MAAM;AAAA,cACpC,GAAGP;AAAA,YAAA;AAAA,YARC,GAAGW,CAAW,IAAIH,CAAM,IAAID,CAAG;AAAA,UAAA;AAAA,QAWzC,CAAA,GACH;AAAA,QAECX,MAAa,aAAaG,KACzB,gBAAAK;AAAA,UAACe;AAAAA,UAAA;AAAA,YACC,gBAAe;AAAA,YACf,iBAAgB;AAAA,YAChB,OAAO;AAAA,YACP,UAAU;AAAA,YAEV,UAAA,gBAAAf,EAACgB,GAAA,EACC,UAAA,gBAAAhB;AAAA,cAACiB;AAAA,cAAA;AAAA,gBACC,MAAMC;AAAA,gBACN,UAAS;AAAA,gBACT,gBAAgBC,EAAgC;AAAA,gBAChD,SAAS1B;AAAA,gBACT,UAAU,CAACC;AAAA,gBACX,gBAAgB;AAAA,kBACd,cAAcL;AAAA,gBAChB;AAAA,cAAA;AAAA,YAAA,GAEJ;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAKV;"}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import
|
3
|
-
import { memo as
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
2
|
+
import L from "lottie-web";
|
3
|
+
import { memo as w, forwardRef as b, useRef as a, useImperativeHandle as A, useEffect as E } from "react";
|
4
4
|
import I from "../layout/flex-view.js";
|
5
5
|
import { fetchLottie as $ } from "./helper.js";
|
6
|
-
const x = b((
|
6
|
+
const x = b((d, h) => {
|
7
7
|
const {
|
8
8
|
src: s,
|
9
9
|
width: v = "100%",
|
@@ -12,40 +12,46 @@ const x = b((p, h) => {
|
|
12
12
|
eventListener: r,
|
13
13
|
onRender: i,
|
14
14
|
animateOnIntersect: o
|
15
|
-
} =
|
15
|
+
} = d, n = a(null), t = a(null), c = a(null);
|
16
16
|
return A(
|
17
17
|
h,
|
18
18
|
() => ({
|
19
19
|
playSegments: (m, e) => {
|
20
20
|
t.current && t.current.playSegments(m, e);
|
21
|
+
},
|
22
|
+
play: () => {
|
23
|
+
t.current && t.current.play();
|
24
|
+
},
|
25
|
+
stop: () => {
|
26
|
+
t.current && t.current.stop();
|
21
27
|
}
|
22
28
|
}),
|
23
29
|
[]
|
24
30
|
), E(() => ((async () => {
|
25
31
|
try {
|
26
32
|
const e = await $(s);
|
27
|
-
n.current && (t.current =
|
33
|
+
n.current && (t.current = L.loadAnimation({
|
28
34
|
container: n.current,
|
29
35
|
animationData: e,
|
30
36
|
renderer: "svg",
|
31
37
|
loop: !0,
|
32
38
|
autoplay: !0,
|
33
39
|
...u
|
34
|
-
}), o && (
|
40
|
+
}), o && (c.current = new IntersectionObserver(
|
35
41
|
([l]) => {
|
36
|
-
var f,
|
37
|
-
l && l.isIntersecting ? (f = t.current) == null || f.play() : (
|
42
|
+
var f, p;
|
43
|
+
l && l.isIntersecting ? (f = t.current) == null || f.play() : (p = t.current) == null || p.pause();
|
38
44
|
},
|
39
45
|
{ threshold: 0 }
|
40
|
-
), n.current &&
|
46
|
+
), n.current && c.current.observe(n.current)), i == null || i(), r && t.current.addEventListener(r.name, r.callback));
|
41
47
|
} catch (e) {
|
42
48
|
throw Error(`Error loading Lottie animation: ${e}`);
|
43
49
|
}
|
44
50
|
})(), () => {
|
45
51
|
var e;
|
46
|
-
t.current && (r && t.current.removeEventListener(r.name, r.callback), o && ((e =
|
47
|
-
}), [s, r, i, o, u]), /* @__PURE__ */
|
48
|
-
}), F =
|
52
|
+
t.current && (r && t.current.removeEventListener(r.name, r.callback), o && ((e = c.current) == null || e.disconnect()), t.current.destroy());
|
53
|
+
}), [s, r, i, o, u]), /* @__PURE__ */ y(I, { ref: n, $width: v, $height: g });
|
54
|
+
}), F = w(x);
|
49
55
|
export {
|
50
56
|
F as default
|
51
57
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type { AnimationItem, AnimationSegment } from 'lottie-web';\n\nimport lottie from 'lottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport { fetchLottie } from './helper';\n\nconst LottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const {\n src,\n width = '100%',\n height = '100%',\n settings,\n eventListener,\n onRender,\n animateOnIntersect,\n } = props;\n\n const container = useRef<HTMLDivElement>(null);\n const animationInstance = useRef<AnimationItem | null>(null);\n const intersectionObserver = useRef<IntersectionObserver | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n playSegments: (segments: AnimationSegment, forceFlag?: boolean) => {\n if (animationInstance.current) {\n animationInstance.current.playSegments(segments, forceFlag);\n }\n },\n }),\n [],\n );\n\n useEffect(() => {\n const loadAnimation = async () => {\n try {\n const animationData = await fetchLottie(src);\n\n if (container.current) {\n animationInstance.current = lottie.loadAnimation({\n container: container.current,\n animationData,\n renderer: 'svg',\n loop: true,\n autoplay: true,\n ...settings,\n });\n\n if (animateOnIntersect) {\n intersectionObserver.current = new IntersectionObserver(\n ([entry]) => {\n if (entry && entry.isIntersecting) {\n animationInstance.current?.play();\n } else {\n animationInstance.current?.pause();\n }\n },\n { threshold: 0 },\n );\n\n if (container.current) {\n intersectionObserver.current.observe(container.current);\n }\n }\n\n onRender?.();\n if (eventListener) {\n animationInstance.current.addEventListener(eventListener.name, eventListener.callback);\n }\n }\n } catch (error) {\n throw Error(`Error loading Lottie animation: ${error}`);\n }\n };\n\n loadAnimation();\n\n return () => {\n if (animationInstance.current) {\n if (eventListener) {\n animationInstance.current.removeEventListener(eventListener.name, eventListener.callback);\n }\n\n if (animateOnIntersect) {\n intersectionObserver.current?.disconnect();\n }\n animationInstance.current.destroy();\n }\n };\n }, [src, eventListener, onRender, animateOnIntersect, settings]);\n\n return <FlexView ref={container} $width={width} $height={height} />;\n});\n\nexport default memo(LottieAnimation);\n"],"names":["LottieAnimation","forwardRef","props","ref","src","width","height","settings","eventListener","onRender","animateOnIntersect","container","useRef","animationInstance","intersectionObserver","useImperativeHandle","segments","forceFlag","useEffect","animationData","fetchLottie","lottie","entry","_a","_b","error","FlexView","LottieAnimation$1","memo"],"mappings":";;;;;AASA,MAAMA,IAAkBC,EAAuD,CAACC,GAAOC,MAAQ;AACvF,QAAA;AAAA,IACJ,KAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,QAAAC,IAAS;AAAA,IACT,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,oBAAAC;AAAA,EACE,IAAAR,GAEES,IAAYC,EAAuB,IAAI,GACvCC,IAAoBD,EAA6B,IAAI,GACrDE,IAAuBF,EAAoC,IAAI;AAErE,SAAAG;AAAA,IACEZ;AAAA,IACA,OAAO;AAAA,MACL,cAAc,CAACa,GAA4BC,MAAwB;AACjE,QAAIJ,EAAkB,WACFA,EAAA,QAAQ,aAAaG,GAAUC,CAAS;AAAA,MAE9D;AAAA,IAAA;AAAA,IAEF,CAAC;AAAA,EAAA,
|
1
|
+
{"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type { AnimationItem, AnimationSegment } from 'lottie-web';\n\nimport lottie from 'lottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport { fetchLottie } from './helper';\n\nconst LottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const {\n src,\n width = '100%',\n height = '100%',\n settings,\n eventListener,\n onRender,\n animateOnIntersect,\n } = props;\n\n const container = useRef<HTMLDivElement>(null);\n const animationInstance = useRef<AnimationItem | null>(null);\n const intersectionObserver = useRef<IntersectionObserver | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n playSegments: (segments: AnimationSegment, forceFlag?: boolean) => {\n if (animationInstance.current) {\n animationInstance.current.playSegments(segments, forceFlag);\n }\n },\n play: () => {\n if (animationInstance.current) {\n animationInstance.current.play();\n }\n },\n stop: () => {\n if (animationInstance.current) {\n animationInstance.current.stop();\n }\n },\n }),\n [],\n );\n\n useEffect(() => {\n const loadAnimation = async () => {\n try {\n const animationData = await fetchLottie(src);\n\n if (container.current) {\n animationInstance.current = lottie.loadAnimation({\n container: container.current,\n animationData,\n renderer: 'svg',\n loop: true,\n autoplay: true,\n ...settings,\n });\n\n if (animateOnIntersect) {\n intersectionObserver.current = new IntersectionObserver(\n ([entry]) => {\n if (entry && entry.isIntersecting) {\n animationInstance.current?.play();\n } else {\n animationInstance.current?.pause();\n }\n },\n { threshold: 0 },\n );\n\n if (container.current) {\n intersectionObserver.current.observe(container.current);\n }\n }\n\n onRender?.();\n if (eventListener) {\n animationInstance.current.addEventListener(eventListener.name, eventListener.callback);\n }\n }\n } catch (error) {\n throw Error(`Error loading Lottie animation: ${error}`);\n }\n };\n\n loadAnimation();\n\n return () => {\n if (animationInstance.current) {\n if (eventListener) {\n animationInstance.current.removeEventListener(eventListener.name, eventListener.callback);\n }\n\n if (animateOnIntersect) {\n intersectionObserver.current?.disconnect();\n }\n animationInstance.current.destroy();\n }\n };\n }, [src, eventListener, onRender, animateOnIntersect, settings]);\n\n return <FlexView ref={container} $width={width} $height={height} />;\n});\n\nexport default memo(LottieAnimation);\n"],"names":["LottieAnimation","forwardRef","props","ref","src","width","height","settings","eventListener","onRender","animateOnIntersect","container","useRef","animationInstance","intersectionObserver","useImperativeHandle","segments","forceFlag","useEffect","animationData","fetchLottie","lottie","entry","_a","_b","error","FlexView","LottieAnimation$1","memo"],"mappings":";;;;;AASA,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AkB,QAAQ,iBAAiBL,EAAc,MAAMA,EAAc,QAAQ;AAAA,aAGlFiB,GAAO;AACR,YAAA,MAAM,mCAAmCA,CAAK,EAAE;AAAA,IACxD;AAAA,EAAA,MAKK,MAAM;;AACX,IAAIZ,EAAkB,YAChBL,KACFK,EAAkB,QAAQ,oBAAoBL,EAAc,MAAMA,EAAc,QAAQ,GAGtFE,OACFa,IAAAT,EAAqB,YAArB,QAAAS,EAA8B,eAEhCV,EAAkB,QAAQ;EAC5B,IAED,CAACT,GAAKI,GAAeC,GAAUC,GAAoBH,CAAQ,CAAC,qBAEvDmB,GAAS,EAAA,KAAKf,GAAW,QAAQN,GAAO,SAASC,EAAQ,CAAA;AACnE,CAAC,GAEcqB,IAAAC,EAAK5B,CAAe;"}
|
package/dist/index.d.ts
CHANGED
@@ -496,7 +496,7 @@ export declare const HighlighterIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
496
496
|
|
497
497
|
export declare const HomeIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
498
498
|
|
499
|
-
export declare const HomeworkCardList: React_2.
|
499
|
+
export declare const HomeworkCardList: React_2.NamedExoticComponent<HWCardListProps>;
|
500
500
|
|
501
501
|
declare const hues: readonly ["YELLOW", "ORANGE", "PURPLE", "GREEN", "BLUE"];
|
502
502
|
|