@cuemath/leap 2.9.9-as3 → 2.9.9-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 +28 -28
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +92 -93
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js +1 -2
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +5 -5
- 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 +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 +2 -2
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/circle-games/games/tutorial/constants.js +2 -2
- package/dist/features/circle-games/games/tutorial/constants.js.map +1 -1
- package/dist/features/circle-games/games/tutorial/tutorial-styled.js +6 -6
- package/dist/features/circle-games/games/tutorial/tutorial-styled.js.map +1 -1
- package/dist/features/circle-games/games/web-view/web-view.js +52 -45
- package/dist/features/circle-games/games/web-view/web-view.js.map +1 -1
- package/dist/features/circle-games/leaderboard/comps/banner/banner.js +6 -6
- package/dist/features/circle-games/leaderboard/comps/banner/banner.js.map +1 -1
- package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button-styled.js +1 -1
- package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button-styled.js.map +1 -1
- package/dist/features/circle-games/leaderboard/leaderboard-styled.js +1 -1
- package/dist/features/circle-games/leaderboard/leaderboard-styled.js.map +1 -1
- package/dist/features/circle-games/leaderboard/leaderboard.js +9 -9
- package/dist/features/circle-games/leaderboard/leaderboard.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js +8 -8
- package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js.map +1 -1
- package/dist/features/circle-games/sign-up/constants.js +9 -9
- package/dist/features/circle-games/sign-up/constants.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +157 -0
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -0
- package/dist/features/homework/hw-card-list/hw-card-list.js +58 -182
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/journey/comps/coachmark/coachmark-styled.js +22 -11
- package/dist/features/journey/comps/coachmark/coachmark-styled.js.map +1 -1
- package/dist/features/journey/hooks/use-chapter-journey.js +93 -93
- package/dist/features/journey/hooks/use-chapter-journey.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey.js +197 -107
- package/dist/features/journey/hooks/use-home-page-journey.js.map +1 -1
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +587 -0
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -0
- package/dist/features/journey/mocks/home-page-homwworks-mock.js +268 -0
- package/dist/features/journey/mocks/home-page-homwworks-mock.js.map +1 -0
- package/dist/features/journey/mocks/recent-chapters-mock.js +531 -0
- package/dist/features/journey/mocks/recent-chapters-mock.js.map +1 -0
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
- package/dist/features/ui/arc-button/constants.js +4 -4
- package/dist/features/ui/arc-button/constants.js.map +1 -1
- package/dist/index.d.ts +7 -9
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"teacher-actions.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../../ui/lottie-animation/types';\nimport type { INodeCardProps } from '../node-card-types';\nimport type { INodeMenuOption } from '../node-menu-options/node-menu-options-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useRef } from 'react';\n\nimport Check2Icon from '../../../../../assets/line-icons/icons/check2';\nimport Eye2Icon from '../../../../../assets/line-icons/icons/eye2';\nimport Home2Icon from '../../../../../assets/line-icons/icons/home2';\nimport MoreVerticalIcon from '../../../../../assets/line-icons/icons/more-vertical';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport useContextMenuClickHandler from '../../../../ui/hooks/use-context-menu-click-handler';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Text from '../../../../ui/text/text';\nimport { BLOCK_TYPE } from '../../../constants/block-constants';\nimport { NODE_CARD_STATES, TEACHER_MENU_LABELS } from '../../../constants/node-constants';\nimport { getNodeTypeBasedBgImage } from '../../../utils';\nimport { getNodeCardBasedIcon } from '../../../utils/node-card-utils';\nimport BorderPathAnimation from '../border-path-animation';\nimport * as Styled from '../node-card-styled';\nimport NodeCardTags from '../node-card-tags';\nimport NodeMenuOptions from '../node-menu-options/node-menu-options';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\nconst { ASSIGN_AS_HW, REVIEW, VIEW, MARK_AS_DONE } = TEACHER_MENU_LABELS;\n\nconst TeacherActions: FC<Omit<INodeCardProps, 'userType'>> = memo(\n ({\n nodeData,\n imageHue,\n blockType,\n isSkipped,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeView,\n onNodeReview,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\n const {\n accuracy,\n attempt_location: attemptLocation,\n node_type: nodeType,\n card_header: cardHeader,\n title,\n state,\n is_optional: isOptional,\n sheet_statement: sheetStatement,\n permissions,\n user_attempt_id: userAttemptId,\n } = nodeData;\n\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n\n const {\n can_change_attempt_location: canChangeAttemptLocation,\n can_mark_familiar: canMarkFamiliar,\n can_review: canReview,\n } = permissions;\n\n const isGoalBlock = blockType === BLOCK_TYPE.GOAL;\n const sheetLocked = state === NODE_CARD_STATES.LOCKED;\n const sheetNotStarted = state === NODE_CARD_STATES.NOT_STARTED;\n const sheetInProgress = state === NODE_CARD_STATES.IN_PROGRESS;\n const inClassSheet = attemptLocation === 'INCLASS';\n\n const showCardAnimation = !isOptional && (sheetInProgress || sheetNotStarted);\n\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'node-card-view':\n if (canReview && userAttemptId) {\n onNodeReview?.(nodeData);\n } else {\n onNodeView?.(nodeData);\n }\n\n return;\n\n case 'node-card-assign-as-hw':\n onNodeAttemptLocationChange?.(nodeData);\n\n return;\n\n case 'node-card-mark-as-done':\n onNodeMarkAsDone?.(nodeData);\n\n return;\n default:\n throw new Error(`No callback function for ${optionId}`);\n }\n },\n [\n canReview,\n nodeData,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeReview,\n onNodeView,\n userAttemptId,\n ],\n );\n\n const handleOnMouseEnter = useCallback(() => {\n if (sheetLocked) return;\n animationRef.current?.play();\n }, [sheetLocked]);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\n }, []);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-view',\n label: canReview && userAttemptId ? REVIEW : VIEW,\n icon: Eye2Icon,\n disabled: false,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-assign-as-hw',\n label: ASSIGN_AS_HW,\n icon: Home2Icon,\n disabled: !canChangeAttemptLocation || !inClassSheet,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-mark-as-done',\n label: MARK_AS_DONE,\n icon: Check2Icon,\n disabled: !canMarkFamiliar,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n return (\n <Styled.NodeCardContainer\n $showOutline={!showCardAnimation}\n $isSheetLocked={sheetLocked}\n $background={`${imageHue}_2`}\n $disabled={Boolean(isSkipped)}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem={sheetStatement}\n position=\"bottom\"\n zIndex={5}\n hidden={!sheetStatement}\n parentWidth=\"100%\"\n widthX={11.25}\n >\n <Styled.NodeCardInfoWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $width=\"100%\"\n $heightX={3.5}\n $bgImage={nodeBgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n <LottieAnimation src={nodeCardLottie} ref={animationRef} settings={renderSettings} />\n {!isOptional && <Styled.StyledImportantIcon />}\n </Styled.IconWrapper>\n\n <Text $renderAs=\"ac4-black\" $color=\"BLACK\" $opacity={sheetLocked ? 0.5 : 1}>\n {cardHeader} {inClassSheet && `• CW`}\n </Text>\n\n <FlexView className=\"context-menu\">\n {isGoalBlock && (\n <Styled.NodeKebabMenuWrapper ref={containerRef} onClick={onMenuClick}>\n <MoreVerticalIcon width={16} height={16} />\n </Styled.NodeKebabMenuWrapper>\n )}\n </FlexView>\n\n {showCardAnimation && !isSkipped && <BorderPathAnimation />}\n </Styled.NodeCardInfoWrapper>\n\n <NodeCardTags nodeType={nodeType} state={state} accuracy={accuracy} />\n\n {!isGoalBlock && (\n <Styled.NodeCardContentWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $background=\"WHITE_1\"\n $flexGap={8}\n $heightX={4}\n $justifyContent=\"space-between\"\n >\n <Styled.NodeCardTitle\n $renderAs=\"ab3\"\n $color=\"BLACK_1\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n {title}\n </Styled.NodeCardTitle>\n\n <Styled.NodeKebabMenuWrapper ref={containerRef} onClick={onMenuClick}>\n <MoreVerticalIcon width={16} height={16} />\n </Styled.NodeKebabMenuWrapper>\n </Styled.NodeCardContentWrapper>\n )}\n </ArrowTooltip>\n\n <Styled.NodeMenuOptionsWrapper $visible={menuVisible}>\n <NodeMenuOptions options={menuOptions} />\n </Styled.NodeMenuOptionsWrapper>\n </Styled.NodeCardContainer>\n );\n },\n);\n\nexport default TeacherActions;\n"],"names":["renderSettings","ASSIGN_AS_HW","REVIEW","VIEW","MARK_AS_DONE","TEACHER_MENU_LABELS","TeacherActions","memo","nodeData","imageHue","blockType","isSkipped","onNodeAttemptLocationChange","onNodeMarkAsDone","onNodeView","onNodeReview","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","accuracy","attemptLocation","nodeType","cardHeader","title","state","isOptional","sheetStatement","permissions","userAttemptId","nodeCardLottie","getNodeCardBasedIcon","animationRef","canChangeAttemptLocation","canMarkFamiliar","canReview","isGoalBlock","BLOCK_TYPE","sheetLocked","NODE_CARD_STATES","sheetNotStarted","sheetInProgress","inClassSheet","showCardAnimation","nodeBgImage","getNodeTypeBasedBgImage","handleOnMenuOptionClick","useCallback","optionId","handleOnMouseEnter","_a","handleOnMouseLeave","menuOptions","Eye2Icon","Home2Icon","Check2Icon","jsxs","Styled.NodeCardContainer","ArrowTooltip","Styled.NodeCardInfoWrapper","Styled.IconWrapper","jsx","LottieAnimation","Styled.StyledImportantIcon","Text","FlexView","Styled.NodeKebabMenuWrapper","MoreVerticalIcon","BorderPathAnimation","NodeCardTags","Styled.NodeCardContentWrapper","Styled.NodeCardTitle","Styled.NodeMenuOptionsWrapper","NodeMenuOptions"],"mappings":";;;;;;;;;;;;;;;;;;;AAyB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E,CAACgB,KACA,gBAAAoB;AAAA,kBAACc;AAAAA,kBAAA;AAAA,oBACC,gBAAe;AAAA,oBACf,aAAY;AAAA,oBACZ,aAAY;AAAA,oBACZ,UAAU;AAAA,oBACV,UAAU;AAAA,oBACV,iBAAgB;AAAA,oBAEhB,UAAA;AAAA,sBAAA,gBAAAT;AAAA,wBAACU;AAAAA,wBAAA;AAAA,0BACC,WAAU;AAAA,0BACV,QAAO;AAAA,0BACP,UAAUjC,IAAc,MAAM;AAAA,0BAE7B,UAAAd;AAAA,wBAAA;AAAA,sBACH;AAAA,sBAEC,gBAAAqC,EAAAK,GAAA,EAA4B,KAAKnD,GAAc,SAASG,GACvD,UAAA,gBAAA2C,EAACM,GAAiB,EAAA,OAAO,IAAI,QAAQ,GAAI,CAAA,GAC3C;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACF;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,UAEA,gBAAAN,EAACW,IAAA,EAA8B,UAAUvD,GACvC,UAAC,gBAAA4C,EAAAY,IAAA,EAAgB,SAASrB,EAAA,CAAa,EACzC,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
1
|
+
{"version":3,"file":"teacher-actions.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../../ui/lottie-animation/types';\nimport type { INodeCardProps } from '../node-card-types';\nimport type { INodeMenuOption } from '../node-menu-options/node-menu-options-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useRef } from 'react';\n\nimport Check2Icon from '../../../../../assets/line-icons/icons/check2';\nimport Eye2Icon from '../../../../../assets/line-icons/icons/eye2';\nimport Home2Icon from '../../../../../assets/line-icons/icons/home2';\nimport MoreVerticalIcon from '../../../../../assets/line-icons/icons/more-vertical';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport useContextMenuClickHandler from '../../../../ui/hooks/use-context-menu-click-handler';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Text from '../../../../ui/text/text';\nimport { BLOCK_TYPE } from '../../../constants/block-constants';\nimport { NODE_CARD_STATES, TEACHER_MENU_LABELS } from '../../../constants/node-constants';\nimport { getNodeTypeBasedBgImage } from '../../../utils';\nimport { getNodeCardBasedIcon } from '../../../utils/node-card-utils';\nimport BorderPathAnimation from '../border-path-animation';\nimport * as Styled from '../node-card-styled';\nimport NodeCardTags from '../node-card-tags';\nimport NodeMenuOptions from '../node-menu-options/node-menu-options';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\nconst { ASSIGN_AS_HW, REVIEW, VIEW, MARK_AS_DONE } = TEACHER_MENU_LABELS;\n\nconst TeacherActions: FC<Omit<INodeCardProps, 'userType'>> = memo(\n ({\n nodeData,\n imageHue,\n blockType,\n isSkipped,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeView,\n onNodeReview,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\n const {\n accuracy,\n attempt_location: attemptLocation,\n node_type: nodeType,\n card_header: cardHeader,\n title,\n state,\n is_optional: isOptional,\n sheet_statement: sheetStatement,\n permissions,\n user_attempt_id: userAttemptId,\n } = nodeData;\n\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n\n const {\n can_change_attempt_location: canChangeAttemptLocation,\n can_mark_familiar: canMarkFamiliar,\n can_review: canReview,\n } = permissions;\n\n const isGoalBlock = blockType === BLOCK_TYPE.GOAL;\n const sheetLocked = state === NODE_CARD_STATES.LOCKED;\n const sheetNotStarted = state === NODE_CARD_STATES.NOT_STARTED;\n const sheetInProgress = state === NODE_CARD_STATES.IN_PROGRESS;\n const inClassSheet = attemptLocation === 'INCLASS';\n\n const showCardAnimation = !isOptional && (sheetInProgress || sheetNotStarted);\n\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'node-card-view':\n if (canReview && userAttemptId) {\n onNodeReview?.(nodeData);\n } else {\n onNodeView?.(nodeData);\n }\n\n return;\n\n case 'node-card-assign-as-hw':\n onNodeAttemptLocationChange?.(nodeData);\n\n return;\n\n case 'node-card-mark-as-done':\n onNodeMarkAsDone?.(nodeData);\n\n return;\n default:\n throw new Error(`No callback function for ${optionId}`);\n }\n },\n [\n canReview,\n nodeData,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeReview,\n onNodeView,\n userAttemptId,\n ],\n );\n\n const handleOnMouseEnter = useCallback(() => {\n if (sheetLocked) return;\n animationRef.current?.play();\n }, [sheetLocked]);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\n }, []);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-view',\n label: canReview && userAttemptId ? REVIEW : VIEW,\n icon: Eye2Icon,\n disabled: false,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-assign-as-hw',\n label: ASSIGN_AS_HW,\n icon: Home2Icon,\n disabled: !canChangeAttemptLocation || !inClassSheet,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-mark-as-done',\n label: MARK_AS_DONE,\n icon: Check2Icon,\n disabled: !canMarkFamiliar,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n return (\n <Styled.NodeCardContainer\n $showOutline={!showCardAnimation}\n $isSheetLocked={sheetLocked}\n $background={`${imageHue}_2`}\n $disabled={Boolean(isSkipped)}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem={sheetStatement}\n position=\"bottom\"\n zIndex={5}\n hidden={!sheetStatement}\n parentWidth=\"100%\"\n widthX={11.25}\n >\n <Styled.NodeCardInfoWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $width=\"100%\"\n $heightX={3.5}\n $bgImage={nodeBgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n <LottieAnimation src={nodeCardLottie} ref={animationRef} settings={renderSettings} />\n {!isOptional && <Styled.StyledImportantIcon />}\n </Styled.IconWrapper>\n\n <Text $renderAs=\"ac4-black\" $color=\"BLACK\" $opacity={sheetLocked ? 0.5 : 1}>\n {cardHeader} {inClassSheet && `• CW`}\n </Text>\n\n <FlexView className=\"context-menu\">\n {isGoalBlock && (\n <Styled.NodeKebabMenuWrapper ref={containerRef} onClick={onMenuClick}>\n <MoreVerticalIcon width={16} height={16} />\n </Styled.NodeKebabMenuWrapper>\n )}\n </FlexView>\n\n {showCardAnimation && !isSkipped && <BorderPathAnimation />}\n </Styled.NodeCardInfoWrapper>\n\n <NodeCardTags nodeType={nodeType} state={state} accuracy={accuracy} />\n\n {!isGoalBlock && (\n <Styled.NodeCardContentWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $background=\"WHITE_1\"\n $flexGap={8}\n $heightX={4}\n $justifyContent=\"space-between\"\n >\n <Styled.NodeCardTitle\n $renderAs=\"ab3\"\n $color=\"BLACK_1\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n {title}\n </Styled.NodeCardTitle>\n\n <Styled.NodeKebabMenuWrapper ref={containerRef} onClick={onMenuClick}>\n <MoreVerticalIcon width={16} height={16} />\n </Styled.NodeKebabMenuWrapper>\n </Styled.NodeCardContentWrapper>\n )}\n </ArrowTooltip>\n\n <Styled.NodeMenuOptionsWrapper $visible={menuVisible}>\n <NodeMenuOptions options={menuOptions} />\n </Styled.NodeMenuOptionsWrapper>\n </Styled.NodeCardContainer>\n );\n },\n);\n\nexport default TeacherActions;\n"],"names":["renderSettings","ASSIGN_AS_HW","REVIEW","VIEW","MARK_AS_DONE","TEACHER_MENU_LABELS","TeacherActions","memo","nodeData","imageHue","blockType","isSkipped","onNodeAttemptLocationChange","onNodeMarkAsDone","onNodeView","onNodeReview","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","accuracy","attemptLocation","nodeType","cardHeader","title","state","isOptional","sheetStatement","permissions","userAttemptId","nodeCardLottie","getNodeCardBasedIcon","animationRef","canChangeAttemptLocation","canMarkFamiliar","canReview","isGoalBlock","BLOCK_TYPE","sheetLocked","NODE_CARD_STATES","sheetNotStarted","sheetInProgress","inClassSheet","showCardAnimation","nodeBgImage","getNodeTypeBasedBgImage","handleOnMenuOptionClick","useCallback","optionId","handleOnMouseEnter","_a","handleOnMouseLeave","menuOptions","Eye2Icon","Home2Icon","Check2Icon","jsxs","Styled.NodeCardContainer","ArrowTooltip","Styled.NodeCardInfoWrapper","Styled.IconWrapper","jsx","LottieAnimation","Styled.StyledImportantIcon","Text","FlexView","Styled.NodeKebabMenuWrapper","MoreVerticalIcon","BorderPathAnimation","NodeCardTags","Styled.NodeCardContentWrapper","Styled.NodeCardTitle","Styled.NodeMenuOptionsWrapper","NodeMenuOptions"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,MAAMA,KAAiB,EAAE,UAAU,UAAU,UAAU,GAAM,GACvD,EAAE,cAAAC,IAAc,QAAAC,IAAQ,MAAAC,IAAM,cAAAC,OAAiBC,IAE/CC,KAAuDC;AAAA,EAC3D,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAeC,EAAuB,IAAI,GAC1C,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAA2BJ,CAAY,GAEtE;AAAA,MACJ,U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BAAA2C,EAACM,GAAiB,EAAA,OAAO,IAAI,QAAQ,GAAI,CAAA,GAC3C;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACF;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,UAEA,gBAAAN,EAACW,IAAA,EAA8B,UAAUvD,GACvC,UAAC,gBAAA4C,EAAAY,IAAA,EAAgB,SAASrB,EAAA,CAAa,EACzC,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../../src/features/circle-games/games/tutorial/constants.ts"],"sourcesContent":["export const HEADER_HEIGHT = 64;\n"],"names":["HEADER_HEIGHT"],"mappings":"
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../src/features/circle-games/games/tutorial/constants.ts"],"sourcesContent":["export const HEADER_HEIGHT = 64 + (window.ReactNativeTopInset || 0);\n"],"names":["HEADER_HEIGHT"],"mappings":"AAAa,MAAAA,IAAgB,MAAM,OAAO,uBAAuB;"}
|
@@ -10,7 +10,7 @@ const n = o.div`
|
|
10
10
|
width: inherit;
|
11
11
|
`, d = o.div`
|
12
12
|
height: ${t}px;
|
13
|
-
padding-top:
|
13
|
+
padding-top: ${(window.ReactNativeTopInset || 0) + 24}px;
|
14
14
|
width: 100%;
|
15
15
|
background: ${({ theme: i }) => i.colors.WHITE_T_03};
|
16
16
|
backdrop-filter: blur(40px);
|
@@ -19,7 +19,7 @@ const n = o.div`
|
|
19
19
|
`, s = o.div`
|
20
20
|
position: absolute;
|
21
21
|
right: 16px;
|
22
|
-
top:
|
22
|
+
top: ${(window.ReactNativeTopInset || 0) + 22}px;
|
23
23
|
z-index: 1;
|
24
24
|
&:hover {
|
25
25
|
background: ${({ theme: i }) => i.colors.BLACK_4};
|
@@ -31,7 +31,7 @@ const n = o.div`
|
|
31
31
|
/* overflow: hidden; */
|
32
32
|
flex-grow: 1;
|
33
33
|
position: relative;
|
34
|
-
`,
|
34
|
+
`, p = o.div`
|
35
35
|
width: 100%;
|
36
36
|
position: absolute;
|
37
37
|
top: 0;
|
@@ -42,7 +42,7 @@ const n = o.div`
|
|
42
42
|
width: 100%;
|
43
43
|
height: 100%;
|
44
44
|
}
|
45
|
-
`,
|
45
|
+
`, l = o.div`
|
46
46
|
height: 40px;
|
47
47
|
width: 100%;
|
48
48
|
position: relative;
|
@@ -65,9 +65,9 @@ export {
|
|
65
65
|
d as GameTutorialHeader,
|
66
66
|
n as GameTutorialWrapper,
|
67
67
|
s as HeaderIconContainer,
|
68
|
-
|
68
|
+
p as VideoContainer,
|
69
69
|
c as VideoProgress,
|
70
70
|
h as VideoProgressContainer,
|
71
|
-
|
71
|
+
l as VideoProgressWrapper
|
72
72
|
};
|
73
73
|
//# sourceMappingURL=tutorial-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tutorial-styled.js","sources":["../../../../../src/features/circle-games/games/tutorial/tutorial-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { HEADER_HEIGHT } from './constants';\n\nexport const GameTutorialWrapper = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 250px;\n background: ${({ theme }) => theme.colors.BLACK_1};\n position: relative;\n width: inherit;\n`;\n\nexport const GameTutorialHeader = styled.div`\n height: ${HEADER_HEIGHT}px;\n padding-top:
|
1
|
+
{"version":3,"file":"tutorial-styled.js","sources":["../../../../../src/features/circle-games/games/tutorial/tutorial-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { HEADER_HEIGHT } from './constants';\n\nexport const GameTutorialWrapper = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 250px;\n background: ${({ theme }) => theme.colors.BLACK_1};\n position: relative;\n width: inherit;\n`;\n\nexport const GameTutorialHeader = styled.div`\n height: ${HEADER_HEIGHT}px;\n padding-top: ${(window.ReactNativeTopInset || 0) + 24}px;\n width: 100%;\n background: ${({ theme }) => theme.colors.WHITE_T_03};\n backdrop-filter: blur(40px);\n position: relative;\n flex-shrink: 0;\n`;\n\nexport const HeaderIconContainer = styled.div`\n position: absolute;\n right: 16px;\n top: ${(window.ReactNativeTopInset || 0) + 22}px;\n z-index: 1;\n &:hover {\n background: ${({ theme }) => theme.colors.BLACK_4};\n cursor: pointer;\n }\n`;\n\nexport const GameTutorialContainer = styled.div`\n display: flex;\n flex-direction: column;\n /* overflow: hidden; */\n flex-grow: 1;\n position: relative;\n`;\n\nexport const VideoContainer = styled.div`\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n & video {\n width: 100%;\n height: 100%;\n }\n`;\n\nexport const VideoProgressWrapper = styled.div`\n height: 40px;\n width: 100%;\n position: relative;\n display: flex;\n`;\n\nexport const VideoProgressContainer = styled.div`\n height: 2px;\n position: relative;\n width: 100%;\n z-index: 1;\n`;\n\nexport const VideoProgress = styled.div<{ $width: number }>`\n height: inherit;\n background: ${({ theme }) => theme.colors.WHITE};\n position: absolute;\n z-index: 2;\n width: ${({ $width }) => $width || 0}%;\n transition: width 0.4s linear;\n`;\n"],"names":["GameTutorialWrapper","styled","theme","GameTutorialHeader","HEADER_HEIGHT","HeaderIconContainer","GameTutorialContainer","VideoContainer","VideoProgressWrapper","VideoProgressContainer","VideoProgress","$width"],"mappings":";;AAIO,MAAMA,IAAsBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,gBAK1B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,GAKtCC,IAAqBF,EAAO;AAAA,YAC7BG,CAAa;AAAA,kBACP,OAAO,uBAAuB,KAAK,EAAE;AAAA;AAAA,gBAEvC,CAAC,EAAE,OAAAF,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA;AAAA,GAMzCG,IAAsBJ,EAAO;AAAA;AAAA;AAAA,UAGhC,OAAO,uBAAuB,KAAK,EAAE;AAAA;AAAA;AAAA,kBAG7B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,GAKxCI,IAAwBL,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQ/BM,IAAiBN,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAaxBO,IAAuBP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAO9BQ,IAAyBR,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAOhCS,IAAgBT,EAAO;AAAA;AAAA,gBAEpB,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA,WAGtC,CAAC,EAAE,QAAAS,QAAaA,KAAU,CAAC;AAAA;AAAA;"}
|
@@ -1,28 +1,30 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { forwardRef as
|
1
|
+
import { jsxs as h, jsx as v } from "react/jsx-runtime";
|
2
|
+
import { forwardRef as P, useRef as G, useMemo as _, useCallback as T, useImperativeHandle as x, useEffect as B } from "react";
|
3
3
|
import { useUIContext as J } from "../../../ui/context/context.js";
|
4
|
-
import
|
4
|
+
import U from "../../../ui/layout/flex-view.js";
|
5
|
+
import C from "../../../ui/separator/separator.js";
|
6
|
+
import { ALLOWED_ORIGIN as b } from "./constants.js";
|
5
7
|
import { ProjectType as s } from "./enums/project-type-enum.js";
|
6
8
|
import { WebViewEvent as o } from "./enums/web-view-events-enum.js";
|
7
|
-
const
|
9
|
+
const X = P((L, M) => {
|
8
10
|
const {
|
9
|
-
baseUrl:
|
10
|
-
projectDetails:
|
11
|
-
playerDetails:
|
11
|
+
baseUrl: g,
|
12
|
+
projectDetails: y,
|
13
|
+
playerDetails: E,
|
12
14
|
onGameLoad: a,
|
13
15
|
onGamePlayFinish: c,
|
14
16
|
handleInfoMessage: p,
|
15
17
|
onBack: f,
|
16
|
-
parentDomain:
|
17
|
-
...
|
18
|
-
} =
|
18
|
+
parentDomain: N,
|
19
|
+
...V
|
20
|
+
} = L, m = G(null), O = _(() => E, [E]), t = _(() => y, [y]);
|
19
21
|
let A = "";
|
20
|
-
const { onEvent:
|
22
|
+
const { onEvent: S } = J();
|
21
23
|
t.projectType === s.LESSON && (A = t.miniGameIdentifier);
|
22
|
-
const
|
23
|
-
const { enableCloseButton:
|
24
|
+
const l = T(() => {
|
25
|
+
const { enableCloseButton: r = !0 } = t;
|
24
26
|
let e = {
|
25
|
-
enableCloseButton:
|
27
|
+
enableCloseButton: r
|
26
28
|
};
|
27
29
|
return t.projectType === s.GAME && (e = {
|
28
30
|
...e,
|
@@ -37,60 +39,65 @@ const Z = V((I, b) => {
|
|
37
39
|
...e,
|
38
40
|
...t
|
39
41
|
}), e;
|
40
|
-
}, [t]), d =
|
41
|
-
var e,
|
42
|
-
const
|
43
|
-
(
|
42
|
+
}, [t]), d = T(() => {
|
43
|
+
var e, i;
|
44
|
+
const r = l();
|
45
|
+
(i = (e = m.current) == null ? void 0 : e.contentWindow) == null || i.postMessage(
|
44
46
|
JSON.stringify({
|
45
47
|
event: o.GAME_DATA,
|
46
|
-
payload:
|
48
|
+
payload: r
|
47
49
|
}),
|
48
|
-
|
50
|
+
b
|
49
51
|
);
|
50
|
-
}, [
|
51
|
-
var e,
|
52
|
-
const
|
53
|
-
(
|
52
|
+
}, [l]), j = T(() => {
|
53
|
+
var e, i;
|
54
|
+
const r = l();
|
55
|
+
(i = (e = m.current) == null ? void 0 : e.contentWindow) == null || i.postMessage(
|
54
56
|
JSON.stringify({
|
55
57
|
event: o.SET_CONFIG,
|
56
58
|
payload: {
|
57
|
-
user:
|
58
|
-
projectConfig:
|
59
|
-
parentDomain:
|
59
|
+
user: O,
|
60
|
+
projectConfig: r,
|
61
|
+
parentDomain: N
|
60
62
|
}
|
61
63
|
}),
|
62
|
-
|
64
|
+
b
|
63
65
|
);
|
64
|
-
}, [
|
65
|
-
|
66
|
-
const
|
67
|
-
var
|
68
|
-
const
|
66
|
+
}, [O, l, N]);
|
67
|
+
x(M, () => m.current, []), B(() => {
|
68
|
+
const r = (e) => {
|
69
|
+
var R, I;
|
70
|
+
const i = e.data, D = typeof i == "string" ? JSON.parse(i) : i, { event: n, payload: w = null } = D;
|
69
71
|
if (n === o.VIBRATE) {
|
70
|
-
const { pattern: u } =
|
71
|
-
window.ReactNativeWebView ? window.ReactNativeWebView.postMessage(JSON.stringify(
|
72
|
+
const { pattern: u } = w;
|
73
|
+
window.ReactNativeWebView ? window.ReactNativeWebView.postMessage(JSON.stringify(D)) : (I = (R = window.navigator).vibrate) == null || I.call(R, u);
|
72
74
|
}
|
73
|
-
if (n === o.GAME_BACK && (f == null || f()), n === o.HIDE_LOADER && (a == null || a()), n === o.LOAD_DATA_FROM_APP && (d == null || d()), n === o.GET_CONFIG &&
|
74
|
-
const { eventName: u, properties:
|
75
|
-
|
75
|
+
if (n === o.GAME_BACK && (f == null || f()), n === o.HIDE_LOADER && (a == null || a()), n === o.LOAD_DATA_FROM_APP && (d == null || d()), n === o.GET_CONFIG && j(), n === o.UPDATE_STATS && (c == null || c(w)), n === o.SHOW_SNACKBAR && (p == null || p(w)), n === o.TRACK_EVENT) {
|
76
|
+
const { eventName: u, properties: $ } = w;
|
77
|
+
S(u, $);
|
76
78
|
}
|
77
79
|
};
|
78
|
-
return window.addEventListener("message",
|
79
|
-
window.removeEventListener("message",
|
80
|
+
return window.addEventListener("message", r), () => {
|
81
|
+
window.removeEventListener("message", r);
|
80
82
|
};
|
81
83
|
}, [
|
82
84
|
p,
|
83
85
|
f,
|
84
86
|
c,
|
85
87
|
a,
|
86
|
-
|
88
|
+
j,
|
87
89
|
d,
|
88
|
-
|
90
|
+
S
|
89
91
|
]);
|
90
|
-
const
|
91
|
-
return /* @__PURE__ */
|
92
|
+
const W = E.isAdmin ? g : `${g}/play-game/${t.projectId}/${t.variant}${A ? `/${A}` : ""}`;
|
93
|
+
return /* @__PURE__ */ h(U, { $height: "100%", $width: "100%", children: [
|
94
|
+
/* @__PURE__ */ v(C, { height: window.ReactNativeTopInset || 0 }),
|
95
|
+
/* @__PURE__ */ v("iframe", { ...V, ref: m, src: `${W}?version=2`, allow: "autoplay" }),
|
96
|
+
";",
|
97
|
+
/* @__PURE__ */ v(C, { height: window.ReactNativeBottomInset || 0 })
|
98
|
+
] });
|
92
99
|
});
|
93
100
|
export {
|
94
|
-
|
101
|
+
X as WebView
|
95
102
|
};
|
96
103
|
//# sourceMappingURL=web-view.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"web-view.js","sources":["../../../../../src/features/circle-games/games/web-view/web-view.tsx"],"sourcesContent":["
|
1
|
+
{"version":3,"file":"web-view.js","sources":["../../../../../src/features/circle-games/games/web-view/web-view.tsx"],"sourcesContent":["import type {\n IInfoMessage,\n ILessonWebGameProps,\n IMessageProps,\n IMultiplayerWebGameProps,\n IPlayerStats,\n IPuzzleWebGameProps,\n ITableWebGameProps,\n IVibrationPattern,\n IWebViewProps,\n} from './web-view-types';\nimport type { ForwardedRef } from 'react';\n\nimport { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';\n\nimport { useUIContext } from '../../../ui/context/context';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport { ALLOWED_ORIGIN } from './constants';\nimport { ProjectType, WebViewEvent } from './enums';\n\nexport const WebView = forwardRef((props: IWebViewProps, ref: ForwardedRef<HTMLIFrameElement>) => {\n const {\n baseUrl,\n projectDetails,\n playerDetails,\n onGameLoad,\n onGamePlayFinish,\n handleInfoMessage,\n onBack,\n parentDomain,\n ...rest\n } = props;\n const webViewRef = useRef<HTMLIFrameElement>(null);\n const memoizedPlayerDetails = useMemo(() => playerDetails, [playerDetails]);\n const memoizedProjectDetails = useMemo(() => projectDetails, [projectDetails]);\n\n let miniGameIdentifier = '';\n const { onEvent: trackEvent } = useUIContext();\n\n if (memoizedProjectDetails.projectType === ProjectType.LESSON) {\n miniGameIdentifier = (memoizedProjectDetails as ILessonWebGameProps).miniGameIdentifier;\n }\n\n const getProjectDetails = useCallback(() => {\n const { enableCloseButton = true } = memoizedProjectDetails;\n\n let payload = {\n enableCloseButton,\n } as IMultiplayerWebGameProps | IPuzzleWebGameProps | ILessonWebGameProps;\n\n if (memoizedProjectDetails.projectType === ProjectType.GAME) {\n payload = {\n ...payload,\n ...memoizedProjectDetails,\n } as IMultiplayerWebGameProps;\n }\n\n if (memoizedProjectDetails.projectType === ProjectType.PUZZLE) {\n payload = {\n ...payload,\n ...memoizedProjectDetails,\n } as IPuzzleWebGameProps;\n }\n\n if (memoizedProjectDetails.projectType === ProjectType.LESSON) {\n payload = {\n ...payload,\n ...memoizedProjectDetails,\n } as ILessonWebGameProps;\n }\n\n if (memoizedProjectDetails.projectType === ProjectType.TABLE) {\n payload = {\n ...payload,\n ...memoizedProjectDetails,\n } as ITableWebGameProps;\n }\n\n return payload;\n }, [memoizedProjectDetails]);\n\n const sendGamesData = useCallback(() => {\n const payload = getProjectDetails();\n\n webViewRef.current?.contentWindow?.postMessage(\n JSON.stringify({\n event: WebViewEvent.GAME_DATA,\n payload,\n }),\n ALLOWED_ORIGIN,\n );\n }, [getProjectDetails]);\n\n const setConfig = useCallback(() => {\n const projectConfig = getProjectDetails();\n\n webViewRef.current?.contentWindow?.postMessage(\n JSON.stringify({\n event: WebViewEvent.SET_CONFIG,\n payload: {\n user: memoizedPlayerDetails,\n projectConfig,\n parentDomain,\n },\n }),\n ALLOWED_ORIGIN,\n );\n }, [memoizedPlayerDetails, getProjectDetails, parentDomain]);\n\n useImperativeHandle(ref, () => webViewRef.current as HTMLIFrameElement, []);\n\n useEffect(() => {\n const handleMessage = (e: MessageEvent) => {\n const data: string = e.data;\n const parsedData = typeof data === 'string' ? JSON.parse(data) : (data as IMessageProps);\n\n const { event, payload = null } = parsedData;\n\n if (event === WebViewEvent.VIBRATE) {\n const { pattern } = payload as IVibrationPattern;\n\n if (window.ReactNativeWebView) {\n window.ReactNativeWebView.postMessage(JSON.stringify(parsedData));\n } else {\n window.navigator.vibrate?.(pattern);\n }\n }\n\n if (event === WebViewEvent.GAME_BACK) {\n onBack?.();\n }\n\n if (event === WebViewEvent.HIDE_LOADER) {\n onGameLoad?.();\n }\n\n if (event === WebViewEvent.LOAD_DATA_FROM_APP) {\n sendGamesData?.();\n }\n\n if (event === WebViewEvent.GET_CONFIG) {\n setConfig();\n }\n\n if (event === WebViewEvent.UPDATE_STATS) {\n onGamePlayFinish?.(payload as IPlayerStats);\n }\n\n if (event === WebViewEvent.SHOW_SNACKBAR) {\n handleInfoMessage?.(payload as IInfoMessage);\n }\n\n if (event === WebViewEvent.TRACK_EVENT) {\n const { eventName, properties } = payload;\n\n trackEvent(eventName, properties);\n }\n };\n\n window.addEventListener('message', handleMessage);\n\n return () => {\n window.removeEventListener('message', handleMessage);\n };\n }, [\n handleInfoMessage,\n onBack,\n onGamePlayFinish,\n onGameLoad,\n setConfig,\n sendGamesData,\n trackEvent,\n ]);\n\n const url = playerDetails.isAdmin\n ? baseUrl\n : `${baseUrl}/play-game/${memoizedProjectDetails.projectId}/${memoizedProjectDetails.variant}${\n miniGameIdentifier ? `/${miniGameIdentifier}` : ''\n }`;\n\n return (\n <FlexView $height=\"100%\" $width=\"100%\">\n <Separator height={window.ReactNativeTopInset || 0} />\n <iframe {...rest} ref={webViewRef} src={`${url}?version=2`} allow=\"autoplay\" />;\n <Separator height={window.ReactNativeBottomInset || 0} />\n </FlexView>\n );\n});\n"],"names":["WebView","forwardRef","props","ref","baseUrl","projectDetails","playerDetails","onGameLoad","onGamePlayFinish","handleInfoMessage","onBack","parentDomain","rest","webViewRef","useRef","memoizedPlayerDetails","useMemo","memoizedProjectDetails","miniGameIdentifier","trackEvent","useUIContext","ProjectType","getProjectDetails","useCallback","enableCloseButton","payload","sendGamesData","_b","_a","WebViewEvent","ALLOWED_ORIGIN","setConfig","projectConfig","useImperativeHandle","useEffect","handleMessage","data","parsedData","event","pattern","eventName","properties","url","jsxs","Flex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Ba,MAAUT,EAAa,aAAa;AAChC,cAAA,EAAE,WAAAW,GAAW,YAAAC,EAAe,IAAAhB;AAElC,QAAAN,EAAWqB,GAAWC,CAAU;AAAA,MAClC;AAAA,IAAA;AAGK,kBAAA,iBAAiB,WAAWN,CAAa,GAEzC,MAAM;AACJ,aAAA,oBAAoB,WAAWA,CAAa;AAAA,IAAA;AAAA,EACrD,GACC;AAAA,IACD1B;AAAA,IACAC;AAAA,IACAF;AAAA,IACAD;AAAA,IACAwB;AAAA,IACAL;AAAA,IACAP;AAAA,EAAA,CACD;AAED,QAAMuB,IAAMpC,EAAc,UACtBF,IACA,GAAGA,CAAO,cAAca,EAAuB,SAAS,IAAIA,EAAuB,OAAO,GACxFC,IAAqB,IAAIA,CAAkB,KAAK,EAClD;AAEJ,SACG,gBAAAyB,EAAAC,GAAA,EAAS,SAAQ,QAAO,QAAO,QAC9B,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAU,EAAA,QAAQ,OAAO,uBAAuB,GAAG;AAAA,IACpD,gBAAAD,EAAC,UAAQ,EAAA,GAAGjC,GAAM,KAAKC,GAAY,KAAK,GAAG6B,CAAG,cAAc,OAAM,WAAW,CAAA;AAAA,IAAE;AAAA,IAC9E,gBAAAG,EAAAC,GAAA,EAAU,QAAQ,OAAO,0BAA0B,GAAG;AAAA,EACzD,EAAA,CAAA;AAEJ,CAAC;"}
|
@@ -1,19 +1,19 @@
|
|
1
1
|
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
2
|
-
import { memo as
|
2
|
+
import { memo as l } from "react";
|
3
3
|
import h from "../../../../ui/lottie-animation/lottie-animation.js";
|
4
4
|
import p from "../../../../ui/separator/separator.js";
|
5
5
|
import o from "../../../../ui/text/text.js";
|
6
6
|
import { BannerContainer as f, CircleLottieView as x, BannerTextContainer as T, CountTextWrapper as C } from "./banner-styled.js";
|
7
|
-
const $ = { renderer: "canvas" },
|
7
|
+
const $ = { renderer: "canvas" }, v = l(
|
8
8
|
({
|
9
9
|
primaryText: i,
|
10
10
|
secondaryText: t,
|
11
|
-
topInset: e = 0,
|
11
|
+
topInset: e = window.ReactNativeTopInset || 0,
|
12
12
|
isLoading: a = !1,
|
13
13
|
lottiePath: m,
|
14
14
|
bgFromTopPosition: c = 0,
|
15
15
|
bgFromRightPosition: s = 0,
|
16
|
-
custEle:
|
16
|
+
custEle: d
|
17
17
|
}) => /* @__PURE__ */ n(f, { topInset: e, children: [
|
18
18
|
/* @__PURE__ */ r(
|
19
19
|
x,
|
@@ -30,11 +30,11 @@ const $ = { renderer: "canvas" }, H = d(
|
|
30
30
|
/* @__PURE__ */ r(p, { height: 4 }),
|
31
31
|
/* @__PURE__ */ r(o, { $renderAs: "ah4", $color: "WHITE", children: a ? "__" : t })
|
32
32
|
] }),
|
33
|
-
|
33
|
+
d
|
34
34
|
] })
|
35
35
|
] })
|
36
36
|
);
|
37
37
|
export {
|
38
|
-
|
38
|
+
v as Banner
|
39
39
|
};
|
40
40
|
//# sourceMappingURL=banner.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"banner.js","sources":["../../../../../../src/features/circle-games/leaderboard/comps/banner/banner.tsx"],"sourcesContent":["import type { IBannerProps } from './banner-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport * as Styled from './banner-styled';\n\nconst animationSettings = { renderer: 'canvas' };\n\nexport const Banner: FC<IBannerProps> = memo(\n ({\n primaryText,\n secondaryText,\n topInset = 0,\n isLoading = false,\n lottiePath,\n bgFromTopPosition = 0,\n bgFromRightPosition = 0,\n custEle,\n }) => (\n <Styled.BannerContainer topInset={topInset}>\n <Styled.CircleLottieView\n topInset={topInset}\n bgFromTopPosition={bgFromTopPosition}\n bgFromRightPosition={bgFromRightPosition}\n >\n <LottieAnimation src={lottiePath} settings={animationSettings} />\n </Styled.CircleLottieView>\n\n <Styled.BannerTextContainer>\n <Styled.CountTextWrapper topInset={topInset}>\n <Text $renderAs=\"ac4\" $color=\"WHITE\">\n {primaryText}\n </Text>\n <Separator height={4} />\n <Text $renderAs=\"ah4\" $color=\"WHITE\">\n {isLoading ? '__' : secondaryText}\n </Text>\n </Styled.CountTextWrapper>\n\n {custEle}\n </Styled.BannerTextContainer>\n </Styled.BannerContainer>\n ),\n);\n"],"names":["animationSettings","Banner","memo","primaryText","secondaryText","topInset","isLoading","lottiePath","bgFromTopPosition","bgFromRightPosition","custEle","jsxs","Styled.BannerContainer","jsx","Styled.CircleLottieView","LottieAnimation","Styled.BannerTextContainer","Styled.CountTextWrapper","Text","Separator"],"mappings":";;;;;;AAUA,MAAMA,IAAoB,EAAE,UAAU,YAEzBC,IAA2BC;AAAA,EACtC,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,
|
1
|
+
{"version":3,"file":"banner.js","sources":["../../../../../../src/features/circle-games/leaderboard/comps/banner/banner.tsx"],"sourcesContent":["import type { IBannerProps } from './banner-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport * as Styled from './banner-styled';\n\nconst animationSettings = { renderer: 'canvas' };\n\nexport const Banner: FC<IBannerProps> = memo(\n ({\n primaryText,\n secondaryText,\n topInset = window.ReactNativeTopInset || 0,\n isLoading = false,\n lottiePath,\n bgFromTopPosition = 0,\n bgFromRightPosition = 0,\n custEle,\n }) => (\n <Styled.BannerContainer topInset={topInset}>\n <Styled.CircleLottieView\n topInset={topInset}\n bgFromTopPosition={bgFromTopPosition}\n bgFromRightPosition={bgFromRightPosition}\n >\n <LottieAnimation src={lottiePath} settings={animationSettings} />\n </Styled.CircleLottieView>\n\n <Styled.BannerTextContainer>\n <Styled.CountTextWrapper topInset={topInset}>\n <Text $renderAs=\"ac4\" $color=\"WHITE\">\n {primaryText}\n </Text>\n <Separator height={4} />\n <Text $renderAs=\"ah4\" $color=\"WHITE\">\n {isLoading ? '__' : secondaryText}\n </Text>\n </Styled.CountTextWrapper>\n\n {custEle}\n </Styled.BannerTextContainer>\n </Styled.BannerContainer>\n ),\n);\n"],"names":["animationSettings","Banner","memo","primaryText","secondaryText","topInset","isLoading","lottiePath","bgFromTopPosition","bgFromRightPosition","custEle","jsxs","Styled.BannerContainer","jsx","Styled.CircleLottieView","LottieAnimation","Styled.BannerTextContainer","Styled.CountTextWrapper","Text","Separator"],"mappings":";;;;;;AAUA,MAAMA,IAAoB,EAAE,UAAU,YAEzBC,IAA2BC;AAAA,EACtC,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC,IAAW,OAAO,uBAAuB;AAAA,IACzC,WAAAC,IAAY;AAAA,IACZ,YAAAC;AAAA,IACA,mBAAAC,IAAoB;AAAA,IACpB,qBAAAC,IAAsB;AAAA,IACtB,SAAAC;AAAA,EAEA,MAAA,gBAAAC,EAACC,GAAA,EAAuB,UAAAP,GACtB,UAAA;AAAA,IAAA,gBAAAQ;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,UAAAT;AAAA,QACA,mBAAAG;AAAA,QACA,qBAAAC;AAAA,QAEA,UAAC,gBAAAI,EAAAE,GAAA,EAAgB,KAAKR,GAAY,UAAUP,GAAmB;AAAA,MAAA;AAAA,IACjE;AAAA,IAEA,gBAAAW,EAACK,GAAA,EACC,UAAA;AAAA,MAAC,gBAAAL,EAAAM,GAAA,EAAwB,UAAAZ,GACvB,UAAA;AAAA,QAAA,gBAAAQ,EAACK,GAAK,EAAA,WAAU,OAAM,QAAO,SAC1B,UACHf,GAAA;AAAA,QACA,gBAAAU,EAACM,GAAU,EAAA,QAAQ,EAAG,CAAA;AAAA,QACtB,gBAAAN,EAACK,KAAK,WAAU,OAAM,QAAO,SAC1B,UAAAZ,IAAY,OAAOF,EACtB,CAAA;AAAA,MAAA,GACF;AAAA,MAECM;AAAA,IAAA,GACH;AAAA,EAAA,GACF;AAEJ;"}
|
package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button-styled.js
CHANGED
@@ -7,7 +7,7 @@ const i = o.div`
|
|
7
7
|
left: ${({ align: t = "left" }) => t === "left" ? "20px" : "unset"};
|
8
8
|
right: ${({ align: t = "left" }) => t === "right" ? "20px" : "unset"};
|
9
9
|
z-index: 10;
|
10
|
-
bottom:
|
10
|
+
bottom: ${(window.ReactNativeBottomInset || 0) + 50}px;
|
11
11
|
`;
|
12
12
|
export {
|
13
13
|
n as ExtendedIconButton,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"navigation-button-styled.js","sources":["../../../../../../src/features/circle-games/leaderboard/comps/navigation-button/navigation-button-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const NavigationActionWrapper = styled.div`\n position: relative;\n width: 100%;\n`;\n\nexport const ExtendedIconButton = styled.div<{ align?: 'left' | 'right' }>`\n position: absolute;\n left: ${({ align = 'left' }) => (align === 'left' ? '20px' : 'unset')};\n right: ${({ align = 'left' }) => (align === 'right' ? '20px' : 'unset')};\n z-index: 10;\n bottom:
|
1
|
+
{"version":3,"file":"navigation-button-styled.js","sources":["../../../../../../src/features/circle-games/leaderboard/comps/navigation-button/navigation-button-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const NavigationActionWrapper = styled.div`\n position: relative;\n width: 100%;\n`;\n\nexport const ExtendedIconButton = styled.div<{ align?: 'left' | 'right' }>`\n position: absolute;\n left: ${({ align = 'left' }) => (align === 'left' ? '20px' : 'unset')};\n right: ${({ align = 'left' }) => (align === 'right' ? '20px' : 'unset')};\n z-index: 10;\n bottom: ${(window.ReactNativeBottomInset || 0) + 50}px;\n`;\n"],"names":["NavigationActionWrapper","styled","ExtendedIconButton","align"],"mappings":";AAEO,MAAMA,IAA0BC,EAAO;AAAA;AAAA;AAAA,GAKjCC,IAAqBD,EAAO;AAAA;AAAA,UAE/B,CAAC,EAAE,OAAAE,IAAQ,OAAA,MAAcA,MAAU,SAAS,SAAS,OAAQ;AAAA,WAC5D,CAAC,EAAE,OAAAA,IAAQ,OAAA,MAAcA,MAAU,UAAU,SAAS,OAAQ;AAAA;AAAA,aAE5D,OAAO,0BAA0B,KAAK,EAAE;AAAA;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"leaderboard-styled.js","sources":["../../../../src/features/circle-games/leaderboard/leaderboard-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { ARC_BUTTON_BOTTOM_OFFSET } from '../../ui/arc-button/constants';\nimport FlexView from '../../ui/layout/flex-view';\nimport { BANNER_HEIGHT } from './comps/banner/constants';\n\nexport const Leaderboard = styled.div`\n flex-direction: column;\n overflow: hidden;\n height: 100vh;\n max-height: 100%;\n position: relative;\n`;\n\nexport const LeaderboardContainer = styled.div`\n background: ${({ theme }) => theme.colors.BLACK_1};\n height: 100%;\n position: relative;\n width: 100%;\n`;\n\nexport const BannerWrapper = styled.div`\n position: absolute;\n top: 0;\n width: 100%;\n z-index: 10;\n`;\n\nexport const ItemsWrapper = styled.div
|
1
|
+
{"version":3,"file":"leaderboard-styled.js","sources":["../../../../src/features/circle-games/leaderboard/leaderboard-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { ARC_BUTTON_BOTTOM_OFFSET } from '../../ui/arc-button/constants';\nimport FlexView from '../../ui/layout/flex-view';\nimport { BANNER_HEIGHT } from './comps/banner/constants';\n\nexport const Leaderboard = styled.div`\n flex-direction: column;\n overflow: hidden;\n height: 100vh;\n max-height: 100%;\n position: relative;\n`;\n\nexport const LeaderboardContainer = styled.div`\n background: ${({ theme }) => theme.colors.BLACK_1};\n height: 100%;\n position: relative;\n width: 100%;\n`;\n\nexport const BannerWrapper = styled.div`\n position: absolute;\n top: 0;\n width: 100%;\n z-index: 10;\n`;\n\nexport const ItemsWrapper = styled.div`\n background: transparent;\n position: absolute;\n overflow: auto;\n width: 100%;\n flex: 1;\n height: 100%;\n padding-top: ${(window.ReactNativeTopInset || 0) + BANNER_HEIGHT}px;\n padding-bottom: ${ARC_BUTTON_BOTTOM_OFFSET}px;\n`;\n\nexport const TournamentBannerCustContainer = styled.div`\n position: absolute;\n display: flex;\n top: 5px;\n right: -2px;\n width: 200px;\n height: 100%;\n align-items: center;\n justify-content: center;\n`;\n\nexport const ActionButtonWrapper = styled.div`\n position: absolute;\n bottom: 0;\n width: 100%;\n`;\n\nexport const TrophyWrapper = styled.div`\n display: flex;\n justify-content: center;\n width: 150%;\n height: 150%;\n`;\n\nexport const Banner = styled.div`\n background: ${({ theme }) => theme.colors.YELLOW_6};\n min-height: 32px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n`;\n\nexport const InfoContainer = styled(FlexView)`\n padding: 16px;\n`;\n"],"names":["Leaderboard","styled","LeaderboardContainer","theme","BannerWrapper","ItemsWrapper","BANNER_HEIGHT","ARC_BUTTON_BOTTOM_OFFSET","TournamentBannerCustContainer","ActionButtonWrapper","TrophyWrapper","Banner","FlexView"],"mappings":";;;;AAMO,MAAMA,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQrBC,IAAuBD,EAAO;AAAA,gBAC3B,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA,GAMtCC,IAAgBH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAOvBI,IAAeJ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAOjB,OAAO,uBAAuB,KAAKK,CAAa;AAAA,oBAC9CC,CAAwB;AAAA,GAG/BC,IAAgCP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWvCQ,IAAsBR,EAAO;AAAA;AAAA;AAAA;AAAA,GAM7BS,IAAgBT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAOvBU,IAASV,EAAO;AAAA,gBACb,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASvBF,EAAOW,CAAQ;AAAA;AAAA;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { jsx as e, jsxs as
|
2
|
-
import { useState as
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
2
|
+
import { useState as p, useEffect as K } from "react";
|
3
3
|
import { ILLUSTRATIONS as w } from "../../../assets/illustrations/illustrations.js";
|
4
4
|
import { LOTTIE as d } from "../../../assets/lottie/lottie.js";
|
5
5
|
import { CircularLoader as U } from "../../ui/loader/circular-loader/circular-loader.js";
|
@@ -39,12 +39,12 @@ const L = {
|
|
39
39
|
streakInfo: l
|
40
40
|
}) => {
|
41
41
|
var y, A, R, S, B, C, x, P;
|
42
|
-
const [i, I] =
|
42
|
+
const [i, I] = p(
|
43
43
|
o.findIndex((t) => u === t.type)
|
44
|
-
), [n, k] =
|
44
|
+
), [n, k] = p(((y = m == null ? void 0 : m[u]) == null ? void 0 : y.leaderboardPlayers) || []), [h, N] = p({
|
45
45
|
current: 0,
|
46
46
|
end: 0
|
47
|
-
}), [O, f] = V(0), [c, Y] =
|
47
|
+
}), [O, f] = V(0), [c, Y] = p(!1), F = (A = n == null ? void 0 : n[0]) == null ? void 0 : A.points, $ = ((R = n == null ? void 0 : n[0]) == null ? void 0 : R.streakDays) || 0, { playButtonSound: _ } = q(), j = () => {
|
48
48
|
_(), I((t) => t - 1 < 0 ? o.length - 1 : t - 1);
|
49
49
|
}, v = () => {
|
50
50
|
_(), I((t) => t + 1 === o.length ? 0 : t + 1);
|
@@ -61,8 +61,8 @@ const L = {
|
|
61
61
|
end: s.endTimestamp
|
62
62
|
}), s.currentTimestamp > s.endTimestamp && (g.splice(10), Y(!0))), k([...g]);
|
63
63
|
}
|
64
|
-
}, [i, m]), /* @__PURE__ */ e(X, { children: /* @__PURE__ */
|
65
|
-
/* @__PURE__ */
|
64
|
+
}, [i, m]), /* @__PURE__ */ e(X, { children: /* @__PURE__ */ a(Z, { children: [
|
65
|
+
/* @__PURE__ */ a(D, { children: [
|
66
66
|
((S = o[i]) == null ? void 0 : S.type) === r.BI_WEEKLY && /* @__PURE__ */ e(
|
67
67
|
E,
|
68
68
|
{
|
@@ -70,7 +70,7 @@ const L = {
|
|
70
70
|
bgFromTopPosition: -120,
|
71
71
|
bgFromRightPosition: -110,
|
72
72
|
primaryText: c ? /* @__PURE__ */ e("span", { children: "New Tournament" }) : /* @__PURE__ */ e("span", { children: "Tournament" }),
|
73
|
-
secondaryText: c ? /* @__PURE__ */ e("span", { children: "Starts Soon" }) : /* @__PURE__ */
|
73
|
+
secondaryText: c ? /* @__PURE__ */ e("span", { children: "Starts Soon" }) : /* @__PURE__ */ a("span", { children: [
|
74
74
|
" ",
|
75
75
|
/* @__PURE__ */ e(
|
76
76
|
Q,
|
@@ -110,7 +110,7 @@ const L = {
|
|
110
110
|
)
|
111
111
|
] }),
|
112
112
|
T && /* @__PURE__ */ e(U, {}),
|
113
|
-
!T && n && /* @__PURE__ */
|
113
|
+
!T && n && /* @__PURE__ */ a(te, { children: [
|
114
114
|
((x = o[i]) == null ? void 0 : x.type) === r.ALL_TIME_STREAK && /* @__PURE__ */ e(
|
115
115
|
J,
|
116
116
|
{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"leaderboard.js","sources":["../../../../src/features/circle-games/leaderboard/leaderboard.tsx"],"sourcesContent":["import type {\n ILeaderboardPlayerWithPoints,\n ILeaderboardPlayerWithStreak,\n} from './dal/use-get-leaderboard-dal/use-get-leaderboard-dal-types';\nimport type { ILeaderboardProps } from './leaderboard-types';\n\nimport { useEffect, useState } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport { CircularLoader } from '../../ui/loader/circular-loader/circular-loader';\nimport Text from '../../ui/text/text';\nimport { useCircleSounds } from '../hooks/use-circle-sounds/use-circle-sounds';\nimport { Banner } from './comps/banner/banner';\nimport { LeaderboardItemWithObserver } from './comps/leaderboard-item/leaderboard-item';\nimport { NavigationButton } from './comps/navigation-button/navigation-button';\nimport { StreakReductionInfoBar } from './comps/streak-reduction-infobar/streak-reduction-infobar';\nimport { Timer } from './comps/timer/timer';\nimport { ELeaderboardType } from './enums/leaderboard-type-enum';\nimport { useTimer } from './hooks/use-timer/use-timer';\nimport * as Styled from './leaderboard-styled';\n\nconst BANNER_LOTTIES: Record<ELeaderboardType, string> = {\n [ELeaderboardType.ALL_TIME_STREAK]: LOTTIE.ELITE_CIRCLE,\n [ELeaderboardType.ALL_TIME]: LOTTIE.ELITE_CIRCLE,\n [ELeaderboardType.BI_WEEKLY]: LOTTIE.TOURNAMENT_RIPPLE,\n};\n\nconst leaderboards = [\n {\n name: 'TOURNAMENT',\n type: ELeaderboardType.BI_WEEKLY,\n },\n {\n name: 'STREAK STARS',\n type: ELeaderboardType.ALL_TIME_STREAK,\n },\n {\n name: 'ALL TIME',\n type: ELeaderboardType.ALL_TIME,\n },\n];\n\nexport const Leaderboard = ({\n leaderboardData,\n type = ELeaderboardType.BI_WEEKLY,\n userId,\n onClose,\n isLoading,\n streakInfo,\n}: ILeaderboardProps) => {\n const [currentLeaderBoardIndex, setCurrentLeaderboardIndex] = useState(\n leaderboards.findIndex(leaderboard => type === leaderboard.type),\n );\n\n const [currLeaderboardData, setCurrLeaderboardData] = useState<\n (ILeaderboardPlayerWithPoints | ILeaderboardPlayerWithStreak)[] | []\n >(leaderboardData?.[type]?.leaderboardPlayers || []);\n\n const [currLeaderboardTimeStamps, setCurrLeaderboardTimeStamps] = useState<{\n current: number;\n end: number;\n }>({\n current: 0,\n end: 0,\n });\n\n const [time, setTimer] = useTimer(0);\n const [isTournamentEnded, setIsTournamentEnded] = useState(false);\n const maxPoints = (currLeaderboardData?.[0] as ILeaderboardPlayerWithPoints)?.points;\n const maxStreakDays = (currLeaderboardData?.[0] as ILeaderboardPlayerWithStreak)?.streakDays || 0;\n const { playButtonSound } = useCircleSounds();\n\n const handlePrevious = () => {\n playButtonSound();\n setCurrentLeaderboardIndex(prev => {\n if (prev - 1 < 0) {\n return leaderboards.length - 1;\n }\n\n return prev - 1;\n });\n };\n\n const handleNext = () => {\n playButtonSound();\n setCurrentLeaderboardIndex(prev => {\n if (prev + 1 === leaderboards.length) {\n return 0;\n }\n\n return prev + 1;\n });\n };\n\n useEffect(() => {\n setTimer(0);\n }, [setTimer]);\n\n useEffect(() => {\n const currType = leaderboards[currentLeaderBoardIndex]?.type;\n const currLeaderboard = currType && leaderboardData?.[currType];\n\n if (currLeaderboard) {\n const leaderboardList = currLeaderboard.leaderboardPlayers || [];\n\n if (currType === ELeaderboardType.BI_WEEKLY) {\n setCurrLeaderboardTimeStamps({\n current: currLeaderboard.currentTimestamp,\n end: currLeaderboard.endTimestamp,\n });\n\n if (currLeaderboard.currentTimestamp > currLeaderboard.endTimestamp) {\n leaderboardList.splice(10);\n setIsTournamentEnded(true);\n }\n }\n\n setCurrLeaderboardData([...leaderboardList]);\n }\n }, [currentLeaderBoardIndex, leaderboardData]);\n\n return (\n <Styled.Leaderboard>\n <Styled.LeaderboardContainer>\n <Styled.BannerWrapper>\n {/* tournament banner */}\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.BI_WEEKLY && (\n <Banner\n isLoading={isLoading || currLeaderboardData.length === 0}\n bgFromTopPosition={-120}\n bgFromRightPosition={-110}\n primaryText={\n isTournamentEnded ? <span>New Tournament</span> : <span>Tournament</span>\n }\n secondaryText={\n isTournamentEnded ? (\n <span>Starts Soon</span>\n ) : (\n <span>\n {' '}\n <Timer\n fromTimestamp={(time as number) + currLeaderboardTimeStamps.current}\n endTimestamp={currLeaderboardTimeStamps.end}\n />{' '}\n {'left'}\n </span>\n )\n }\n lottiePath={BANNER_LOTTIES[ELeaderboardType.BI_WEEKLY]}\n custEle={\n <Styled.TournamentBannerCustContainer>\n <Styled.TrophyWrapper>\n <img src={ILLUSTRATIONS.TROPHY_CIRCLE} />\n </Styled.TrophyWrapper>\n </Styled.TournamentBannerCustContainer>\n }\n />\n )}\n\n {/* top streak banner */}\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.ALL_TIME_STREAK && (\n <Banner\n isLoading={isLoading}\n bgFromTopPosition={-140}\n bgFromRightPosition={-90}\n primaryText={<span>Streak Stars</span>}\n secondaryText={<span>Top 50</span>}\n lottiePath={BANNER_LOTTIES[ELeaderboardType.ALL_TIME_STREAK]}\n />\n )}\n\n {/* elite circle banner */}\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.ALL_TIME && (\n <Banner\n isLoading={isLoading}\n bgFromTopPosition={-140}\n bgFromRightPosition={-90}\n primaryText={<span>Elite Circle</span>}\n secondaryText={<span>Top 50</span>}\n lottiePath={BANNER_LOTTIES[ELeaderboardType.ALL_TIME]}\n />\n )}\n </Styled.BannerWrapper>\n\n {isLoading && <CircularLoader />}\n\n {!isLoading && currLeaderboardData && (\n <Styled.ItemsWrapper topInset={0}>\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.ALL_TIME_STREAK && (\n <StreakReductionInfoBar\n startTimestampToday={streakInfo.startTimestampToday}\n streakReduction={streakInfo.streakReduction}\n />\n )}\n {isTournamentEnded &&\n leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.BI_WEEKLY && (\n <Styled.Banner>\n <Text $renderAs=\"ab3\" $color=\"WHITE\">\n Congratulating winners of the last tournament!\n </Text>\n </Styled.Banner>\n )}\n {currLeaderboardData.map(player => {\n return (\n <LeaderboardItemWithObserver\n key={player.rank}\n player={player}\n rank={player.rank}\n maxStreakDays={maxStreakDays}\n maxPoints={maxPoints}\n leaderboardType={leaderboards[currentLeaderBoardIndex]?.type}\n isActive={player.userId === userId}\n />\n );\n })}\n </Styled.ItemsWrapper>\n )}\n\n <Styled.ActionButtonWrapper>\n <NavigationButton\n labels={Object.values(ELeaderboardType)}\n onLeftClick={handlePrevious}\n onRightClick={handleNext}\n currIndex={currentLeaderBoardIndex}\n onClose={onClose}\n disableSwipe={isLoading || currLeaderboardData.length === 0}\n />\n </Styled.ActionButtonWrapper>\n </Styled.LeaderboardContainer>\n </Styled.Leaderboard>\n );\n};\n"],"names":["BANNER_LOTTIES","ELeaderboardType","LOTTIE","leaderboards","Leaderboard","leaderboardData","type","userId","onClose","isLoading","streakInfo","currentLeaderBoardIndex","setCurrentLeaderboardIndex","useState","leaderboard","currLeaderboardData","setCurrLeaderboardData","_a","currLeaderboardTimeStamps","setCurrLeaderboardTimeStamps","time","setTimer","useTimer","isTournamentEnded","setIsTournamentEnded","maxPoints","_b","maxStreakDays","_c","playButtonSound","useCircleSounds","handlePrevious","prev","handleNext","useEffect","currType","currLeaderboard","leaderboardList","Styled.Leaderboard","jsxs","Styled.LeaderboardContainer","Styled.BannerWrapper","_d","jsx","Banner","Timer","Styled.TournamentBannerCustContainer","Styled.TrophyWrapper","ILLUSTRATIONS","_e","_f","CircularLoader","Styled.ItemsWrapper","_g","StreakReductionInfoBar","_h","Styled.Banner","Text","player","LeaderboardItemWithObserver","Styled.ActionButtonWrapper","NavigationButton"],"mappings":";;;;;;;;;;;;;;;AAsBA,MAAMA,IAAmD;AAAA,EACvD,CAACC,EAAiB,eAAe,GAAGC,EAAO;AAAA,EAC3C,CAACD,EAAiB,QAAQ,GAAGC,EAAO;AAAA,EACpC,CAACD,EAAiB,SAAS,GAAGC,EAAO;AACvC,GAEMC,IAAe;AAAA,EACnB;AAAA,IACE,MAAM;AAAA,IACN,MAAMF,EAAiB;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAMA,EAAiB;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAMA,EAAiB;AAAA,EACzB;AACF,GAEaG,KAAc,CAAC;AAAA,EAC1B,iBAAAC;AAAA,EACA,MAAAC,IAAOL,EAAiB;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AAAf;AAAA,UAACgB;AAAA,UAAA;AAAA,YAEC,QAAAD;AAAA,YACA,MAAMA,EAAO;AAAA,YACb,eAAA/B;AAAA,YACA,WAAAF;AAAA,YACA,kBAAiBR,IAAAd,EAAaQ,CAAuB,MAApC,gBAAAM,EAAuC;AAAA,YACxD,UAAUyC,EAAO,WAAWnD;AAAA,UAAA;AAAA,UANvBmD,EAAO;AAAA,QAAA;AAAA,MAOd,CAEH;AAAA,IAAA,GACH;AAAA,IAGF,gBAAAf,EAACiB,IAAA,EACC,UAAA,gBAAAjB;AAAA,MAACkB;AAAA,MAAA;AAAA,QACC,QAAQ,OAAO,OAAO5D,CAAgB;AAAA,QACtC,aAAa8B;AAAA,QACb,cAAcE;AAAA,QACd,WAAWtB;AAAA,QACX,SAAAH;AAAA,QACA,cAAcC,KAAaM,EAAoB,WAAW;AAAA,MAAA;AAAA,IAAA,GAE9D;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ;"}
|
1
|
+
{"version":3,"file":"leaderboard.js","sources":["../../../../src/features/circle-games/leaderboard/leaderboard.tsx"],"sourcesContent":["import type {\n ILeaderboardPlayerWithPoints,\n ILeaderboardPlayerWithStreak,\n} from './dal/use-get-leaderboard-dal/use-get-leaderboard-dal-types';\nimport type { ILeaderboardProps } from './leaderboard-types';\n\nimport { useEffect, useState } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport { CircularLoader } from '../../ui/loader/circular-loader/circular-loader';\nimport Text from '../../ui/text/text';\nimport { useCircleSounds } from '../hooks/use-circle-sounds/use-circle-sounds';\nimport { Banner } from './comps/banner/banner';\nimport { LeaderboardItemWithObserver } from './comps/leaderboard-item/leaderboard-item';\nimport { NavigationButton } from './comps/navigation-button/navigation-button';\nimport { StreakReductionInfoBar } from './comps/streak-reduction-infobar/streak-reduction-infobar';\nimport { Timer } from './comps/timer/timer';\nimport { ELeaderboardType } from './enums/leaderboard-type-enum';\nimport { useTimer } from './hooks/use-timer/use-timer';\nimport * as Styled from './leaderboard-styled';\n\nconst BANNER_LOTTIES: Record<ELeaderboardType, string> = {\n [ELeaderboardType.ALL_TIME_STREAK]: LOTTIE.ELITE_CIRCLE,\n [ELeaderboardType.ALL_TIME]: LOTTIE.ELITE_CIRCLE,\n [ELeaderboardType.BI_WEEKLY]: LOTTIE.TOURNAMENT_RIPPLE,\n};\n\nconst leaderboards = [\n {\n name: 'TOURNAMENT',\n type: ELeaderboardType.BI_WEEKLY,\n },\n {\n name: 'STREAK STARS',\n type: ELeaderboardType.ALL_TIME_STREAK,\n },\n {\n name: 'ALL TIME',\n type: ELeaderboardType.ALL_TIME,\n },\n];\n\nexport const Leaderboard = ({\n leaderboardData,\n type = ELeaderboardType.BI_WEEKLY,\n userId,\n onClose,\n isLoading,\n streakInfo,\n}: ILeaderboardProps) => {\n const [currentLeaderBoardIndex, setCurrentLeaderboardIndex] = useState(\n leaderboards.findIndex(leaderboard => type === leaderboard.type),\n );\n\n const [currLeaderboardData, setCurrLeaderboardData] = useState<\n (ILeaderboardPlayerWithPoints | ILeaderboardPlayerWithStreak)[] | []\n >(leaderboardData?.[type]?.leaderboardPlayers || []);\n\n const [currLeaderboardTimeStamps, setCurrLeaderboardTimeStamps] = useState<{\n current: number;\n end: number;\n }>({\n current: 0,\n end: 0,\n });\n\n const [time, setTimer] = useTimer(0);\n const [isTournamentEnded, setIsTournamentEnded] = useState(false);\n const maxPoints = (currLeaderboardData?.[0] as ILeaderboardPlayerWithPoints)?.points;\n const maxStreakDays = (currLeaderboardData?.[0] as ILeaderboardPlayerWithStreak)?.streakDays || 0;\n const { playButtonSound } = useCircleSounds();\n\n const handlePrevious = () => {\n playButtonSound();\n setCurrentLeaderboardIndex(prev => {\n if (prev - 1 < 0) {\n return leaderboards.length - 1;\n }\n\n return prev - 1;\n });\n };\n\n const handleNext = () => {\n playButtonSound();\n setCurrentLeaderboardIndex(prev => {\n if (prev + 1 === leaderboards.length) {\n return 0;\n }\n\n return prev + 1;\n });\n };\n\n useEffect(() => {\n setTimer(0);\n }, [setTimer]);\n\n useEffect(() => {\n const currType = leaderboards[currentLeaderBoardIndex]?.type;\n const currLeaderboard = currType && leaderboardData?.[currType];\n\n if (currLeaderboard) {\n const leaderboardList = currLeaderboard.leaderboardPlayers || [];\n\n if (currType === ELeaderboardType.BI_WEEKLY) {\n setCurrLeaderboardTimeStamps({\n current: currLeaderboard.currentTimestamp,\n end: currLeaderboard.endTimestamp,\n });\n\n if (currLeaderboard.currentTimestamp > currLeaderboard.endTimestamp) {\n leaderboardList.splice(10);\n setIsTournamentEnded(true);\n }\n }\n\n setCurrLeaderboardData([...leaderboardList]);\n }\n }, [currentLeaderBoardIndex, leaderboardData]);\n\n return (\n <Styled.Leaderboard>\n <Styled.LeaderboardContainer>\n <Styled.BannerWrapper>\n {/* tournament banner */}\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.BI_WEEKLY && (\n <Banner\n isLoading={isLoading || currLeaderboardData.length === 0}\n bgFromTopPosition={-120}\n bgFromRightPosition={-110}\n primaryText={\n isTournamentEnded ? <span>New Tournament</span> : <span>Tournament</span>\n }\n secondaryText={\n isTournamentEnded ? (\n <span>Starts Soon</span>\n ) : (\n <span>\n {' '}\n <Timer\n fromTimestamp={(time as number) + currLeaderboardTimeStamps.current}\n endTimestamp={currLeaderboardTimeStamps.end}\n />{' '}\n {'left'}\n </span>\n )\n }\n lottiePath={BANNER_LOTTIES[ELeaderboardType.BI_WEEKLY]}\n custEle={\n <Styled.TournamentBannerCustContainer>\n <Styled.TrophyWrapper>\n <img src={ILLUSTRATIONS.TROPHY_CIRCLE} />\n </Styled.TrophyWrapper>\n </Styled.TournamentBannerCustContainer>\n }\n />\n )}\n\n {/* top streak banner */}\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.ALL_TIME_STREAK && (\n <Banner\n isLoading={isLoading}\n bgFromTopPosition={-140}\n bgFromRightPosition={-90}\n primaryText={<span>Streak Stars</span>}\n secondaryText={<span>Top 50</span>}\n lottiePath={BANNER_LOTTIES[ELeaderboardType.ALL_TIME_STREAK]}\n />\n )}\n\n {/* elite circle banner */}\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.ALL_TIME && (\n <Banner\n isLoading={isLoading}\n bgFromTopPosition={-140}\n bgFromRightPosition={-90}\n primaryText={<span>Elite Circle</span>}\n secondaryText={<span>Top 50</span>}\n lottiePath={BANNER_LOTTIES[ELeaderboardType.ALL_TIME]}\n />\n )}\n </Styled.BannerWrapper>\n\n {isLoading && <CircularLoader />}\n\n {!isLoading && currLeaderboardData && (\n <Styled.ItemsWrapper>\n {leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.ALL_TIME_STREAK && (\n <StreakReductionInfoBar\n startTimestampToday={streakInfo.startTimestampToday}\n streakReduction={streakInfo.streakReduction}\n />\n )}\n {isTournamentEnded &&\n leaderboards[currentLeaderBoardIndex]?.type === ELeaderboardType.BI_WEEKLY && (\n <Styled.Banner>\n <Text $renderAs=\"ab3\" $color=\"WHITE\">\n Congratulating winners of the last tournament!\n </Text>\n </Styled.Banner>\n )}\n {currLeaderboardData.map(player => {\n return (\n <LeaderboardItemWithObserver\n key={player.rank}\n player={player}\n rank={player.rank}\n maxStreakDays={maxStreakDays}\n maxPoints={maxPoints}\n leaderboardType={leaderboards[currentLeaderBoardIndex]?.type}\n isActive={player.userId === userId}\n />\n );\n })}\n </Styled.ItemsWrapper>\n )}\n\n <Styled.ActionButtonWrapper>\n <NavigationButton\n labels={Object.values(ELeaderboardType)}\n onLeftClick={handlePrevious}\n onRightClick={handleNext}\n currIndex={currentLeaderBoardIndex}\n onClose={onClose}\n disableSwipe={isLoading || currLeaderboardData.length === 0}\n />\n </Styled.ActionButtonWrapper>\n </Styled.LeaderboardContainer>\n </Styled.Leaderboard>\n );\n};\n"],"names":["BANNER_LOTTIES","ELeaderboardType","LOTTIE","leaderboards","Leaderboard","leaderboardData","type","userId","onClose","isLoading","streakInfo","currentLeaderBoardIndex","setCurrentLeaderboardIndex","useState","leaderboard","currLeaderboardData","setCurrLeaderboardData","_a","currLeaderboardTimeStamps","setCurrLeaderboardTimeStamps","time","setTimer","useTimer","isTournamentEnded","setIsTournamentEnded","maxPoints","_b","maxStreakDays","_c","playButtonSound","useCircleSounds","handlePrevious","prev","handleNext","useEffect","currType","currLeaderboard","leaderboardList","Styled.Leaderboard","jsxs","Styled.LeaderboardContainer","Styled.BannerWrapper","_d","jsx","Banner","Timer","Styled.TournamentBannerCustContainer","Styled.TrophyWrapper","ILLUSTRATIONS","_e","_f","CircularLoader","Styled.ItemsWrapper","_g","StreakReductionInfoBar","_h","Styled.Banner","Text","player","LeaderboardItemWithObserver","Styled.ActionButtonWrapper","NavigationButton"],"mappings":";;;;;;;;;;;;;;;AAsBA,MAAMA,IAAmD;AAAA,EACvD,CAACC,EAAiB,eAAe,GAAGC,EAAO;AAAA,EAC3C,CAACD,EAAiB,QAAQ,GAAGC,EAAO;AAAA,EACpC,CAACD,EAAiB,SAAS,GAAGC,EAAO;AACvC,GAEMC,IAAe;AAAA,EACnB;AAAA,IACE,MAAM;AAAA,IACN,MAAMF,EAAiB;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAMA,EAAiB;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAMA,EAAiB;AAAA,EACzB;AACF,GAEaG,KAAc,CAAC;AAAA,EAC1B,iBAAAC;AAAA,EACA,MAAAC,IAAOL,EAAiB;AAAA,EACxB,QAAAM;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AACF,MAAyB;;AACjB,QAAA,CAACC,GAAyBC,CAA0B,IAAIC;AAAA,IAC5DV,EAAa,UAAU,CAAeW,MAAAR,MAASQ,EAAY,IAAI;AAAA,EAAA,GAG3D,CAACC,GAAqBC,CAAsB,IAAIH,IAEpDI,IAAAZ,KAAA,gBAAAA,EAAkBC,OAA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AAA,IAGF,gBAAAf,EAACiB,IAAA,EACC,UAAA,gBAAAjB;AAAA,MAACkB;AAAA,MAAA;AAAA,QACC,QAAQ,OAAO,OAAO5D,CAAgB;AAAA,QACtC,aAAa8B;AAAA,QACb,cAAcE;AAAA,QACd,WAAWtB;AAAA,QACX,SAAAH;AAAA,QACA,cAAcC,KAAaM,EAAoB,WAAW;AAAA,MAAA;AAAA,IAAA,GAE9D;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ;"}
|
@@ -59,11 +59,11 @@ const c = i.div`
|
|
59
59
|
align-items: center;
|
60
60
|
justify-content: center;
|
61
61
|
color: ${({ theme: t }) => t.colors.WHITE};
|
62
|
-
`,
|
62
|
+
`, x = i.div`
|
63
63
|
position: absolute;
|
64
64
|
transform: translateY(-55px);
|
65
65
|
z-index: 3;
|
66
|
-
`,
|
66
|
+
`, u = i.div`
|
67
67
|
position: absolute;
|
68
68
|
width: 100%;
|
69
69
|
height: 100%;
|
@@ -77,10 +77,10 @@ const c = i.div`
|
|
77
77
|
align-items: center;
|
78
78
|
left: 0;
|
79
79
|
right: 0;
|
80
|
-
bottom: 0;
|
81
|
-
`,
|
80
|
+
bottom: ${window.ReactNativeBottomInset || 0}px;
|
81
|
+
`, v = i.button`
|
82
82
|
position: absolute;
|
83
|
-
top:
|
83
|
+
top: ${(window.ReactNativeTopInset || 0) + 20}px;
|
84
84
|
left: 16px;
|
85
85
|
outline: none;
|
86
86
|
border: none;
|
@@ -90,14 +90,14 @@ const c = i.div`
|
|
90
90
|
`;
|
91
91
|
export {
|
92
92
|
d as BackgroundImage,
|
93
|
-
|
93
|
+
u as CircularProgress,
|
94
94
|
h as CircularProgressContainer,
|
95
95
|
l as CircularStepsContainer,
|
96
96
|
p as CircularStepsWrapper,
|
97
97
|
c as CustEleContainer,
|
98
98
|
g as CustomDataContainer,
|
99
|
-
|
99
|
+
x as Label,
|
100
100
|
a as ScreenWrapper,
|
101
|
-
|
101
|
+
v as TransparentIconButton
|
102
102
|
};
|
103
103
|
//# sourceMappingURL=circular-steps-styled.js.map
|