@cuemath/leap 2.9.6-as4 → 2.9.6-as6
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-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.js +44 -43
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +31 -30
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +82 -55
- 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 +14 -13
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +2 -2
- 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 +24 -24
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/chapters-v2/utils/index.js +9 -11
- package/dist/features/chapters-v2/utils/index.js.map +1 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +8 -9
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +38 -39
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/journey/hooks/use-chapter-journey.js +194 -0
- package/dist/features/journey/hooks/use-chapter-journey.js.map +1 -0
- package/dist/features/journey/journey-id/journey-id-student.js +2 -3
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-teacher.js +5 -0
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -0
- package/dist/features/journey/use-journey/journey-context-provider.js +48 -48
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +12 -11
- 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-container.js +75 -81
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -1
- package/dist/features/sheet-v2/resource-list/resource-list.js +1 -1
- package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -1
- package/dist/index.d.ts +29 -5
- package/dist/index.js +140 -137
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"journey-context-provider.js","sources":["../../../../src/features/journey/use-journey/journey-context-provider.tsx"],"sourcesContent":["/* eslint-disable no-console */\nimport type { TJourneyId } from '../journey-id/journey-id-types';\nimport type {\n ICoachmarkProps,\n IJourneyContext,\n IJourneyProviderProps,\n} from './journey-context-types';\nimport type { FC } from 'react';\n\nimport { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Coachmark } from '../comps/coachmark/coachmark';\nimport { useGetUserJourney, usePostUserJourney } from '../user-journey-api/user-journey-api';\nimport * as S from './journey-styled';\n\nexport const JourneyContext = createContext<IJourneyContext | null>(null);\n\nexport const JourneyProvider: FC<IJourneyProviderProps> = ({ children, appId, userId }) => {\n const [isJourneyBlurred, setIsJourneyBlurred] = useState<boolean>(false);\n const [userCompletedJourneyIds, setUserCompletedJourneyIds] = useState<TJourneyId[] | null>(null);\n const [coachmarkList, setCoachmarkList] = useState<ICoachmarkProps[]>([]);\n const [isJourneyActive, setIsJourneyActive] = useState(false);\n const currentIndex = useRef(-1);\n const currentJourneyId = useRef<TJourneyId | undefined>();\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const { data: userCompletedJourneys = null, get: getJourneyProgress } = useGetUserJourney();\n\n const setJourney = useCallback(\n (id: TJourneyId, coachmarks: ICoachmarkProps[], shouldBlueInitialJourney?: boolean) => {\n if (coachmarkList.length > 0) {\n console.error(\n `setJourney: Other Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n setIsJourneyActive(true);\n currentJourneyId.current = id;\n currentIndex.current = -1;\n setCoachmarkList([...coachmarks]);\n setIsJourneyBlurred(!!shouldBlueInitialJourney);\n },\n [coachmarkList.length],\n );\n\n const clearJourney = useCallback(() => {\n // Clear all timers\n timerRefs.current.forEach(timer => {\n clearTimeout(timer);\n });\n timerRefs.current = [];\n currentJourneyId.current = undefined;\n currentIndex.current = -1;\n setCoachmarkList([]);\n setIsJourneyActive(false);\n }, []);\n\n const endJourney = useCallback(\n (journeyId: TJourneyId) => {\n clearJourney();\n setUserCompletedJourneyIds(prev => {\n if (prev && !prev.includes(journeyId)) {\n return [...prev, journeyId];\n }\n\n return prev;\n });\n // fire the API (doesn’t block the UI)\n postJourneyCompletion({\n app_id: appId,\n user_id: userId,\n journey_id: journeyId,\n journey_status: 'COMPLETED',\n });\n },\n [appId, clearJourney, postJourneyCompletion, userId],\n );\n\n const addCoachmark = useCallback((id: TJourneyId, coachmark: ICoachmarkProps) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`\n : `addCoachmark was called before setJourney and Journey ID is undefined`,\n );\n\n return;\n }\n\n setCoachmarkList(prev => [...prev, coachmark]);\n }, []);\n\n const nextCoachmark = useCallback(\n (\n id: TJourneyId,\n keepPrevActive: boolean = false,\n delayInMs: number = 0,\n shouldBlurNextJourney: boolean = false,\n ) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `nextCoachmark was called before setJourney`\n : `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n\n setIsJourneyBlurred(shouldBlurNextJourney);\n\n if (delayInMs !== 0) {\n // If delay is not 0, we will hide all them coachmarks and reveal only after the delay\n setCoachmarkList(prevList => {\n return prevList.map((item: ICoachmarkProps) => {\n return { ...item, isActive: false };\n });\n });\n }\n\n const timer = setTimeout(() => {\n clearTimeout(timer);\n const currIndex = currentIndex.current + 1;\n\n setCoachmarkList(prevList => {\n // Finish onboarding\n if (currIndex >= prevList.length || prevList.length === 0) {\n clearJourney();\n\n return [];\n }\n\n currentIndex.current = currIndex;\n const updatedCoachmarkList = [...prevList];\n\n (updatedCoachmarkList[currIndex] as ICoachmarkProps).isActive = true;\n\n if (currIndex > 0) {\n (updatedCoachmarkList[currIndex - 1] as ICoachmarkProps).isActive = keepPrevActive;\n }\n\n return updatedCoachmarkList;\n });\n }, delayInMs);\n\n timerRefs.current.push(timer);\n },\n [clearJourney],\n );\n\n const memoizedContextValue: IJourneyContext = useMemo(\n () => ({\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarks: coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n }),\n [\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n ],\n );\n\n // Get the initial state of incompleteJourneys\n useEffect(() => {\n if (appId && userId) {\n getJourneyProgress(userId, {\n app_id: appId,\n user_id: userId,\n journey_status: 'COMPLETED',\n });\n }\n }, [appId, getJourneyProgress, userId]);\n\n // Set the data to context state initially\n useEffect(() => {\n if (userCompletedJourneys) {\n const completedUserJourneysIds = userCompletedJourneys.map(journey => journey.journey_id);\n\n setUserCompletedJourneyIds(completedUserJourneysIds);\n }\n }, [userCompletedJourneys]);\n\n return (\n <JourneyContext.Provider value={memoizedContextValue}>\n {isJourneyActive && (\n <S.Overlay\n about=\"journey-overlay\"\n isJourneyBlurred={isJourneyBlurred}\n data-testid={currentJourneyId.current}\n >\n {coachmarkList.map((coachmark, index) => (\n <Coachmark key={`coachmark-${index}`} coachmark={coachmark} />\n ))}\n </S.Overlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","isJourneyBlurred","setIsJourneyBlurred","useState","userCompletedJourneyIds","setUserCompletedJourneyIds","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","useGetUserJourney","setJourney","useCallback","id","coachmarks","shouldBlueInitialJourney","clearJourney","timer","endJourney","journeyId","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","shouldBlurNextJourney","prevList","item","currIndex","updatedCoachmarkList","memoizedContextValue","useMemo","useEffect","completedUserJourneysIds","journey","jsxs","jsx","S.Overlay","index","Coachmark"],"mappings":";;;;;AAea,MAAAA,IAAiBC,EAAsC,IAAI,GAE3DC,IAA6C,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,QAAAC,QAAa;AACzF,QAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAkB,EAAK,GACjE,CAACC,GAAyBC,CAA0B,IAAIF,EAA8B,IAAI,GAC1F,CAACG,GAAeC,CAAgB,IAAIJ,EAA4B,CAAE,CAAA,GAClE,CAACK,GAAiBC,CAAkB,IAAIN,EAAS,EAAK,GACtDO,IAAeC,EAAO,EAAE,GACxBC,IAAmBD,KACnBE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,MAAMG,EAAsB,IAAIC,EAAmB,GACrD,EAAE,MAAMC,IAAwB,MAAM,KAAKC,EAAA,IAAuBC,KAElEC,IAAaC;AAAA,IACjB,CAACC,GAAgBC,GAA+BC,MAAuC;AACjF,UAAAjB,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,KACXiB,EAAmBjB,GAAQ;AAAA,MACzB,QAAQD;AAAA,MACR,SAASC;AAAA,MACT,gBAAgB;AAAA,IAAA,CACjB;AAAA,EAEF,GAAA,CAACD,GAAOkB,GAAoBjB,CAAM,CAAC,GAGtCyC,EAAU,MAAM;AACd,QAAIzB,GAAuB;AACzB,YAAM0B,IAA2B1B,EAAsB,IAAI,CAAA2B,MAAWA,EAAQ,UAAU;AAExF,MAAAtC,EAA2BqC,CAAwB;AAAA,IACrD;AAAA,EAAA,GACC,CAAC1B,CAAqB,CAAC,GAGvB,gBAAA4B,EAAAjD,EAAe,UAAf,EAAwB,OAAO4C,GAC7B,UAAA;AAAA,IACC/B,KAAA,gBAAAqC;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,kBAAA7C;AAAA,QACA,eAAaW,EAAiB;AAAA,QAE7B,UAAAN,EAAc,IAAI,CAACwB,GAAWiB,MAC5B,gBAAAF,EAAAG,GAAA,EAAqC,WAAAlB,EAAtB,GAAA,aAAaiB,CAAK,EAA0B,CAC7D;AAAA,MAAA;AAAA,IACH;AAAA,IAEDjD;AAAA,EACH,EAAA,CAAA;AAEJ;"}
|
1
|
+
{"version":3,"file":"journey-context-provider.js","sources":["../../../../src/features/journey/use-journey/journey-context-provider.tsx"],"sourcesContent":["/* eslint-disable no-console */\nimport type { TJourneyId } from '../journey-id/journey-id-types';\nimport type {\n ICoachmarkProps,\n IJourneyContext,\n IJourneyProviderProps,\n} from './journey-context-types';\nimport type { FC } from 'react';\n\nimport { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Coachmark } from '../comps/coachmark/coachmark';\nimport { useGetUserJourney, usePostUserJourney } from '../user-journey-api/user-journey-api';\nimport * as S from './journey-styled';\n\nexport const JourneyContext = createContext<IJourneyContext | null>(null);\n\nexport const JourneyProvider: FC<IJourneyProviderProps> = ({ children, appId, userId }) => {\n const [isJourneyBlurred, setIsJourneyBlurred] = useState<boolean>(false);\n const [userCompletedJourneyIds, setUserCompletedJourneyIds] = useState<TJourneyId[] | null>(null);\n const [coachmarkList, setCoachmarkList] = useState<ICoachmarkProps[]>([]);\n const [isJourneyActive, setIsJourneyActive] = useState(false);\n const currentIndex = useRef(-1);\n const currentJourneyId = useRef<TJourneyId | undefined>();\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const { data: userCompletedJourneys = null, get: getJourneyProgress } = useGetUserJourney();\n\n const setJourney = useCallback(\n (id: TJourneyId, coachmarks: ICoachmarkProps[]) => {\n if (coachmarkList.length > 0) {\n console.error(\n `setJourney: Other Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n setIsJourneyActive(true);\n currentJourneyId.current = id;\n currentIndex.current = -1;\n setCoachmarkList([...coachmarks]);\n },\n [coachmarkList.length],\n );\n\n const clearJourney = useCallback(() => {\n // Clear all timers\n timerRefs.current.forEach(timer => {\n clearTimeout(timer);\n });\n timerRefs.current = [];\n currentJourneyId.current = undefined;\n currentIndex.current = -1;\n setCoachmarkList([]);\n setIsJourneyActive(false);\n }, []);\n\n const endJourney = useCallback(\n (journeyId: TJourneyId) => {\n clearJourney();\n setUserCompletedJourneyIds(prev => {\n if (prev && !prev.includes(journeyId)) {\n return [...prev, journeyId];\n }\n\n return prev;\n });\n // fire the API (doesn’t block the UI)\n postJourneyCompletion({\n app_id: appId,\n user_id: userId,\n journey_id: journeyId,\n journey_status: 'COMPLETED',\n });\n },\n [appId, clearJourney, postJourneyCompletion, userId],\n );\n\n const addCoachmark = useCallback((id: TJourneyId, coachmark: ICoachmarkProps) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`\n : `addCoachmark was called before setJourney and Journey ID is undefined`,\n );\n\n return;\n }\n\n setCoachmarkList(prev => [...prev, coachmark]);\n }, []);\n\n const nextCoachmark = useCallback(\n (\n id: TJourneyId,\n keepPrevActive: boolean = false,\n delayInMs: number = 0,\n shouldBlurNextJourney: boolean = false,\n ) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `nextCoachmark was called before setJourney`\n : `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n\n setIsJourneyBlurred(shouldBlurNextJourney);\n\n if (delayInMs !== 0) {\n // If delay is not 0, we will hide all them coachmarks and reveal only after the delay\n setCoachmarkList(prevList => {\n return prevList.map((item: ICoachmarkProps) => {\n return { ...item, isActive: false };\n });\n });\n }\n\n const timer = setTimeout(() => {\n clearTimeout(timer);\n const currIndex = currentIndex.current + 1;\n\n setCoachmarkList(prevList => {\n // Finish onboarding\n if (currIndex >= prevList.length || prevList.length === 0) {\n clearJourney();\n\n return [];\n }\n\n currentIndex.current = currIndex;\n const updatedCoachmarkList = [...prevList];\n\n (updatedCoachmarkList[currIndex] as ICoachmarkProps).isActive = true;\n\n if (currIndex > 0) {\n (updatedCoachmarkList[currIndex - 1] as ICoachmarkProps).isActive = keepPrevActive;\n }\n\n return updatedCoachmarkList;\n });\n }, delayInMs);\n\n timerRefs.current.push(timer);\n },\n [clearJourney],\n );\n\n const memoizedContextValue: IJourneyContext = useMemo(\n () => ({\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarks: coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n }),\n [\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n ],\n );\n\n // Get the initial state of incompleteJourneys\n useEffect(() => {\n if (appId && userId) {\n getJourneyProgress(userId, {\n app_id: appId,\n user_id: userId,\n journey_status: 'COMPLETED',\n });\n }\n }, [appId, getJourneyProgress, userId]);\n\n // Set the data to context state initially\n useEffect(() => {\n if (userCompletedJourneys) {\n const completedUserJourneysIds = userCompletedJourneys.map(journey => journey.journey_id);\n\n setUserCompletedJourneyIds(completedUserJourneysIds);\n }\n }, [userCompletedJourneys]);\n\n return (\n <JourneyContext.Provider value={memoizedContextValue}>\n {isJourneyActive && (\n <S.Overlay\n about=\"journey-overlay\"\n isJourneyBlurred={isJourneyBlurred}\n data-testid={currentJourneyId.current}\n >\n {coachmarkList.map((coachmark, index) => (\n <Coachmark key={`coachmark-${index}`} coachmark={coachmark} />\n ))}\n </S.Overlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","isJourneyBlurred","setIsJourneyBlurred","useState","userCompletedJourneyIds","setUserCompletedJourneyIds","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","useGetUserJourney","setJourney","useCallback","id","coachmarks","clearJourney","timer","endJourney","journeyId","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","shouldBlurNextJourney","prevList","item","currIndex","updatedCoachmarkList","memoizedContextValue","useMemo","useEffect","completedUserJourneysIds","journey","jsxs","jsx","S.Overlay","index","Coachmark"],"mappings":";;;;;AAea,MAAAA,IAAiBC,EAAsC,IAAI,GAE3DC,IAA6C,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,QAAAC,QAAa;AACzF,QAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAkB,EAAK,GACjE,CAACC,GAAyBC,CAA0B,IAAIF,EAA8B,IAAI,GAC1F,CAACG,GAAeC,CAAgB,IAAIJ,EAA4B,CAAE,CAAA,GAClE,CAACK,GAAiBC,CAAkB,IAAIN,EAAS,EAAK,GACtDO,IAAeC,EAAO,EAAE,GACxBC,IAAmBD,KACnBE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,MAAMG,EAAsB,IAAIC,EAAmB,GACrD,EAAE,MAAMC,I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IACF;AAAA,EAAA;AAIF,SAAAgC,EAAU,MAAM;AACd,IAAIzC,KAASC,KACXiB,EAAmBjB,GAAQ;AAAA,MACzB,QAAQD;AAAA,MACR,SAASC;AAAA,MACT,gBAAgB;AAAA,IAAA,CACjB;AAAA,EAEF,GAAA,CAACD,GAAOkB,GAAoBjB,CAAM,CAAC,GAGtCwC,EAAU,MAAM;AACd,QAAIxB,GAAuB;AACzB,YAAMyB,IAA2BzB,EAAsB,IAAI,CAAA0B,MAAWA,EAAQ,UAAU;AAExF,MAAArC,EAA2BoC,CAAwB;AAAA,IACrD;AAAA,EAAA,GACC,CAACzB,CAAqB,CAAC,GAGvB,gBAAA2B,EAAAhD,EAAe,UAAf,EAAwB,OAAO2C,GAC7B,UAAA;AAAA,IACC9B,KAAA,gBAAAoC;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,kBAAA5C;AAAA,QACA,eAAaW,EAAiB;AAAA,QAE7B,UAAAN,EAAc,IAAI,CAACuB,GAAWiB,MAC5B,gBAAAF,EAAAG,GAAA,EAAqC,WAAAlB,EAAtB,GAAA,aAAaiB,CAAK,EAA0B,CAC7D;AAAA,MAAA;AAAA,IACH;AAAA,IAEDhD;AAAA,EACH,EAAA,CAAA;AAEJ;"}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { jsxs as t, jsx as e, Fragment as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
1
|
+
import { jsxs as t, jsx as e, Fragment as P } from "react/jsx-runtime";
|
2
|
+
import { memo as W, useRef as X, useState as j, useMemo as H, useLayoutEffect as F } from "react";
|
3
|
+
import K from "../../../../../assets/line-icons/icons/check2.js";
|
4
|
+
import V from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
|
5
5
|
import v from "../../../../ui/image/image.js";
|
6
6
|
import r from "../../../../ui/layout/flex-view.js";
|
7
7
|
import U from "../../../../ui/separator/separator.js";
|
@@ -11,7 +11,7 @@ import { GOAL_CATEGORY_BASED_IMAGES as q } from "./milestone-constants.js";
|
|
11
11
|
import { getRemainingDaysToCompleteGoal as z, getGoalCategoryBasedColorTheme as J, getMilestoneWidgetStatusInfo as Q } from "./milestone-utils.js";
|
12
12
|
import { ChapterProgressSVG as Z, ChapterProgressSVGCircle as u, StyledCheckIconWrapper as ee, MilestoneTitle as te } from "./milestone-widget-styled.js";
|
13
13
|
import re from "./outcome/outcome.js";
|
14
|
-
const ue =
|
14
|
+
const ue = W(
|
15
15
|
({ isClassOngoing: C, isStudentPresent: T, isExpanded: oe, ...x }) => {
|
16
16
|
const {
|
17
17
|
milestone: m,
|
@@ -32,7 +32,7 @@ const ue = X(
|
|
32
32
|
goal_category: l,
|
33
33
|
goal_code: p,
|
34
34
|
progress_stat: k
|
35
|
-
} = m, { completed: h = 0, total: a = 0 } = k || {}, $ = o === "OUTCOME_PENDING", c = h > 0 ? Math.floor((h / a || 1) * 100) : 0, n =
|
35
|
+
} = m, { completed: h = 0, total: a = 0 } = k || {}, $ = o === "OUTCOME_PENDING", c = h > 0 ? Math.floor((h / a || 1) * 100) : 0, n = X(null), [B, O] = j(!1), { textColor: N, borderColor: f } = J(l), d = Q(o), R = ($ ? d == null ? void 0 : d.progressBackgroundColor : f) || "WHITE_5", L = H(() => typeof p == "string", [p]), M = z(S);
|
36
36
|
return F(() => {
|
37
37
|
n.current && n.current.scrollHeight > n.current.clientHeight && O(!0);
|
38
38
|
}, [n]), l ? /* @__PURE__ */ t(
|
@@ -78,7 +78,7 @@ const ue = X(
|
|
78
78
|
height: 40
|
79
79
|
}
|
80
80
|
) }),
|
81
|
-
c === 100 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
|
81
|
+
c === 100 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(K, { width: 20, height: 20 }) })
|
82
82
|
]
|
83
83
|
}
|
84
84
|
),
|
@@ -110,7 +110,7 @@ const ue = X(
|
|
110
110
|
)
|
111
111
|
] }),
|
112
112
|
/* @__PURE__ */ e(
|
113
|
-
|
113
|
+
V,
|
114
114
|
{
|
115
115
|
renderAs: "primary",
|
116
116
|
position: "bottom",
|
@@ -120,7 +120,8 @@ const ue = X(
|
|
120
120
|
te,
|
121
121
|
{
|
122
122
|
ref: n,
|
123
|
-
$renderAs:
|
123
|
+
$renderAs: L ? "ah4" : "ab1",
|
124
|
+
$color: "BLACK_1",
|
124
125
|
children: g
|
125
126
|
}
|
126
127
|
)
|
@@ -128,10 +129,10 @@ const ue = X(
|
|
128
129
|
),
|
129
130
|
o !== "DRAFT" && /* @__PURE__ */ t(s, { $renderAs: "ub3", $color: "BLACK_T_60", children: [
|
130
131
|
!!a && `${c}% complete`,
|
131
|
-
!!a && o === "ACTIVE" &&
|
132
|
+
!!a && o === "ACTIVE" && M
|
132
133
|
] })
|
133
134
|
] }),
|
134
|
-
i != null && i.length ? /* @__PURE__ */ t(
|
135
|
+
i != null && i.length ? /* @__PURE__ */ t(P, { children: [
|
135
136
|
/* @__PURE__ */ e(U, { width: 40, height: 1, background: "BLACK_T_15" }),
|
136
137
|
/* @__PURE__ */ e(re, { outcomes: i })
|
137
138
|
] }) : void 0
|
@@ -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 ? 'ah3' : 'ah4'}\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,KAA6DC;AAAA,EACjE,CAAC,EAAE,gBAAAC,GAAgB,kBAAAC,GAAkB,YAAAC,IAAY,GAAGC,QAAoC;AAChF,UA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U,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,IA7HoB;AAAA,EAiI5B;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 {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,KAA6DC;AAAA,EACjE,CAAC,EAAE,gBAAAC,GAAgB,kBAAAC,GAAkB,YAAAC,IAAY,GAAGC,QAAoC;AAChF,UAAA;AAAA,MACJ,WAAAC;AAAA,MACA,WAAAC;AAAA,MACA,aAAAC;AAAA,MACA,aAAAC;AAAA,MACA,YAAAC;AAAA,MACA,UAAAC;AAAA,MACA,cAAAC;AAAA,MACA,UAAAC;AAAA,MAC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N;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,38 +1,38 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { h as
|
3
|
-
import { memo as le, useMemo as Se, useState as
|
4
|
-
import { ILLUSTRATIONS as
|
1
|
+
import { jsx as E, jsxs as u, Fragment as ae } from "react/jsx-runtime";
|
2
|
+
import { h as Ee } from "../../../node_modules/humanize-plus/dist/humanize.js";
|
3
|
+
import { memo as le, useMemo as Se, useState as R, useCallback as me, useEffect as p } from "react";
|
4
|
+
import { ILLUSTRATIONS as ce } from "../../../assets/illustrations/illustrations.js";
|
5
5
|
import { EVENTS as e } from "../../communication/pub-sub/constants.js";
|
6
|
-
import { useInClassActionListener as
|
6
|
+
import { useInClassActionListener as Te } from "../../communication/pub-sub/hooks.js";
|
7
7
|
import { invalidateHomeworks as f } from "../../homework/hw-card-list/api/get-homeworks.js";
|
8
8
|
import de from "../../ui/separator/separator.js";
|
9
9
|
import { invalidateMilestoneResources as Ae } from "./api/get-milestone-resources.js";
|
10
10
|
import { useGetAllMilestonesdata as _e, invalidateMilestonesData as Ne } from "./api/get-milestones.js";
|
11
11
|
import { invalidateTestHelpData as De } from "./api/get-tests-list.js";
|
12
|
-
import
|
13
|
-
import
|
12
|
+
import Me from "./filter-milestones.js";
|
13
|
+
import Ie from "./milestone-list/milestone-list.js";
|
14
14
|
import Le from "./milestone-list/milestone-loader/milestone-loader.js";
|
15
|
-
import { ContentWrapper as Ce, LoaderWrapper as
|
16
|
-
const ue = (
|
17
|
-
Ne(
|
18
|
-
},
|
19
|
-
({ studentName:
|
15
|
+
import { ContentWrapper as Ce, LoaderWrapper as Oe } from "./styled.js";
|
16
|
+
const ue = (d) => {
|
17
|
+
Ne(d);
|
18
|
+
}, Re = le(
|
19
|
+
({ studentName: d, studentId: l, studentClassroomId: h, ...P }) => {
|
20
20
|
const {
|
21
|
-
milestoneType:
|
22
|
-
isStudentPresent:
|
23
|
-
isClassOngoing:
|
24
|
-
userType:
|
21
|
+
milestoneType: s,
|
22
|
+
isStudentPresent: N,
|
23
|
+
isClassOngoing: v,
|
24
|
+
userType: A,
|
25
25
|
canCreatePlan: G,
|
26
26
|
teacherName: U,
|
27
27
|
parentName: g,
|
28
|
-
courseStream:
|
29
|
-
activeMilestoneId:
|
30
|
-
activeTabId:
|
31
|
-
onExpandPastMilestones:
|
32
|
-
onAddOutcome:
|
33
|
-
onChapterClick:
|
28
|
+
courseStream: _,
|
29
|
+
activeMilestoneId: F,
|
30
|
+
activeTabId: w,
|
31
|
+
onExpandPastMilestones: V,
|
32
|
+
onAddOutcome: x,
|
33
|
+
onChapterClick: b,
|
34
34
|
onEdit: y,
|
35
|
-
onCreateMilestoneTest:
|
35
|
+
onCreateMilestoneTest: H,
|
36
36
|
onDraftPublish: k,
|
37
37
|
onAddChapter: K,
|
38
38
|
onCreatePlan: W,
|
@@ -48,33 +48,33 @@ const ue = (A) => {
|
|
48
48
|
onTestReview: Z,
|
49
49
|
onTestStart: ee,
|
50
50
|
onWidgetTabSelection: te
|
51
|
-
} =
|
51
|
+
} = P, n = Se(
|
52
52
|
() => ({
|
53
|
-
milestone_state_group:
|
54
|
-
course_stream:
|
53
|
+
milestone_state_group: s === "ACTIVE" ? A === "TEACHER" ? "LIVE" : "STUDENT_LIVE" : s,
|
54
|
+
course_stream: _,
|
55
55
|
student_id: l
|
56
56
|
}),
|
57
|
-
[
|
57
|
+
[s, _, l, A]
|
58
58
|
), {
|
59
|
-
data:
|
59
|
+
data: o,
|
60
60
|
getAll: m,
|
61
61
|
isStale: D,
|
62
62
|
isProcessing: S
|
63
|
-
} = _e(n), [
|
63
|
+
} = _e(n), [M, I] = R(), [L, C] = R(!1), oe = me(
|
64
64
|
(c) => {
|
65
|
-
const { searchText: i, selectedBoard:
|
66
|
-
(i ||
|
67
|
-
const
|
68
|
-
const { milestone_name: ne, board: ie, grade:
|
69
|
-
return (i ? ne.toLowerCase().includes(i.toLowerCase()) : !0) && (
|
65
|
+
const { searchText: i, selectedBoard: r, selectedGrade: a } = c || {};
|
66
|
+
(i || r || a) && C(!0);
|
67
|
+
const T = o == null ? void 0 : o.filter((t) => {
|
68
|
+
const { milestone_name: ne, board: ie, grade: re } = t || {};
|
69
|
+
return (i ? ne.toLowerCase().includes(i.toLowerCase()) : !0) && (r ? ie === r : !0) && (a ? re === a : !0);
|
70
70
|
});
|
71
|
-
|
71
|
+
I(T);
|
72
72
|
},
|
73
|
-
[
|
73
|
+
[o]
|
74
74
|
), se = () => {
|
75
|
-
C(!1),
|
75
|
+
C(!1), I(void 0);
|
76
76
|
};
|
77
|
-
if (
|
77
|
+
if (Te(
|
78
78
|
{
|
79
79
|
studentClassroomId: h,
|
80
80
|
actions: [
|
@@ -97,73 +97,67 @@ const ue = (A) => {
|
|
97
97
|
[e.GOAL_DELETED],
|
98
98
|
[e.GOAL_OUTCOME_ADDED],
|
99
99
|
[e.PAST_MILESTONE_OUTCOME_ADDED],
|
100
|
-
[e.MILESTONE_TEST_ASSIGNED]
|
101
|
-
[e.SHEET_STARTED]
|
100
|
+
[e.MILESTONE_TEST_ASSIGNED]
|
102
101
|
],
|
103
102
|
callback: (c) => {
|
104
|
-
var
|
105
|
-
const i = (
|
106
|
-
(t) => t.eventName === e.MILESTONE_RESOURCE_ASSIGNED || t.eventName === e.MILESTONE_RESOURCE_UNASSIGNED
|
107
|
-
)) == null ? void 0 :
|
108
|
-
(t) => t.eventName === e.MILESTONE_TEST_ASSIGNED
|
109
|
-
)) == null ? void 0 :
|
103
|
+
var a, T;
|
104
|
+
const i = (a = c.find(
|
105
|
+
(t) => t.eventName === e.MILESTONE_RESOURCE_ASSIGNED || t.eventName === e.MILESTONE_RESOURCE_UNASSIGNED
|
106
|
+
)) == null ? void 0 : a.eventPayload, r = (T = c.find(
|
107
|
+
(t) => t.eventName === e.MILESTONE_TEST_ASSIGNED
|
108
|
+
)) == null ? void 0 : T.eventPayload;
|
110
109
|
if (i) {
|
111
110
|
const { milestoneId: t } = i || {};
|
112
111
|
f(l), Ae(t);
|
113
112
|
}
|
114
|
-
if (
|
115
|
-
const { milestoneId: t } =
|
113
|
+
if (r) {
|
114
|
+
const { milestoneId: t } = r;
|
116
115
|
f(l), De(t);
|
117
116
|
}
|
118
117
|
ue(n);
|
119
118
|
}
|
120
119
|
},
|
121
|
-
(
|
122
|
-
), console.log(
|
123
|
-
(o === "ACTIVE" || o === "INACTIVE") && T,
|
124
|
-
o,
|
125
|
-
T,
|
126
|
-
"ayush"
|
120
|
+
(s === "ACTIVE" || s === "INACTIVE") && N
|
127
121
|
), p(() => {
|
128
122
|
m(n);
|
129
123
|
}, [m, n]), p(() => {
|
130
124
|
!S && D && m(n);
|
131
|
-
}, [m, n, D, S]), S && !
|
132
|
-
return /* @__PURE__ */
|
133
|
-
const
|
125
|
+
}, [m, n, D, S]), S && !o)
|
126
|
+
return /* @__PURE__ */ E(Le, { numMilestones: 2 });
|
127
|
+
const O = s === "ACTIVE" && o && o.length > 6;
|
134
128
|
return /* @__PURE__ */ u(Ce, { $disablePointerEvents: S, children: [
|
135
|
-
S && /* @__PURE__ */
|
136
|
-
|
137
|
-
/* @__PURE__ */
|
138
|
-
|
129
|
+
S && /* @__PURE__ */ E(Oe, { children: /* @__PURE__ */ E("img", { src: ce.LOADER_1, alt: "loading" }) }),
|
130
|
+
O && /* @__PURE__ */ u(ae, { children: [
|
131
|
+
/* @__PURE__ */ E(
|
132
|
+
Me,
|
139
133
|
{
|
140
|
-
filteredMilestones:
|
141
|
-
milestones:
|
134
|
+
filteredMilestones: M,
|
135
|
+
milestones: o,
|
142
136
|
handleFilterMilestones: oe,
|
143
137
|
handleClearFilter: se
|
144
138
|
}
|
145
139
|
),
|
146
|
-
/* @__PURE__ */
|
140
|
+
/* @__PURE__ */ E(de, { heightX: 1.5 })
|
147
141
|
] }),
|
148
|
-
/* @__PURE__ */
|
149
|
-
|
142
|
+
/* @__PURE__ */ E(
|
143
|
+
Ie,
|
150
144
|
{
|
151
|
-
showFilters: !!
|
145
|
+
showFilters: !!O,
|
152
146
|
canCreatePlan: G,
|
153
|
-
isClassOngoing:
|
147
|
+
isClassOngoing: v,
|
154
148
|
isFiltersAdded: L,
|
155
|
-
isStudentPresent:
|
156
|
-
milestoneType:
|
157
|
-
milestones: L ?
|
149
|
+
isStudentPresent: N,
|
150
|
+
milestoneType: s,
|
151
|
+
milestones: L ? M : o,
|
158
152
|
onAddChapter: K,
|
159
|
-
onAddOutcome:
|
160
|
-
onChapterClick:
|
153
|
+
onAddOutcome: x,
|
154
|
+
onChapterClick: b,
|
161
155
|
onCreatePlan: W,
|
162
156
|
onDelete: j,
|
163
157
|
onDraftPublish: k,
|
164
158
|
onEdit: y,
|
165
|
-
onExpandPastMilestones:
|
166
|
-
onCreateMilestoneTest:
|
159
|
+
onExpandPastMilestones: V,
|
160
|
+
onCreateMilestoneTest: H,
|
167
161
|
onAssignResources: X,
|
168
162
|
onTestPreview: Y,
|
169
163
|
onTestReview: Z,
|
@@ -174,20 +168,20 @@ const ue = (A) => {
|
|
174
168
|
onNodeReattempt: B,
|
175
169
|
onNodeReset: J,
|
176
170
|
onNodeUnassign: Q,
|
177
|
-
activeMilestoneId:
|
178
|
-
activeTabId:
|
171
|
+
activeMilestoneId: F,
|
172
|
+
activeTabId: w,
|
179
173
|
onWidgetTabSelection: te,
|
180
174
|
studentId: l,
|
181
|
-
studentName:
|
175
|
+
studentName: Ee.titleCase(d),
|
182
176
|
teacherName: U,
|
183
177
|
parentName: g,
|
184
|
-
userType:
|
185
|
-
courseStream:
|
178
|
+
userType: A,
|
179
|
+
courseStream: _
|
186
180
|
}
|
187
181
|
)
|
188
182
|
] });
|
189
183
|
}
|
190
|
-
), je =
|
184
|
+
), je = Re;
|
191
185
|
export {
|
192
186
|
je as default
|
193
187
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"milestone-list-container.js","sources":["../../../../src/features/milestone/milestone-list-container/milestone-list-container.tsx"],"sourcesContent":["import type {\n IMilestoneContainerProps,\n IMilestoneListQueryParams,\n} from './milestone-list-container-types';\nimport type { IMilestoneData } from './milestone-list/milestone-list-types';\n\nimport { titleCase } from 'humanize-plus';\nimport React, { memo, useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport { EVENTS } from '../../communication/pub-sub/constants';\nimport { useInClassActionListener } from '../../communication/pub-sub/hooks';\nimport { invalidateHomeworks } from '../../homework/hw-card-list/api/get-homeworks';\nimport Separator from '../../ui/separator/separator';\nimport { invalidateMilestoneResources } from './api/get-milestone-resources';\nimport { useGetAllMilestonesdata, invalidateMilestonesData } from './api/get-milestones';\nimport { invalidateTestHelpData } from './api/get-tests-list';\nimport FilterMilestones from './filter-milestones';\nimport MilestoneList from './milestone-list/milestone-list';\nimport MilestoneLoader from './milestone-list/milestone-loader/milestone-loader';\nimport * as Styled from './styled';\n\nconst invalidateAllMilestones = (queryParams: IMilestoneListQueryParams) => {\n invalidateMilestonesData(queryParams);\n};\n\nconst MilestoneListContainer: React.FC<IMilestoneContainerProps> = memo(\n ({ studentName, studentId, studentClassroomId, ...restMilestoneListContainerProps }) => {\n const {\n milestoneType,\n isStudentPresent,\n isClassOngoing,\n userType,\n canCreatePlan,\n teacherName,\n parentName,\n courseStream,\n activeMilestoneId,\n activeTabId,\n onExpandPastMilestones,\n onAddOutcome,\n onChapterClick,\n onEdit,\n onCreateMilestoneTest,\n onDraftPublish,\n onAddChapter,\n onCreatePlan,\n onDelete,\n onAssignResources,\n onNodeAttempt,\n onNodeView,\n onNodeReview,\n onNodeReattempt,\n onNodeReset,\n onNodeUnassign,\n onTestPreview,\n onTestReview,\n onTestStart,\n onWidgetTabSelection,\n } = restMilestoneListContainerProps;\n\n const queryParams: IMilestoneListQueryParams = useMemo(\n () =>\n ({\n milestone_state_group:\n milestoneType === 'ACTIVE'\n ? userType === 'TEACHER'\n ? 'LIVE'\n : 'STUDENT_LIVE'\n : milestoneType,\n course_stream: courseStream,\n student_id: studentId,\n }) as const,\n [milestoneType, courseStream, studentId, userType],\n );\n\n const {\n data: milestoneData,\n getAll: getMilestoneData,\n isStale: isMilestoneDataStale,\n isProcessing: isMilestoneProcessing,\n } = useGetAllMilestonesdata(queryParams);\n\n const [filteredMilestones, setFilteredMilestones] = useState<IMilestoneData[] | undefined>();\n const [isFiltersAdded, setIsFiltersAdded] = useState<boolean>(false);\n\n const handleFilterMilestones = useCallback(\n (data: { searchText?: string; selectedBoard?: string; selectedGrade?: string }) => {\n const { searchText, selectedBoard, selectedGrade } = data || {};\n\n if (searchText || selectedBoard || selectedGrade) {\n setIsFiltersAdded(true);\n }\n\n const filteredData = milestoneData?.filter(item => {\n const { milestone_name: milestoneName, board, grade } = item || {};\n const matchesSearchText = searchText\n ? milestoneName.toLowerCase().includes(searchText.toLowerCase())\n : true;\n const matchesCurriculum = selectedBoard ? board === selectedBoard : true;\n const matchesGrade = selectedGrade ? grade === selectedGrade : true;\n\n return matchesSearchText && matchesCurriculum && matchesGrade;\n });\n\n setFilteredMilestones(filteredData);\n },\n [milestoneData],\n );\n\n const handleClearFilter = () => {\n setIsFiltersAdded(false);\n setFilteredMilestones(undefined);\n };\n\n useInClassActionListener(\n {\n studentClassroomId,\n actions: [\n [EVENTS.CHAPTER_UPDATED],\n [EVENTS.LESSONS_MARKED_AS_FAMILIAR],\n [EVENTS.LESSONS_MARKED_AS_IRRELEVANT],\n [EVENTS.LESSONS_PROGRESS_RESET],\n [EVENTS.UNLOCK_SHEETS],\n [EVENTS.EXTRA_PRACTICE_ASSIGNED],\n [EVENTS.MILESTONE_DATE_UPDATED],\n [EVENTS.MILESTONE_DELETED],\n [EVENTS.MILESTONE_NAME_UPDATED],\n [EVENTS.MILESTONE_EDITED],\n [EVENTS.MILESTONE_RESOURCE_ASSIGNED],\n [EVENTS.MILESTONE_RESOURCE_UNASSIGNED],\n [EVENTS.MILESTONE_RESOURCE_RESET],\n [EVENTS.SHEET_UNASSIGNED],\n [EVENTS.GOAL_CREATED],\n [EVENTS.GOAL_EDITED],\n [EVENTS.GOAL_DELETED],\n [EVENTS.GOAL_OUTCOME_ADDED],\n [EVENTS.PAST_MILESTONE_OUTCOME_ADDED],\n [EVENTS.MILESTONE_TEST_ASSIGNED],\n [EVENTS.SHEET_STARTED],\n ],\n callback: messages => {\n const milestoneResourceEventPayload = messages.find(\n message =>\n message.eventName === EVENTS.MILESTONE_RESOURCE_ASSIGNED ||\n message.eventName === EVENTS.MILESTONE_RESOURCE_UNASSIGNED ||\n message.eventName === EVENTS.SHEET_STARTED,\n )?.eventPayload;\n const milestoneTestEventPayload = messages.find(\n message =>\n message.eventName === EVENTS.MILESTONE_TEST_ASSIGNED ||\n message.eventName === EVENTS.SHEET_STARTED,\n )?.eventPayload;\n\n if (milestoneResourceEventPayload) {\n const { milestoneId: resourceMilestoneId } =\n (milestoneResourceEventPayload as { milestoneId: string }) || {};\n\n invalidateHomeworks(studentId);\n invalidateMilestoneResources(resourceMilestoneId);\n }\n\n if (milestoneTestEventPayload) {\n const { milestoneId } = milestoneTestEventPayload as { milestoneId: string };\n\n invalidateHomeworks(studentId);\n invalidateTestHelpData(milestoneId);\n }\n\n invalidateAllMilestones(queryParams);\n },\n },\n (milestoneType === 'ACTIVE' || milestoneType === 'INACTIVE') && isStudentPresent,\n );\n console.log(\n (milestoneType === 'ACTIVE' || milestoneType === 'INACTIVE') && isStudentPresent,\n milestoneType,\n isStudentPresent,\n 'ayush',\n );\n useEffect(() => {\n getMilestoneData(queryParams);\n }, [getMilestoneData, queryParams]);\n\n useEffect(() => {\n if (!isMilestoneProcessing && isMilestoneDataStale) {\n getMilestoneData(queryParams);\n }\n }, [getMilestoneData, queryParams, isMilestoneDataStale, isMilestoneProcessing]);\n\n if (isMilestoneProcessing && !milestoneData) {\n return <MilestoneLoader numMilestones={2} />;\n }\n\n const showFilters = milestoneType === 'ACTIVE' && milestoneData && milestoneData.length > 6;\n\n return (\n <Styled.ContentWrapper $disablePointerEvents={isMilestoneProcessing}>\n {isMilestoneProcessing && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loading\" />\n </Styled.LoaderWrapper>\n )}\n {showFilters && (\n <>\n <FilterMilestones\n filteredMilestones={filteredMilestones}\n milestones={milestoneData}\n handleFilterMilestones={handleFilterMilestones}\n handleClearFilter={handleClearFilter}\n />\n <Separator heightX={1.5} />\n </>\n )}\n\n <MilestoneList\n showFilters={!!showFilters}\n canCreatePlan={canCreatePlan}\n isClassOngoing={isClassOngoing}\n isFiltersAdded={isFiltersAdded}\n isStudentPresent={isStudentPresent}\n milestoneType={milestoneType}\n milestones={isFiltersAdded ? filteredMilestones : milestoneData}\n onAddChapter={onAddChapter}\n onAddOutcome={onAddOutcome}\n onChapterClick={onChapterClick}\n onCreatePlan={onCreatePlan}\n onDelete={onDelete}\n onDraftPublish={onDraftPublish}\n onEdit={onEdit}\n onExpandPastMilestones={onExpandPastMilestones}\n onCreateMilestoneTest={onCreateMilestoneTest}\n onAssignResources={onAssignResources}\n onTestPreview={onTestPreview}\n onTestReview={onTestReview}\n onTestStart={onTestStart}\n onNodeAttempt={onNodeAttempt}\n onNodeView={onNodeView}\n onNodeReview={onNodeReview}\n onNodeReattempt={onNodeReattempt}\n onNodeReset={onNodeReset}\n onNodeUnassign={onNodeUnassign}\n activeMilestoneId={activeMilestoneId}\n activeTabId={activeTabId}\n onWidgetTabSelection={onWidgetTabSelection}\n studentId={studentId}\n studentName={titleCase(studentName)}\n teacherName={teacherName}\n parentName={parentName}\n userType={userType}\n courseStream={courseStream}\n />\n </Styled.ContentWrapper>\n );\n },\n);\n\nexport default MilestoneListContainer;\n"],"names":["invalidateAllMilestones","queryParams","invalidateMilestonesData","MilestoneListContainer","memo","studentName","studentId","studentClassroomId","restMilestoneListContainerProps","milestoneType","isStudentPresent","isClassOngoing","userType","canCreatePlan","teacherName","parentName","courseStream","activeMilestoneId","activeTabId","onExpandPastMilestones","onAddOutcome","onChapterClick","onEdit","onCreateMilestoneTest","onDraftPublish","onAddChapter","onCreatePlan","onDelete","onAssignResources","onNodeAttempt","onNodeView","onNodeReview","onNodeReattempt","onNodeReset","onNodeUnassign","onTestPreview","onTestReview","onTestStart","onWidgetTabSelection","useMemo","milestoneData","getMilestoneData","isMilestoneDataStale","isMilestoneProcessing","useGetAllMilestonesdata","filteredMilestones","setFilteredMilestones","useState","isFiltersAdded","setIsFiltersAdded","handleFilterMilestones","useCallback","data","searchText","selectedBoard","selectedGrade","filteredData","item","milestoneName","board","grade","handleClearFilter","useInClassActionListener","EVENTS","messages","milestoneResourceEventPayload","_a","message","milestoneTestEventPayload","_b","resourceMilestoneId","invalidateHomeworks","invalidateMilestoneResources","milestoneId","invalidateTestHelpData","useEffect","jsx","MilestoneLoader","showFilters","jsxs","Styled.ContentWrapper","Styled.LoaderWrapper","ILLUSTRATIONS","Fragment","FilterMilestones","Separator","MilestoneList","titleCase"],"mappings":";;;;;;;;;;;;;;;AAsBA,MAAMA,KAA0B,CAACC,MAA2C;AAC1E,EAAAC,GAAyBD,CAAW;AACtC,GAEME,KAA6DC;AAAA,EACjE,CAAC,EAAE,aAAAC,GAAa,WAAAC,GAAW,oBAAAC,GAAoB,GAAGC,QAAsC;AAChF,UAAA;AAAA,MACJ,eAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,UAAAC;AAAA,MACA,eAAAC;AAAA,MACA,aAAAC;AAAA,MACA,YAAAC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AAAA,YACC,oBAAAvC;AAAA,YACA,YAAYL;AAAA,YACZ,wBAAAU;AAAA,YACA,mBAAAW;AAAA,UAAA;AAAA,QACF;AAAA,QACA,gBAAAe,EAACS,IAAU,EAAA,SAAS,IAAK,CAAA;AAAA,MAAA,GAC3B;AAAA,MAGF,gBAAAT;AAAA,QAACU;AAAAA,QAAA;AAAA,UACC,aAAa,CAAC,CAACR;AAAA,UACf,eAAAjE;AAAA,UACA,gBAAAF;AAAA,UACA,gBAAAqC;AAAA,UACA,kBAAAtC;AAAA,UACA,eAAAD;AAAA,UACA,YAAYuC,IAAiBH,IAAqBL;AAAA,UAClD,cAAAf;AAAA,UACA,cAAAL;AAAA,UACA,gBAAAC;AAAA,UACA,cAAAK;AAAA,UACA,UAAAC;AAAA,UACA,gBAAAH;AAAA,UACA,QAAAF;AAAA,UACA,wBAAAH;AAAA,UACA,uBAAAI;AAAA,UACA,mBAAAK;AAAA,UACA,eAAAO;AAAA,UACA,cAAAC;AAAA,UACA,aAAAC;AAAA,UACA,eAAAR;AAAA,UACA,YAAAC;AAAA,UACA,cAAAC;AAAA,UACA,iBAAAC;AAAA,UACA,aAAAC;AAAA,UACA,gBAAAC;AAAA,UACA,mBAAAjB;AAAA,UACA,aAAAC;AAAA,UACA,sBAAAoB;AAAA,UACA,WAAAhC;AAAA,UACA,aAAaiF,aAAUlF,CAAW;AAAA,UAClC,aAAAS;AAAA,UACA,YAAAC;AAAA,UACA,UAAAH;AAAA,UACA,cAAAI;AAAA,QAAA;AAAA,MACF;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAsE,KAAenF;"}
|
1
|
+
{"version":3,"file":"milestone-list-container.js","sources":["../../../../src/features/milestone/milestone-list-container/milestone-list-container.tsx"],"sourcesContent":["import type {\n IMilestoneContainerProps,\n IMilestoneListQueryParams,\n} from './milestone-list-container-types';\nimport type { IMilestoneData } from './milestone-list/milestone-list-types';\n\nimport { titleCase } from 'humanize-plus';\nimport React, { memo, useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport { EVENTS } from '../../communication/pub-sub/constants';\nimport { useInClassActionListener } from '../../communication/pub-sub/hooks';\nimport { invalidateHomeworks } from '../../homework/hw-card-list/api/get-homeworks';\nimport Separator from '../../ui/separator/separator';\nimport { invalidateMilestoneResources } from './api/get-milestone-resources';\nimport { useGetAllMilestonesdata, invalidateMilestonesData } from './api/get-milestones';\nimport { invalidateTestHelpData } from './api/get-tests-list';\nimport FilterMilestones from './filter-milestones';\nimport MilestoneList from './milestone-list/milestone-list';\nimport MilestoneLoader from './milestone-list/milestone-loader/milestone-loader';\nimport * as Styled from './styled';\n\nconst invalidateAllMilestones = (queryParams: IMilestoneListQueryParams) => {\n invalidateMilestonesData(queryParams);\n};\n\nconst MilestoneListContainer: React.FC<IMilestoneContainerProps> = memo(\n ({ studentName, studentId, studentClassroomId, ...restMilestoneListContainerProps }) => {\n const {\n milestoneType,\n isStudentPresent,\n isClassOngoing,\n userType,\n canCreatePlan,\n teacherName,\n parentName,\n courseStream,\n activeMilestoneId,\n activeTabId,\n onExpandPastMilestones,\n onAddOutcome,\n onChapterClick,\n onEdit,\n onCreateMilestoneTest,\n onDraftPublish,\n onAddChapter,\n onCreatePlan,\n onDelete,\n onAssignResources,\n onNodeAttempt,\n onNodeView,\n onNodeReview,\n onNodeReattempt,\n onNodeReset,\n onNodeUnassign,\n onTestPreview,\n onTestReview,\n onTestStart,\n onWidgetTabSelection,\n } = restMilestoneListContainerProps;\n\n const queryParams: IMilestoneListQueryParams = useMemo(\n () =>\n ({\n milestone_state_group:\n milestoneType === 'ACTIVE'\n ? userType === 'TEACHER'\n ? 'LIVE'\n : 'STUDENT_LIVE'\n : milestoneType,\n course_stream: courseStream,\n student_id: studentId,\n }) as const,\n [milestoneType, courseStream, studentId, userType],\n );\n\n const {\n data: milestoneData,\n getAll: getMilestoneData,\n isStale: isMilestoneDataStale,\n isProcessing: isMilestoneProcessing,\n } = useGetAllMilestonesdata(queryParams);\n\n const [filteredMilestones, setFilteredMilestones] = useState<IMilestoneData[] | undefined>();\n const [isFiltersAdded, setIsFiltersAdded] = useState<boolean>(false);\n\n const handleFilterMilestones = useCallback(\n (data: { searchText?: string; selectedBoard?: string; selectedGrade?: string }) => {\n const { searchText, selectedBoard, selectedGrade } = data || {};\n\n if (searchText || selectedBoard || selectedGrade) {\n setIsFiltersAdded(true);\n }\n\n const filteredData = milestoneData?.filter(item => {\n const { milestone_name: milestoneName, board, grade } = item || {};\n const matchesSearchText = searchText\n ? milestoneName.toLowerCase().includes(searchText.toLowerCase())\n : true;\n const matchesCurriculum = selectedBoard ? board === selectedBoard : true;\n const matchesGrade = selectedGrade ? grade === selectedGrade : true;\n\n return matchesSearchText && matchesCurriculum && matchesGrade;\n });\n\n setFilteredMilestones(filteredData);\n },\n [milestoneData],\n );\n\n const handleClearFilter = () => {\n setIsFiltersAdded(false);\n setFilteredMilestones(undefined);\n };\n\n useInClassActionListener(\n {\n studentClassroomId,\n actions: [\n [EVENTS.CHAPTER_UPDATED],\n [EVENTS.LESSONS_MARKED_AS_FAMILIAR],\n [EVENTS.LESSONS_MARKED_AS_IRRELEVANT],\n [EVENTS.LESSONS_PROGRESS_RESET],\n [EVENTS.UNLOCK_SHEETS],\n [EVENTS.EXTRA_PRACTICE_ASSIGNED],\n [EVENTS.MILESTONE_DATE_UPDATED],\n [EVENTS.MILESTONE_DELETED],\n [EVENTS.MILESTONE_NAME_UPDATED],\n [EVENTS.MILESTONE_EDITED],\n [EVENTS.MILESTONE_RESOURCE_ASSIGNED],\n [EVENTS.MILESTONE_RESOURCE_UNASSIGNED],\n [EVENTS.MILESTONE_RESOURCE_RESET],\n [EVENTS.SHEET_UNASSIGNED],\n [EVENTS.GOAL_CREATED],\n [EVENTS.GOAL_EDITED],\n [EVENTS.GOAL_DELETED],\n [EVENTS.GOAL_OUTCOME_ADDED],\n [EVENTS.PAST_MILESTONE_OUTCOME_ADDED],\n [EVENTS.MILESTONE_TEST_ASSIGNED],\n ],\n callback: messages => {\n const milestoneResourceEventPayload = messages.find(\n message =>\n message.eventName === EVENTS.MILESTONE_RESOURCE_ASSIGNED ||\n message.eventName === EVENTS.MILESTONE_RESOURCE_UNASSIGNED,\n )?.eventPayload;\n const milestoneTestEventPayload = messages.find(\n message => message.eventName === EVENTS.MILESTONE_TEST_ASSIGNED,\n )?.eventPayload;\n\n if (milestoneResourceEventPayload) {\n const { milestoneId: resourceMilestoneId } =\n (milestoneResourceEventPayload as { milestoneId: string }) || {};\n\n invalidateHomeworks(studentId);\n invalidateMilestoneResources(resourceMilestoneId);\n }\n\n if (milestoneTestEventPayload) {\n const { milestoneId } = milestoneTestEventPayload as { milestoneId: string };\n\n invalidateHomeworks(studentId);\n invalidateTestHelpData(milestoneId);\n }\n\n invalidateAllMilestones(queryParams);\n },\n },\n (milestoneType === 'ACTIVE' || milestoneType === 'INACTIVE') && isStudentPresent,\n );\n\n useEffect(() => {\n getMilestoneData(queryParams);\n }, [getMilestoneData, queryParams]);\n\n useEffect(() => {\n if (!isMilestoneProcessing && isMilestoneDataStale) {\n getMilestoneData(queryParams);\n }\n }, [getMilestoneData, queryParams, isMilestoneDataStale, isMilestoneProcessing]);\n\n if (isMilestoneProcessing && !milestoneData) {\n return <MilestoneLoader numMilestones={2} />;\n }\n\n const showFilters = milestoneType === 'ACTIVE' && milestoneData && milestoneData.length > 6;\n\n return (\n <Styled.ContentWrapper $disablePointerEvents={isMilestoneProcessing}>\n {isMilestoneProcessing && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loading\" />\n </Styled.LoaderWrapper>\n )}\n {showFilters && (\n <>\n <FilterMilestones\n filteredMilestones={filteredMilestones}\n milestones={milestoneData}\n handleFilterMilestones={handleFilterMilestones}\n handleClearFilter={handleClearFilter}\n />\n <Separator heightX={1.5} />\n </>\n )}\n\n <MilestoneList\n showFilters={!!showFilters}\n canCreatePlan={canCreatePlan}\n isClassOngoing={isClassOngoing}\n isFiltersAdded={isFiltersAdded}\n isStudentPresent={isStudentPresent}\n milestoneType={milestoneType}\n milestones={isFiltersAdded ? filteredMilestones : milestoneData}\n onAddChapter={onAddChapter}\n onAddOutcome={onAddOutcome}\n onChapterClick={onChapterClick}\n onCreatePlan={onCreatePlan}\n onDelete={onDelete}\n onDraftPublish={onDraftPublish}\n onEdit={onEdit}\n onExpandPastMilestones={onExpandPastMilestones}\n onCreateMilestoneTest={onCreateMilestoneTest}\n onAssignResources={onAssignResources}\n onTestPreview={onTestPreview}\n onTestReview={onTestReview}\n onTestStart={onTestStart}\n onNodeAttempt={onNodeAttempt}\n onNodeView={onNodeView}\n onNodeReview={onNodeReview}\n onNodeReattempt={onNodeReattempt}\n onNodeReset={onNodeReset}\n onNodeUnassign={onNodeUnassign}\n activeMilestoneId={activeMilestoneId}\n activeTabId={activeTabId}\n onWidgetTabSelection={onWidgetTabSelection}\n studentId={studentId}\n studentName={titleCase(studentName)}\n teacherName={teacherName}\n parentName={parentName}\n userType={userType}\n courseStream={courseStream}\n />\n </Styled.ContentWrapper>\n );\n },\n);\n\nexport default MilestoneListContainer;\n"],"names":["invalidateAllMilestones","queryParams","invalidateMilestonesData","MilestoneListContainer","memo","studentName","studentId","studentClassroomId","restMilestoneListContainerProps","milestoneType","isStudentPresent","isClassOngoing","userType","canCreatePlan","teacherName","parentName","courseStream","activeMilestoneId","activeTabId","onExpandPastMilestones","onAddOutcome","onChapterClick","onEdit","onCreateMilestoneTest","onDraftPublish","onAddChapter","onCreatePlan","onDelete","onAssignResources","onNodeAttempt","onNodeView","onNodeReview","onNodeReattempt","onNodeReset","onNodeUnassign","onTestPreview","onTestReview","onTestStart","onWidgetTabSelection","useMemo","milestoneData","getMilestoneData","isMilestoneDataStale","isMilestoneProcessing","useGetAllMilestonesdata","filteredMilestones","setFilteredMilestones","useState","isFiltersAdded","setIsFiltersAdded","handleFilterMilestones","useCallback","data","searchText","selectedBoard","selectedGrade","filteredData","item","milestoneName","board","grade","handleClearFilter","useInClassActionListener","EVENTS","messages","milestoneResourceEventPayload","_a","message","milestoneTestEventPayload","_b","resourceMilestoneId","invalidateHomeworks","invalidateMilestoneResources","milestoneId","invalidateTestHelpData","useEffect","jsx","MilestoneLoader","showFilters","jsxs","Styled.ContentWrapper","Styled.LoaderWrapper","ILLUSTRATIONS","Fragment","FilterMilestones","Separator","MilestoneList","titleCase"],"mappings":";;;;;;;;;;;;;;;AAsBA,MAAMA,KAA0B,CAACC,MAA2C;AAC1E,EAAAC,GAAyBD,CAAW;AACtC,GAEME,KAA6DC;AAAA,EACjE,CAAC,EAAE,aAAAC,GAAa,WAAAC,GAAW,oBAAAC,GAAoB,GAAGC,QAAsC;AAChF,UAAA;AAAA,MACJ,eAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,UAAAC;AAAA,MACA,eAAAC;AAAA,MACA,aAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,aAAAC;AAAA,MACA,wBAAAC;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,QAAAC;AAAA,MACA,uBAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,cAAAC;AAAA,MACA,cAAAC;AAAA,MACA,UAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,aAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,cAAAC;AAAA,MACA,aAAAC;AAAA,MACA,sBAAAC;AAAA,IACE,IAAA9B,GAEEP,IAAyCsC;AAAA,MAC7C,OACG;AAAA,QACC,uBACE9B,MAAkB,WACdG,MAAa,YACX,SACA,iBACFH;AAAA,QACN,eAAeO;AAAA,QACf,YAAYV;AAAA,MAAA;AAAA,MAEhB,CAACG,GAAeO,GAAcV,GAAWM,CAAQ;AAAA,IAAA,G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,CAAW;AAAA,UAClC,aAAAS;AAAA,UACA,YAAAC;AAAA,UACA,UAAAH;AAAA,UACA,cAAAI;AAAA,QAAA;AAAA,MACF;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAsE,KAAenF;"}
|
@@ -38,7 +38,7 @@ const R = (e) => {
|
|
38
38
|
total_questions: n,
|
39
39
|
worksheet_id: u,
|
40
40
|
is_timed: _
|
41
|
-
} = s, f = Math.ceil((h || 0) / 60), I = R(p), E = _ ? `${f} Mins` : "", $ = `${n ? `${n} ${S.pluralize(n, "Question")}` : ""} ${E}`;
|
41
|
+
} = s, f = Math.ceil((h || 0) / 60), I = R(p), E = _ ? `${f} Mins` : "", $ = `${n ? `${n} ${S.pluralize(n, "Question")}` : ""}, ${E}`;
|
42
42
|
return /* @__PURE__ */ t(
|
43
43
|
N,
|
44
44
|
{
|
@@ -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 topics = new Set<string>();\n\n items?.forEach(item => {\n topics.add(item.chapter_name);\n });\n\n return Array.from(topics).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 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","topics","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,MAA0C;AACjE,QAAAC,wBAAa;AAEnB,SAAAD,KAAA,QAAAA,EAAO,QAAQ,CAAQE,MAAA;AACd,IAAAD,EAAA,IAAIC,EAAK,YAAY;AAAA,EAAA,IAGvB,MAAM,KAAKD,CAAM,EAAE,KAAK,IAAI;AACrC,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,
|
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 topics = new Set<string>();\n\n items?.forEach(item => {\n topics.add(item.chapter_name);\n });\n\n return Array.from(topics).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 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","topics","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,MAA0C;AACjE,QAAAC,wBAAa;AAEnB,SAAAD,KAAA,QAAAA,EAAO,QAAQ,CAAQE,MAAA;AACd,IAAAD,EAAA,IAAIC,EAAK,YAAY;AAAA,EAAA,IAGvB,MAAM,KAAKD,CAAM,EAAE,KAAK,IAAI;AACrC,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,GAA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,cAAcL;AAAA,gBAChB;AAAA,cAAA;AAAA,YAAA,GAEJ;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAKV;"}
|
@@ -18,7 +18,7 @@ const w = x.div`
|
|
18
18
|
is_timed: l,
|
19
19
|
sheet_time: c,
|
20
20
|
total_questions: e
|
21
|
-
} = o, u = Math.ceil((c || 0) / 60), i = e ? `${e} ${f.pluralize(e, "Question")}` : "", h = l ? `${i} ${u} Mins` : i;
|
21
|
+
} = o, u = Math.ceil((c || 0) / 60), i = e ? `${e} ${f.pluralize(e, "Question")}` : "", h = l ? `${i}, ${u} Mins` : i;
|
22
22
|
return /* @__PURE__ */ t(
|
23
23
|
_,
|
24
24
|
{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"resource-list.js","sources":["../../../../src/features/sheet-v2/resource-list/resource-list.tsx"],"sourcesContent":["import type { IResourcesListProps } from './types';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport { memo } from 'react';\nimport styled from 'styled-components';\n\nimport HomeworkCard from '../../homework/homework-card';\nimport FlexView from '../../ui/layout/flex-view';\n\nconst ResourceItemListWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(3, 200px);\n grid-gap: 32px;\n justify-content: center;\n padding: 32px 0;\n`;\n\nconst ResourcesList: FC<IResourcesListProps> = ({ sheets, userType, ...sheetCallBacks }) => (\n <FlexView>\n <ResourceItemListWrapper>\n {sheets.map((sheet, idx) => {\n const {\n title,\n node_id: nodeId,\n worksheet_id: worksheetId,\n is_timed: isTimed,\n sheet_time: sheetTime,\n total_questions: totalQuestions,\n } = sheet;\n const totalSheetTime = Math.ceil((sheetTime || 0) / 60);\n const totalQuestionsText = totalQuestions\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}`\n : '';\n const subHeader = isTimed\n ? `${totalQuestionsText} ${totalSheetTime} Mins`\n : totalQuestionsText;\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n header={title}\n subHeader={subHeader}\n userType={userType}\n nodeData={sheet}\n renderAs=\"milestone\"\n shouldOpenOnRight={(idx + 1) % 3 === 0}\n {...sheetCallBacks}\n />\n );\n })}\n </ResourceItemListWrapper>\n </FlexView>\n);\n\nexport default memo(ResourcesList);\n"],"names":["ResourceItemListWrapper","styled","ResourcesList","sheets","userType","sheetCallBacks","jsx","FlexView","sheet","idx","title","nodeId","worksheetId","isTimed","sheetTime","totalQuestions","totalSheetTime","totalQuestionsText","pluralize","subHeader","HomeworkCard","ResourcesList$1","memo"],"mappings":";;;;;;AAUA,MAAMA,IAA0BC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAyC,CAAC,EAAE,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,EAAe,MACnF,gBAAAC,EAAAC,GAAA,EACC,4BAACP,GACE,EAAA,UAAAG,EAAO,IAAI,CAACK,GAAOC,MAAQ;AACpB,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,SAASC;AAAA,IACT,cAAcC;AAAA,IACd,UAAUC;AAAA,IACV,YAAYC;AAAA,IACZ,iBAAiBC;AAAA,EACf,IAAAP,GACEQ,IAAiB,KAAK,MAAMF,KAAa,KAAK,EAAE,GAChDG,IAAqBF,IACvB,GAAGA,CAAc,IAAIG,EAAU,UAAAH,GAAgB,UAAU,CAAC,KAC1D,IACEI,IAAYN,IACd,GAAGI,CAAkB,
|
1
|
+
{"version":3,"file":"resource-list.js","sources":["../../../../src/features/sheet-v2/resource-list/resource-list.tsx"],"sourcesContent":["import type { IResourcesListProps } from './types';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport { memo } from 'react';\nimport styled from 'styled-components';\n\nimport HomeworkCard from '../../homework/homework-card';\nimport FlexView from '../../ui/layout/flex-view';\n\nconst ResourceItemListWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(3, 200px);\n grid-gap: 32px;\n justify-content: center;\n padding: 32px 0;\n`;\n\nconst ResourcesList: FC<IResourcesListProps> = ({ sheets, userType, ...sheetCallBacks }) => (\n <FlexView>\n <ResourceItemListWrapper>\n {sheets.map((sheet, idx) => {\n const {\n title,\n node_id: nodeId,\n worksheet_id: worksheetId,\n is_timed: isTimed,\n sheet_time: sheetTime,\n total_questions: totalQuestions,\n } = sheet;\n const totalSheetTime = Math.ceil((sheetTime || 0) / 60);\n const totalQuestionsText = totalQuestions\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}`\n : '';\n const subHeader = isTimed\n ? `${totalQuestionsText}, ${totalSheetTime} Mins`\n : totalQuestionsText;\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n header={title}\n subHeader={subHeader}\n userType={userType}\n nodeData={sheet}\n renderAs=\"milestone\"\n shouldOpenOnRight={(idx + 1) % 3 === 0}\n {...sheetCallBacks}\n />\n );\n })}\n </ResourceItemListWrapper>\n </FlexView>\n);\n\nexport default memo(ResourcesList);\n"],"names":["ResourceItemListWrapper","styled","ResourcesList","sheets","userType","sheetCallBacks","jsx","FlexView","sheet","idx","title","nodeId","worksheetId","isTimed","sheetTime","totalQuestions","totalSheetTime","totalQuestionsText","pluralize","subHeader","HomeworkCard","ResourcesList$1","memo"],"mappings":";;;;;;AAUA,MAAMA,IAA0BC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAyC,CAAC,EAAE,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,EAAe,MACnF,gBAAAC,EAAAC,GAAA,EACC,4BAACP,GACE,EAAA,UAAAG,EAAO,IAAI,CAACK,GAAOC,MAAQ;AACpB,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,SAASC;AAAA,IACT,cAAcC;AAAA,IACd,UAAUC;AAAA,IACV,YAAYC;AAAA,IACZ,iBAAiBC;AAAA,EACf,IAAAP,GACEQ,IAAiB,KAAK,MAAMF,KAAa,KAAK,EAAE,GAChDG,IAAqBF,IACvB,GAAGA,CAAc,IAAIG,EAAU,UAAAH,GAAgB,UAAU,CAAC,KAC1D,IACEI,IAAYN,IACd,GAAGI,CAAkB,KAAKD,CAAc,UACxCC;AAGF,SAAA,gBAAAX;AAAA,IAACc;AAAA,IAAA;AAAA,MAEC,QAAQV;AAAA,MACR,WAAAS;AAAA,MACA,UAAAf;AAAA,MACA,UAAUI;AAAA,MACV,UAAS;AAAA,MACT,oBAAoBC,IAAM,KAAK,MAAM;AAAA,MACpC,GAAGJ;AAAA,IAAA;AAAA,IAPC,GAAGO,CAAW,IAAID,CAAM,IAAIF,CAAG;AAAA,EAAA;AAU1C,CAAC,GACH,EACF,CAAA,GAGaY,IAAAC,EAAKpB,CAAa;"}
|