fansunited-frontend-components 0.0.31-RC3 → 0.0.31-RC5
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/ClassicQuizPlay.d.ts +4 -0
- package/ClassicQuizPlay.d.ts.map +1 -0
- package/ClassicQuizPlay.js +5 -0
- package/CollectLead.d.ts +4 -0
- package/CollectLead.d.ts.map +1 -0
- package/CollectLead.js +5 -0
- package/EventGamePlay.d.ts +4 -0
- package/EventGamePlay.d.ts.map +1 -0
- package/EventGamePlay.js +5 -0
- package/MatchQuizPlay.d.ts +4 -0
- package/MatchQuizPlay.d.ts.map +1 -0
- package/MatchQuizPlay.js +5 -0
- package/PersonalityQuizPlay.d.ts +4 -0
- package/PersonalityQuizPlay.d.ts.map +1 -0
- package/PersonalityQuizPlay.js +5 -0
- package/PollVote.d.ts +4 -0
- package/PollVote.d.ts.map +1 -0
- package/PollVote.js +5 -0
- package/_virtual/_commonjsHelpers.js +6 -0
- package/_virtual/index.js +4 -0
- package/_virtual/index2.js +4 -0
- package/_virtual/index3.js +4 -0
- package/_virtual/jsx-runtime.js +4 -0
- package/_virtual/react-is.development.js +4 -0
- package/_virtual/react-is.development2.js +4 -0
- package/_virtual/react-is.production.min.js +4 -0
- package/_virtual/react-is.production.min2.js +4 -0
- package/_virtual/react-jsx-runtime.development.js +4 -0
- package/_virtual/react-jsx-runtime.production.js +4 -0
- package/index.d.ts +6 -1
- package/index.d.ts.map +1 -1
- package/index.js +14 -0
- package/package.json +37 -4
- package/packages/classic-quiz-play/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
- package/packages/classic-quiz-play/src/assets/default-quiz-bg.png.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/3dicons-bookmark-fav-dynamic-color.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/3dicons-crow-dynamic-color.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/3dicons-fire-dynamic-color.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/3dicons-flag-dynamic-color.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/3dicons-medal-dynamic-color.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/3dicons-rocket-dynamic-color.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/3dicons-target-dynamic-color.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/3dicons-thumb-down-dynamic-color.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/bottle-with-popping-cork.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/crown.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/direct-hit.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/hundred-points.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/person-facepalming.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/sports-medal.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/thumbs-down.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/trophy.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/emojis/upside-down-face.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/hexagons/shape-hexagon-danger.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/hexagons/shape-hexagon-success.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/hexagons/shape-hexagon-warning.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/info.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/school.svg.js +4 -0
- package/packages/classic-quiz-play/src/assets/sports_score.svg.js +4 -0
- package/packages/classic-quiz-play/src/components/ClassicQuizNotFound.js +23 -0
- package/packages/classic-quiz-play/src/components/ClassicQuizPlay.js +353 -0
- package/packages/classic-quiz-play/src/components/Leads/CollectLeadWrapper.js +65 -0
- package/packages/classic-quiz-play/src/components/Shared/AlertMessage.js +93 -0
- package/packages/classic-quiz-play/src/components/Shared/Answers/Answers.js +80 -0
- package/packages/classic-quiz-play/src/components/Shared/Answers/Option.js +130 -0
- package/packages/classic-quiz-play/src/components/Shared/Button.js +67 -0
- package/packages/classic-quiz-play/src/components/Shared/MainCard.js +34 -0
- package/packages/classic-quiz-play/src/components/Shared/PresentedBy.js +122 -0
- package/packages/classic-quiz-play/src/components/Shared/ScoreStateWrapper.js +443 -0
- package/packages/classic-quiz-play/src/components/Shared/Stepper.js +59 -0
- package/packages/classic-quiz-play/src/components/Shared/Stopwatch.js +109 -0
- package/packages/classic-quiz-play/src/components/Variants/Overlay/Error/OverlayError.js +45 -0
- package/packages/classic-quiz-play/src/components/Variants/Overlay/LeadCollection/OverlayLeadAfterCollection.js +35 -0
- package/packages/classic-quiz-play/src/components/Variants/Overlay/OverlayVariant.js +170 -0
- package/packages/classic-quiz-play/src/components/Variants/Overlay/OverlayVariant.styles.js +190 -0
- package/packages/classic-quiz-play/src/components/Variants/Overlay/ScoreState/OverlayScoreState.js +177 -0
- package/packages/classic-quiz-play/src/components/Variants/Overlay/ScoreState/OverlayScoreState.styles.js +373 -0
- package/packages/classic-quiz-play/src/components/Variants/Overlay/SignIn/OverlaySignIn.js +120 -0
- package/packages/classic-quiz-play/src/components/Variants/Overlay/SignIn/OverlaySignIn.styles.js +42 -0
- package/packages/classic-quiz-play/src/components/Variants/Split/Error/SplitError.js +42 -0
- package/packages/classic-quiz-play/src/components/Variants/Split/LeadCollection/SplitLeadAfterCollection.js +37 -0
- package/packages/classic-quiz-play/src/components/Variants/Split/ScoreState/SplitScoreState.js +231 -0
- package/packages/classic-quiz-play/src/components/Variants/Split/ScoreState/SplitScoreState.styles.js +353 -0
- package/packages/classic-quiz-play/src/components/Variants/Split/SignIn/SplitSignIn.js +118 -0
- package/packages/classic-quiz-play/src/components/Variants/Split/SignIn/SplitSignIn.styles.js +52 -0
- package/packages/classic-quiz-play/src/components/Variants/Split/SplitVariant.js +183 -0
- package/packages/classic-quiz-play/src/components/Variants/Split/SplitVariant.styles.js +145 -0
- package/packages/classic-quiz-play/src/components/Variants/Standard/Error/StandardError.js +43 -0
- package/packages/classic-quiz-play/src/components/Variants/Standard/LeadCollection/StandardLeadAfterCollection.js +35 -0
- package/packages/classic-quiz-play/src/components/Variants/Standard/ScoreState/StandardScoreState.js +220 -0
- package/packages/classic-quiz-play/src/components/Variants/Standard/ScoreState/StandardScoreState.styles.js +347 -0
- package/packages/classic-quiz-play/src/components/Variants/Standard/SignIn/StandardSignIn.js +117 -0
- package/packages/classic-quiz-play/src/components/Variants/Standard/SignIn/StandardSignIn.styles.js +52 -0
- package/packages/classic-quiz-play/src/components/Variants/Standard/StandardVariant.js +209 -0
- package/packages/classic-quiz-play/src/components/Variants/Standard/StandardVariant.styles.js +182 -0
- package/packages/classic-quiz-play/src/constants/constants.js +4 -0
- package/packages/classic-quiz-play/src/hooks/useClassicQuizById.js +18 -0
- package/packages/classic-quiz-play/src/hooks/useEmbedCodeContainer.js +30 -0
- package/packages/classic-quiz-play/src/hooks/useMyParticipation.js +40 -0
- package/packages/classic-quiz-play/src/hooks/useScoreStateHelpers.js +117 -0
- package/packages/classic-quiz-play/src/index.js +4 -0
- package/packages/classic-quiz-play/src/main.js +7 -0
- package/packages/collect-lead/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
- package/packages/collect-lead/src/assets/default-quiz-bg.png.js +4 -0
- package/packages/collect-lead/src/components/CollectLead.js +18 -0
- package/packages/collect-lead/src/components/Leads/CollectLeadWrapper.js +63 -0
- package/packages/collect-lead/src/components/Shared/MainCard.js +31 -0
- package/packages/collect-lead/src/components/Shared/PresentedBy.js +118 -0
- package/packages/collect-lead/src/components/Variants/Overlay/LeadOverlayVariant.js +72 -0
- package/packages/collect-lead/src/components/Variants/Overlay/LeadOverlayVariant.styles.js +187 -0
- package/packages/collect-lead/src/components/Variants/Split/LeadSplitVariant.js +81 -0
- package/packages/collect-lead/src/components/Variants/Split/LeadSplitVariant.styles.js +338 -0
- package/packages/collect-lead/src/components/Variants/Standard/LeadStandardVariant.js +82 -0
- package/packages/collect-lead/src/components/Variants/Standard/LeadStandardVariant.styles.js +313 -0
- package/packages/collect-lead/src/index.js +4 -0
- package/packages/collect-lead/src/main.js +39 -0
- package/packages/collect-lead/src/providers/ConfigurationProvider.js +50 -0
- package/packages/common/src/components/AdditionalCTA.js +24 -0
- package/packages/common/src/components/AlertMessage.js +88 -0
- package/packages/common/src/components/LeadCollection/OverlayLeadAfterCollection.js +111 -0
- package/packages/common/src/components/LeadCollection/SplitLeadAfterCollection.js +103 -0
- package/packages/common/src/components/LeadCollection/StandardLeadAfterCollection.js +101 -0
- package/packages/common/src/components/Leads/CollectLeadForm.js +72 -0
- package/packages/common/src/components/Leads/ConsentsCheckboxes.js +82 -0
- package/packages/common/src/components/Leads/LeadAgreementCheckbox.js +104 -0
- package/packages/common/src/components/Leads/LeadForm.js +498 -0
- package/packages/common/src/components/Portal.js +62 -0
- package/packages/common/src/components/Rules.js +299 -0
- package/packages/common/src/components/Skeletons/NotFoundSkeleton.js +83 -0
- package/packages/common/src/components/Skeletons/Overlay/ApiError/OverlayApiErrorSkeleton.js +80 -0
- package/packages/common/src/components/Skeletons/Overlay/ApiError/OverlayApiErrorSkeleton.styles.js +190 -0
- package/packages/common/src/components/Skeletons/Overlay/OverlaySkeleton.js +68 -0
- package/packages/common/src/components/Skeletons/Overlay/OverlaySkeleton.styles.js +100 -0
- package/packages/common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateSkeleton.js +65 -0
- package/packages/common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateSkeleton.styles.js +90 -0
- package/packages/common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateWrapperSkeleton.js +34 -0
- package/packages/common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateWrapperSkeleton.styles.js +55 -0
- package/packages/common/src/components/Skeletons/Overlay/SignIn/OverlaySignInSkeleton.js +58 -0
- package/packages/common/src/components/Skeletons/Overlay/SignIn/OverlaySignInSkeleton.styles.js +105 -0
- package/packages/common/src/components/Skeletons/Split/ApiError/SplitApiErrorSkeleton.js +98 -0
- package/packages/common/src/components/Skeletons/Split/ApiError/SplitApiErrorSkeleton.styles.js +167 -0
- package/packages/common/src/components/Skeletons/Split/ScoreState/SplitScoreStateSkeleton.js +64 -0
- package/packages/common/src/components/Skeletons/Split/ScoreState/SplitScoreStateSkeleton.styles.js +107 -0
- package/packages/common/src/components/Skeletons/Split/SignIn/SplitSignInSkeleton.js +55 -0
- package/packages/common/src/components/Skeletons/Split/SignIn/SplitSignInSkeleton.styles.js +94 -0
- package/packages/common/src/components/Skeletons/Split/SplitSkeleton.js +186 -0
- package/packages/common/src/components/Skeletons/Split/SplitSkeleton.styles.js +181 -0
- package/packages/common/src/components/Skeletons/Standard/ApiError/StandardApiErrorSkeleton.js +173 -0
- package/packages/common/src/components/Skeletons/Standard/ApiError/StandardApiErrorSkeleton.styles.js +275 -0
- package/packages/common/src/components/Skeletons/Standard/ScoreState/StandardContentSkeleton.js +23 -0
- package/packages/common/src/components/Skeletons/Standard/ScoreState/StandardContentSkeleton.styles.js +40 -0
- package/packages/common/src/components/Skeletons/Standard/ScoreState/StandardScoreStateSkeleton.js +142 -0
- package/packages/common/src/components/Skeletons/Standard/ScoreState/StandardScoreStateSkeleton.styles.js +203 -0
- package/packages/common/src/components/Skeletons/Standard/SignIn/StandardSignInSkeleton.js +157 -0
- package/packages/common/src/components/Skeletons/Standard/SignIn/StandardSignInSkeleton.styles.js +194 -0
- package/packages/common/src/components/Skeletons/Standard/StandardSkeleton.js +238 -0
- package/packages/common/src/components/Skeletons/Standard/StandardSkeleton.styles.js +211 -0
- package/packages/common/src/components/Spinner.js +36 -0
- package/packages/common/src/constants/constants.js +457 -0
- package/packages/common/src/enums/enums.js +4 -0
- package/packages/common/src/functions/helpers.js +58 -0
- package/packages/common/src/functions/i18n.js +69 -0
- package/packages/common/src/functions/theme.js +301 -0
- package/packages/common/src/hooks/useConstantContext.js +10 -0
- package/packages/common/src/hooks/useImageUrl.js +8 -0
- package/packages/common/src/hooks/useImageVariant.js +11 -0
- package/packages/common/src/hooks/useLeadForm.js +129 -0
- package/packages/common/src/hooks/useThemeMode.js +30 -0
- package/packages/common/src/locales/bg.json.js +363 -0
- package/packages/common/src/locales/de.json.js +362 -0
- package/packages/common/src/locales/el.json.js +362 -0
- package/packages/common/src/locales/en.json.js +368 -0
- package/packages/common/src/locales/es.json.js +362 -0
- package/packages/common/src/locales/fr-be.json.js +362 -0
- package/packages/common/src/locales/fr.json.js +362 -0
- package/packages/common/src/locales/it.json.js +362 -0
- package/packages/common/src/locales/pl.json.js +362 -0
- package/packages/common/src/locales/pt-br.json.js +362 -0
- package/packages/common/src/locales/pt.json.js +362 -0
- package/packages/common/src/locales/ro.json.js +362 -0
- package/packages/common/src/locales/sk.json.js +362 -0
- package/packages/common/src/locales/sr.json.js +362 -0
- package/packages/common/src/providers/ConstantsProvider.js +29 -0
- package/packages/common/src/providers/ContainerProvider.js +35 -0
- package/packages/common/src/providers/FontProvider.js +25 -0
- package/packages/common/src/providers/ThemeProvider.js +80 -0
- package/packages/event-game-play/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
- package/packages/event-game-play/src/assets/default-quiz-bg.png.js +4 -0
- package/packages/event-game-play/src/assets/school.svg.js +4 -0
- package/packages/event-game-play/src/assets/sports_score.svg.js +4 -0
- package/packages/event-game-play/src/components/EventGameNotFound.js +23 -0
- package/packages/event-game-play/src/components/EventGamePlay.js +318 -0
- package/packages/event-game-play/src/components/Shared/AlertMessage.js +93 -0
- package/packages/event-game-play/src/components/Shared/Countdown.js +125 -0
- package/packages/event-game-play/src/components/Shared/FinishedGameWrapper/FinishedGameWrapper.js +574 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/Boolean/BooleanFixture.js +60 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/Boolean/BooleanFixture.styles.js +29 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/Boolean/BooleanSelector.js +108 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/Boolean/BooleanSelector.styles.js +44 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/Number/NumberFixture.js +70 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/Number/NumberFixture.styles.js +37 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/Number/NumberSelector.js +82 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/Number/NumberSelector.styles.js +64 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/PointsDisplay/PointsDisplay.js +70 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/PointsDisplay/PointsDisplay.styles.js +98 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/Text/TextFixture.js +62 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/Text/TextFixture.styles.js +29 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/Text/TextSelector.js +344 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/Text/TextSelector.styles.js +70 -0
- package/packages/event-game-play/src/components/Shared/Fixtures/shared.styles.js +63 -0
- package/packages/event-game-play/src/components/Shared/Leaderboard/LeaderboardComponent.js +220 -0
- package/packages/event-game-play/src/components/Shared/Leaderboard/LeaderboardPagination.js +88 -0
- package/packages/event-game-play/src/components/Shared/MainCard.js +34 -0
- package/packages/event-game-play/src/components/Shared/Notification.js +67 -0
- package/packages/event-game-play/src/components/Shared/Stepper.js +151 -0
- package/packages/event-game-play/src/components/Shared/Summary/EditPredictionModal.js +163 -0
- package/packages/event-game-play/src/components/Shared/Summary/EditPredictionModal.styles.js +110 -0
- package/packages/event-game-play/src/components/Shared/Summary/PredictionSummary.js +118 -0
- package/packages/event-game-play/src/components/Shared/Summary/PredictionSummary.styles.js +180 -0
- package/packages/event-game-play/src/components/Variants/Overlay/Error/EventGameOverlayError.js +30 -0
- package/packages/event-game-play/src/components/Variants/Overlay/EventGameOverlayVariant.js +348 -0
- package/packages/event-game-play/src/components/Variants/Overlay/EventGameOverlayVariant.styles.js +213 -0
- package/packages/event-game-play/src/components/Variants/Overlay/FinishedGame/EventGameOverlayFinishedGame.js +130 -0
- package/packages/event-game-play/src/components/Variants/Overlay/FinishedGame/EventGameOverlayFinishedGame.styles.js +712 -0
- package/packages/event-game-play/src/components/Variants/Overlay/ScoreState/EventGameOverlayScoreState.js +141 -0
- package/packages/event-game-play/src/components/Variants/Overlay/ScoreState/EventGameOverlayScoreState.styles.js +156 -0
- package/packages/event-game-play/src/components/Variants/Split/Error/EventGameSplitError.js +28 -0
- package/packages/event-game-play/src/components/Variants/Split/EventGameSplitVariant.js +347 -0
- package/packages/event-game-play/src/components/Variants/Split/EventGameSplitVariant.styles.js +149 -0
- package/packages/event-game-play/src/components/Variants/Split/FinishedGame/EventGameSplitFinishedGame.js +119 -0
- package/packages/event-game-play/src/components/Variants/Split/FinishedGame/EventGameSplitFinishedGame.styles.js +230 -0
- package/packages/event-game-play/src/components/Variants/Split/ScoreState/EventGameSplitScoreState.js +139 -0
- package/packages/event-game-play/src/components/Variants/Split/ScoreState/EventGameSplitScoreState.styles.js +45 -0
- package/packages/event-game-play/src/components/Variants/Standard/Error/EventGameStandardError.js +29 -0
- package/packages/event-game-play/src/components/Variants/Standard/EventGameStandardVariant.js +329 -0
- package/packages/event-game-play/src/components/Variants/Standard/EventGameStandardVariant.styles.js +373 -0
- package/packages/event-game-play/src/components/Variants/Standard/FinishedGame/EventGameStandardFinishedGame.js +219 -0
- package/packages/event-game-play/src/components/Variants/Standard/FinishedGame/EventGameStandardFinishedGame.styles.js +548 -0
- package/packages/event-game-play/src/components/Variants/Standard/ScoreState/EventGameStandardScoreState.js +117 -0
- package/packages/event-game-play/src/components/Variants/Standard/ScoreState/EventGameStandardScoreState.styles.js +259 -0
- package/packages/event-game-play/src/helpers/helpers.js +11 -0
- package/packages/event-game-play/src/hooks/useEventGameById.js +27 -0
- package/packages/event-game-play/src/hooks/useEventGamePrediction.js +54 -0
- package/packages/event-game-play/src/hooks/useEventRankings.js +61 -0
- package/packages/event-game-play/src/index.js +4 -0
- package/packages/event-game-play/src/main.js +7 -0
- package/packages/event-game-play/src/providers/ConstantsProvider.js +17 -0
- package/packages/match-quiz-play/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
- package/packages/match-quiz-play/src/assets/default-quiz-bg.png.js +4 -0
- package/packages/match-quiz-play/src/assets/school.svg.js +4 -0
- package/packages/match-quiz-play/src/assets/sports_score.svg.js +4 -0
- package/packages/match-quiz-play/src/components/Leads/CollectLeadWrapper.js +65 -0
- package/packages/match-quiz-play/src/components/MatchQuizNotFound.js +23 -0
- package/packages/match-quiz-play/src/components/MatchQuizPlay.js +490 -0
- package/packages/match-quiz-play/src/components/Shared/AlertMessage.js +93 -0
- package/packages/match-quiz-play/src/components/Shared/Countdown.js +125 -0
- package/packages/match-quiz-play/src/components/Shared/FinishedGameWrapper/EarnedPointsDisplay.js +64 -0
- package/packages/match-quiz-play/src/components/Shared/FinishedGameWrapper/FinishedGameWrapper.js +854 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoFixture.js +63 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoFixture.styles.js +29 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoSelector.js +143 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoSelector.styles.js +101 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoSelectorSplit.js +97 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoSelectorSplit.styles.js +77 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/Corners/CornersFixture.js +61 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/Corners/CornersFixture.styles.js +29 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/Corners/CornersSelector.js +63 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/Corners/CornersSelector.styles.js +41 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/CorrectScoreFixture.js +72 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/CorrectScoreFixture.styles.js +30 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/ScoreSelector.js +179 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/ScoreSelector.styles.js +163 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/ScoreSelectorSplit.js +103 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/ScoreSelectorSplit.styles.js +86 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/Players/PlayersFixture.js +79 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/Players/PlayersFixture.styles.js +29 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/Players/PlayersSelector.js +213 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/Players/PlayersSelector.styles.js +293 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/PointsDisplay/PointsDisplay.js +116 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/PointsDisplay/PointsDisplay.styles.js +98 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/YesNo/YesNoFixture.js +72 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/YesNo/YesNoFixture.styles.js +29 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/YesNo/YesNoSelector.js +108 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/YesNo/YesNoSelector.styles.js +44 -0
- package/packages/match-quiz-play/src/components/Shared/Fixtures/shared.styles.js +63 -0
- package/packages/match-quiz-play/src/components/Shared/Leaderboard/LeaderboardComponent.js +220 -0
- package/packages/match-quiz-play/src/components/Shared/Leaderboard/RoundedPagination.js +207 -0
- package/packages/match-quiz-play/src/components/Shared/MainCard.js +34 -0
- package/packages/match-quiz-play/src/components/Shared/Notification.js +67 -0
- package/packages/match-quiz-play/src/components/Shared/PresentedBy.js +118 -0
- package/packages/match-quiz-play/src/components/Shared/Stepper.js +151 -0
- package/packages/match-quiz-play/src/components/Shared/Summary/EditPredictionModal.js +172 -0
- package/packages/match-quiz-play/src/components/Shared/Summary/EditPredictionModal.styles.js +109 -0
- package/packages/match-quiz-play/src/components/Shared/Summary/PredictionSummary.js +235 -0
- package/packages/match-quiz-play/src/components/Shared/Summary/PredictionSummary.styles.js +219 -0
- package/packages/match-quiz-play/src/components/Variants/Overlay/Error/MatchQuizOverlayError.js +45 -0
- package/packages/match-quiz-play/src/components/Variants/Overlay/FinishedGame/MatchQuizOverlayFinishedGame.js +157 -0
- package/packages/match-quiz-play/src/components/Variants/Overlay/FinishedGame/MatchQuizOverlayFinishedGame.styles.js +710 -0
- package/packages/match-quiz-play/src/components/Variants/Overlay/LeadCollection/OverlayLeadAfterCollection.js +35 -0
- package/packages/match-quiz-play/src/components/Variants/Overlay/MatchQuizOverlayVariant.js +499 -0
- package/packages/match-quiz-play/src/components/Variants/Overlay/MatchQuizOverlayVariant.styles.js +213 -0
- package/packages/match-quiz-play/src/components/Variants/Overlay/ScoreState/MatchQuizOverlayScoreState.js +178 -0
- package/packages/match-quiz-play/src/components/Variants/Overlay/ScoreState/MatchQuizOverlayScoreState.styles.js +128 -0
- package/packages/match-quiz-play/src/components/Variants/Overlay/SignIn/MatchQuizOverlaySignIn.js +120 -0
- package/packages/match-quiz-play/src/components/Variants/Overlay/SignIn/MatchQuizOverlaySignIn.styles.js +42 -0
- package/packages/match-quiz-play/src/components/Variants/Split/Error/MatchQuizSplitError.js +42 -0
- package/packages/match-quiz-play/src/components/Variants/Split/FinishedGame/MatchQuizSplitFinishedGame.js +185 -0
- package/packages/match-quiz-play/src/components/Variants/Split/FinishedGame/MatchQuizSplitFinishedGame.styles.js +233 -0
- package/packages/match-quiz-play/src/components/Variants/Split/LeadCollection/SplitLeadAfterCollection.js +37 -0
- package/packages/match-quiz-play/src/components/Variants/Split/MatchQuizSplitVariant.js +511 -0
- package/packages/match-quiz-play/src/components/Variants/Split/MatchQuizSplitVariant.styles.js +149 -0
- package/packages/match-quiz-play/src/components/Variants/Split/ScoreState/MatchQuizSplitScoreState.js +164 -0
- package/packages/match-quiz-play/src/components/Variants/Split/ScoreState/MatchQuizSplitScoreState.styles.js +27 -0
- package/packages/match-quiz-play/src/components/Variants/Split/SignIn/MatchQuizSplitSignIn.js +118 -0
- package/packages/match-quiz-play/src/components/Variants/Split/SignIn/MatchQuizSplitSignIn.styles.js +52 -0
- package/packages/match-quiz-play/src/components/Variants/Standard/Error/MatchQuizStandardError.js +43 -0
- package/packages/match-quiz-play/src/components/Variants/Standard/FinishedGame/MatchQuizStandardFinishedGame.js +234 -0
- package/packages/match-quiz-play/src/components/Variants/Standard/FinishedGame/MatchQuizStandardFinishedGame.styles.js +548 -0
- package/packages/match-quiz-play/src/components/Variants/Standard/LeadCollection/StandardLeadAfterCollection.js +35 -0
- package/packages/match-quiz-play/src/components/Variants/Standard/MatchQuizStandardVariant.js +513 -0
- package/packages/match-quiz-play/src/components/Variants/Standard/MatchQuizStandardVariant.styles.js +376 -0
- package/packages/match-quiz-play/src/components/Variants/Standard/ScoreState/MatchQuizStandardScoreState.js +135 -0
- package/packages/match-quiz-play/src/components/Variants/Standard/ScoreState/MatchQuizStandardScoreState.styles.js +259 -0
- package/packages/match-quiz-play/src/components/Variants/Standard/SignIn/MatchQuizStandardSignIn.js +129 -0
- package/packages/match-quiz-play/src/components/Variants/Standard/SignIn/MatchQuizStandardSignIn.styles.js +239 -0
- package/packages/match-quiz-play/src/helpers/helpers.js +9 -0
- package/packages/match-quiz-play/src/hooks/useMatchQuiz.js +42 -0
- package/packages/match-quiz-play/src/hooks/useMatchQuizLeaderboard.js +53 -0
- package/packages/match-quiz-play/src/hooks/useMatchQuizMarketsResults.js +29 -0
- package/packages/match-quiz-play/src/hooks/useMatchQuizPrediction.js +38 -0
- package/packages/match-quiz-play/src/index.js +4 -0
- package/packages/match-quiz-play/src/main.js +7 -0
- package/packages/match-quiz-play/src/providers/ConstantsProvider.js +26 -0
- package/packages/personality-quiz-play/dist/personality-quiz-play.es.js +39513 -0
- package/packages/poll-vote/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
- package/packages/poll-vote/src/assets/default-quiz-bg.png.js +4 -0
- package/packages/poll-vote/src/components/Leads/CollectLeadWrapper.js +65 -0
- package/packages/poll-vote/src/components/PollNotFound.js +23 -0
- package/packages/poll-vote/src/components/PollVote.js +270 -0
- package/packages/poll-vote/src/components/Shared/AlertMessage.js +93 -0
- package/packages/poll-vote/src/components/Shared/Answers/PollOption.js +132 -0
- package/packages/poll-vote/src/components/Shared/Answers/PollOptions.js +82 -0
- package/packages/poll-vote/src/components/Shared/Button.js +76 -0
- package/packages/poll-vote/src/components/Shared/MainCard.js +36 -0
- package/packages/poll-vote/src/components/Shared/PresentedBy.js +118 -0
- package/packages/poll-vote/src/components/Shared/Results/PollOptionResult.js +257 -0
- package/packages/poll-vote/src/components/Shared/Results/PollOptionsResults.js +232 -0
- package/packages/poll-vote/src/components/Variants/Overlay/Error/PollOverlayError.js +45 -0
- package/packages/poll-vote/src/components/Variants/Overlay/LeadCollection/OverlayLeadAfterCollection.js +34 -0
- package/packages/poll-vote/src/components/Variants/Overlay/PollOverlayVariant.js +137 -0
- package/packages/poll-vote/src/components/Variants/Overlay/PollOverlayVariant.styles.js +105 -0
- package/packages/poll-vote/src/components/Variants/Overlay/ScoreState/PollOverlayScoreState.js +107 -0
- package/packages/poll-vote/src/components/Variants/Overlay/ScoreState/PollOverlayScoreState.styles.js +178 -0
- package/packages/poll-vote/src/components/Variants/Overlay/SignIn/PollOverlaySignIn.js +120 -0
- package/packages/poll-vote/src/components/Variants/Overlay/SignIn/PollOverlaySignIn.styles.js +42 -0
- package/packages/poll-vote/src/components/Variants/Split/Error/PollSplitError.js +42 -0
- package/packages/poll-vote/src/components/Variants/Split/LeadCollection/SplitLeadAfterCollection.js +36 -0
- package/packages/poll-vote/src/components/Variants/Split/PollSplitVariant.js +231 -0
- package/packages/poll-vote/src/components/Variants/Split/PollSplitVariant.styles.js +332 -0
- package/packages/poll-vote/src/components/Variants/Split/ScoreState/PollSplitScoreState.js +155 -0
- package/packages/poll-vote/src/components/Variants/Split/ScoreState/PollSplitScoreState.styles.js +156 -0
- package/packages/poll-vote/src/components/Variants/Split/SignIn/PollSplitSignIn.js +117 -0
- package/packages/poll-vote/src/components/Variants/Split/SignIn/PollSplitSignIn.styles.js +52 -0
- package/packages/poll-vote/src/components/Variants/Standard/Error/PollStandardError.js +43 -0
- package/packages/poll-vote/src/components/Variants/Standard/LeadCollection/StandardLeadAfterCollection.js +34 -0
- package/packages/poll-vote/src/components/Variants/Standard/PollStandardVariant.js +138 -0
- package/packages/poll-vote/src/components/Variants/Standard/PollStandardVariant.styles.js +92 -0
- package/packages/poll-vote/src/components/Variants/Standard/ScoreState/PollStandardScoreState.js +146 -0
- package/packages/poll-vote/src/components/Variants/Standard/ScoreState/PollStandardScoreState.styles.js +164 -0
- package/packages/poll-vote/src/components/Variants/Standard/SignIn/PollStandardSignIn.js +129 -0
- package/packages/poll-vote/src/components/Variants/Standard/SignIn/PollStandardSignIn.styles.js +248 -0
- package/packages/poll-vote/src/hooks/useEmbedCodeContainer.js +30 -0
- package/packages/poll-vote/src/hooks/useMyPollVote.js +43 -0
- package/packages/poll-vote/src/hooks/usePollById.js +16 -0
- package/packages/poll-vote/src/hooks/usePollOptionsImages.js +19 -0
- package/packages/poll-vote/src/index.js +4 -0
- package/packages/poll-vote/src/main.js +7 -0
- package/components.js +0 -105201
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { j as t } from "../../../../../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { Box as a, Button as _, Typography as l, AspectRatio as G } from "@mui/joy";
|
|
3
|
+
import ue from "react";
|
|
4
|
+
import Y from "../../../../../../node_modules/@mui/icons-material/esm/ArrowRightAlt.js";
|
|
5
|
+
import { useSpacingScale as de, useInternalTheme as xe, isMobile as he, isLarge as ge } from "../../../../../common/src/functions/theme.js";
|
|
6
|
+
import { extractBrandingProperties as fe } from "../../../../../common/src/functions/helpers.js";
|
|
7
|
+
import "../../../../../../node_modules/i18next/dist/esm/i18next.js";
|
|
8
|
+
import "../../../../../../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
|
|
9
|
+
import { WidgetTemplate as ye } from "../../../../../common/src/enums/enums.js";
|
|
10
|
+
import { useConstantContext as be } from "../../../../../common/src/hooks/useConstantContext.js";
|
|
11
|
+
import { ConstantsContext as Ce } from "../../../../../common/src/providers/ConstantsProvider.js";
|
|
12
|
+
import Qe from "../../../../../common/src/components/Skeletons/Overlay/OverlaySkeleton.js";
|
|
13
|
+
import { useImageUrl as ze } from "../../../../../common/src/hooks/useImageUrl.js";
|
|
14
|
+
import { useImageVariant as je } from "../../../../../common/src/hooks/useImageVariant.js";
|
|
15
|
+
import "../../../../../common/src/providers/ContainerProvider.js";
|
|
16
|
+
import Se from "../../Shared/Answers/Answers.js";
|
|
17
|
+
import qe from "../../Shared/Stopwatch.js";
|
|
18
|
+
import Te from "../../../assets/default-quiz-bg.png.js";
|
|
19
|
+
import we from "../../../assets/default-quiz-bg-vertical.jpg.js";
|
|
20
|
+
import Ie from "../../Shared/PresentedBy.js";
|
|
21
|
+
import ke from "../../Leads/CollectLeadWrapper.js";
|
|
22
|
+
import { quizTypes as Be } from "../../../constants/constants.js";
|
|
23
|
+
import { useEmbedCode as Le } from "../../../hooks/useEmbedCodeContainer.js";
|
|
24
|
+
import { createStyles as Pe } from "./OverlayVariant.styles.js";
|
|
25
|
+
import { useTranslation as Re } from "../../../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
26
|
+
const nt = (e) => {
|
|
27
|
+
var x, h, g, f, y, b, C, Q, z, j, S, q, T, w, I, k, B, L, P, R, A, U, D, F, v, O;
|
|
28
|
+
const [c, H] = ue.useState(
|
|
29
|
+
((x = e.leads) == null ? void 0 : x.position) === "before" && e.classicQuiz.authRequirement === "LEAD"
|
|
30
|
+
), { optionsLayout: J } = be(Ce), K = de(), n = xe(), m = he(), u = ge(), r = ze(e.question.images), { t: o } = Re(), X = Le(
|
|
31
|
+
e.question.embedCode,
|
|
32
|
+
e.applyFilterScreen
|
|
33
|
+
), { brandingImage: Z, brandingColors: s, brandingLogo: $ } = fe(e.classicQuiz.branding || null), p = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : m ? we : Te, ee = Z || je(
|
|
34
|
+
{
|
|
35
|
+
images: e.classicQuiz.images,
|
|
36
|
+
imagePlaceholder: p
|
|
37
|
+
},
|
|
38
|
+
ye.OVERLAY
|
|
39
|
+
), te = e.currentQuestion === e.classicQuiz.questionsCount && ((h = e.leads) == null ? void 0 : h.position) === "after" ? o("classicQuiz.buttons.continue") : e.currentQuestion === e.classicQuiz.questionsCount ? o("classicQuiz.buttons.finish") : o("classicQuiz.buttons.next"), ie = n.customRadius.dark.sm, se = (s == null ? void 0 : s.backgroundColor) || ((f = (g = n.colorSchemes) == null ? void 0 : g.dark) == null ? void 0 : f.surfaceVariant), ne = (b = (y = n.customRadius) == null ? void 0 : y.light) == null ? void 0 : b.xl, ae = (s == null ? void 0 : s.primaryColor) || ((j = (z = (Q = (C = n.colorSchemes) == null ? void 0 : C.light) == null ? void 0 : Q.palette) == null ? void 0 : z.primary) == null ? void 0 : j.plainColor), oe = (w = (T = (q = (S = n.colorSchemes) == null ? void 0 : S.light) == null ? void 0 : q.palette) == null ? void 0 : T.primary) == null ? void 0 : w.onPrimary, le = n.customFontFamily.dark.primary, ce = (s == null ? void 0 : s.contentColor) || n.colorSchemes.dark.textColor, re = n.colorSchemes.dark.textColor, i = Pe({
|
|
40
|
+
spacingScale: K,
|
|
41
|
+
smBorderRadius: ie,
|
|
42
|
+
contentBgColor: se,
|
|
43
|
+
buttonRadius: ne,
|
|
44
|
+
primaryColor: ae,
|
|
45
|
+
onPrimaryColor: oe,
|
|
46
|
+
fontFamilyPrimary: le,
|
|
47
|
+
secondaryColor: ce,
|
|
48
|
+
darkTextColor: re,
|
|
49
|
+
isMobile: m,
|
|
50
|
+
isLarge: u
|
|
51
|
+
}), me = () => {
|
|
52
|
+
H(!1);
|
|
53
|
+
}, d = () => {
|
|
54
|
+
var W, E, N, V, M;
|
|
55
|
+
return /* @__PURE__ */ t.jsx(
|
|
56
|
+
Ie,
|
|
57
|
+
{
|
|
58
|
+
brandingLogo: $,
|
|
59
|
+
textColor: n.colorSchemes.dark.textColor,
|
|
60
|
+
label: ((W = e.classicQuiz.labels) == null ? void 0 : W.sponsor) || null,
|
|
61
|
+
primaryUrl: (N = (E = e.classicQuiz.branding) == null ? void 0 : E.urls) == null ? void 0 : N.primaryUrl,
|
|
62
|
+
secondaryUrl: (M = (V = e.classicQuiz.branding) == null ? void 0 : V.urls) == null ? void 0 : M.secondaryUrl
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ t.jsx(
|
|
67
|
+
Qe,
|
|
68
|
+
{
|
|
69
|
+
entity: e.classicQuiz,
|
|
70
|
+
headline: o("classicQuiz.headline"),
|
|
71
|
+
finalImage: ee,
|
|
72
|
+
rulesDisplay: e.rulesDisplay,
|
|
73
|
+
children: e.applyFilterScreen ? /* @__PURE__ */ t.jsxs(a, { sx: i.filterScreenBottomContainer, children: [
|
|
74
|
+
d(),
|
|
75
|
+
/* @__PURE__ */ t.jsx(
|
|
76
|
+
_,
|
|
77
|
+
{
|
|
78
|
+
variant: "soft",
|
|
79
|
+
sx: {
|
|
80
|
+
...i.startButton,
|
|
81
|
+
...i.pulseAnimation
|
|
82
|
+
},
|
|
83
|
+
endDecorator: /* @__PURE__ */ t.jsx(Y, {}),
|
|
84
|
+
onClick: e.startPlaying,
|
|
85
|
+
children: /* @__PURE__ */ t.jsx(l, { sx: i.startButtonText, children: o("classicQuiz.buttons.start") })
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] }) : /* @__PURE__ */ t.jsxs(a, { sx: i.mainContentSection, children: [
|
|
89
|
+
!c && Be.includes((I = e.classicQuiz.type) == null ? void 0 : I.toLocaleLowerCase()) && /* @__PURE__ */ t.jsx(a, { sx: i.stopwatchContainer, children: /* @__PURE__ */ t.jsx(
|
|
90
|
+
qe,
|
|
91
|
+
{
|
|
92
|
+
brandingPrimaryColor: (s == null ? void 0 : s.primaryColor) || null,
|
|
93
|
+
isRunning: e.isStopwatchRunning,
|
|
94
|
+
timer: e.stopwatchTime,
|
|
95
|
+
quizType: e.classicQuiz.type,
|
|
96
|
+
onTimeUpdate: e.onTimeUpdate,
|
|
97
|
+
initialTime: e.classicQuiz.time || 10
|
|
98
|
+
}
|
|
99
|
+
) }),
|
|
100
|
+
/* @__PURE__ */ t.jsx(a, { sx: i.contentContainerWithBackdrop, children: c ? /* @__PURE__ */ t.jsx(
|
|
101
|
+
ke,
|
|
102
|
+
{
|
|
103
|
+
sdk: e.sdk,
|
|
104
|
+
startGame: me,
|
|
105
|
+
contentId: e.classicQuiz.id,
|
|
106
|
+
contentName: e.classicQuiz.title,
|
|
107
|
+
brandingColors: (k = e.classicQuiz.branding) == null ? void 0 : k.colors,
|
|
108
|
+
brandingUrls: (B = e.classicQuiz.branding) == null ? void 0 : B.urls,
|
|
109
|
+
campaignId: (L = e.leads) == null ? void 0 : L.campaignId,
|
|
110
|
+
campaignName: (P = e.leads) == null ? void 0 : P.campaignName,
|
|
111
|
+
fields: (R = e.leads) == null ? void 0 : R.fields,
|
|
112
|
+
leadTitle: (A = e.classicQuiz.labels) == null ? void 0 : A.leadTitle,
|
|
113
|
+
leadDescription: (U = e.classicQuiz.labels) == null ? void 0 : U.leadDescription,
|
|
114
|
+
leadCta: (D = e.classicQuiz.labels) == null ? void 0 : D.leadCta,
|
|
115
|
+
leadSuccessTitle: (F = e.classicQuiz.labels) == null ? void 0 : F.leadSuccessTitle,
|
|
116
|
+
leadSuccessDescription: (v = e.classicQuiz.labels) == null ? void 0 : v.leadSuccessDescription,
|
|
117
|
+
syncWithProfile: (O = e.leads) == null ? void 0 : O.syncWithProfile
|
|
118
|
+
}
|
|
119
|
+
) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
120
|
+
e.question.embedCode && /* @__PURE__ */ t.jsx(G, { ratio: "16/9", sx: i.aspectRatioContainer, children: /* @__PURE__ */ t.jsx(a, { ref: X }) }),
|
|
121
|
+
!e.question.embedCode && r && /* @__PURE__ */ t.jsx(G, { ratio: "16/9", sx: i.questionImageContainer, children: /* @__PURE__ */ t.jsx(a, { sx: i.questionImageBox, children: /* @__PURE__ */ t.jsx(
|
|
122
|
+
"img",
|
|
123
|
+
{
|
|
124
|
+
src: r,
|
|
125
|
+
alt: "Question illustration",
|
|
126
|
+
style: i.questionImage
|
|
127
|
+
}
|
|
128
|
+
) }) }),
|
|
129
|
+
/* @__PURE__ */ t.jsxs(a, { sx: i.questionSection, children: [
|
|
130
|
+
/* @__PURE__ */ t.jsxs(l, { level: "body-lg", sx: i.questionStepsText, children: [
|
|
131
|
+
e.currentQuestion,
|
|
132
|
+
"/",
|
|
133
|
+
e.classicQuiz.questionsCount
|
|
134
|
+
] }),
|
|
135
|
+
/* @__PURE__ */ t.jsx(l, { level: "body-lg", sx: i.questionText, children: e.question.question })
|
|
136
|
+
] }),
|
|
137
|
+
/* @__PURE__ */ t.jsx(
|
|
138
|
+
Se,
|
|
139
|
+
{
|
|
140
|
+
options: e.question.options || [],
|
|
141
|
+
answerQuestion: e.answerQuestion,
|
|
142
|
+
selectedOption: e.selectedOption,
|
|
143
|
+
showAnswer: e.showAnswer,
|
|
144
|
+
optionsLayout: u ? "column" : J ?? "row",
|
|
145
|
+
questionImage: r,
|
|
146
|
+
brandingColors: s
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
] }) }),
|
|
150
|
+
/* @__PURE__ */ t.jsxs(a, { sx: i.bottomFooterContainer, children: [
|
|
151
|
+
d(),
|
|
152
|
+
!c && /* @__PURE__ */ t.jsx(
|
|
153
|
+
_,
|
|
154
|
+
{
|
|
155
|
+
variant: "soft",
|
|
156
|
+
disabled: e.selectedOption === null || e.showAnswer || e.isSubmitting,
|
|
157
|
+
sx: i.nextButton,
|
|
158
|
+
endDecorator: /* @__PURE__ */ t.jsx(Y, {}),
|
|
159
|
+
onClick: e.handleNext,
|
|
160
|
+
children: /* @__PURE__ */ t.jsx(l, { sx: i.nextButtonText, children: te })
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
] })
|
|
164
|
+
] })
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
};
|
|
168
|
+
export {
|
|
169
|
+
nt as default
|
|
170
|
+
};
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
const o = (e) => ({
|
|
2
|
+
// Pulse animation for buttons
|
|
3
|
+
pulseAnimation: {
|
|
4
|
+
"@keyframes pulse": {
|
|
5
|
+
"0%": { transform: "scale(1)" },
|
|
6
|
+
"50%": { transform: "scale(1.05)" },
|
|
7
|
+
"100%": { transform: "scale(1)" }
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
// Filter screen bottom container
|
|
11
|
+
filterScreenBottomContainer: {
|
|
12
|
+
display: "flex",
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
justifyContent: "space-between",
|
|
15
|
+
flexDirection: e.isMobile ? "column-reverse" : "row",
|
|
16
|
+
gap: e.spacingScale.md
|
|
17
|
+
},
|
|
18
|
+
// Start button (filter screen)
|
|
19
|
+
startButton: {
|
|
20
|
+
borderRadius: e.buttonRadius,
|
|
21
|
+
bgcolor: e.primaryColor,
|
|
22
|
+
color: "#FFFFFF",
|
|
23
|
+
py: "10px",
|
|
24
|
+
pr: "12px",
|
|
25
|
+
pl: "16px",
|
|
26
|
+
"&:hover": {
|
|
27
|
+
bgcolor: e.primaryColor
|
|
28
|
+
},
|
|
29
|
+
"&:active": {
|
|
30
|
+
color: e.onPrimaryColor
|
|
31
|
+
},
|
|
32
|
+
animation: "pulse 1s infinite",
|
|
33
|
+
fontSize: "0.9375em",
|
|
34
|
+
"--Icon-color": e.onPrimaryColor
|
|
35
|
+
},
|
|
36
|
+
// Start button text
|
|
37
|
+
startButtonText: {
|
|
38
|
+
fontFamily: e.fontFamilyPrimary,
|
|
39
|
+
fontWeight: 500,
|
|
40
|
+
fontSize: "0.9375em",
|
|
41
|
+
lineHeight: "24px",
|
|
42
|
+
letterSpacing: "0.46px",
|
|
43
|
+
textTransform: "uppercase",
|
|
44
|
+
color: e.onPrimaryColor,
|
|
45
|
+
gap: "8px",
|
|
46
|
+
display: "flex",
|
|
47
|
+
alignItems: "center"
|
|
48
|
+
},
|
|
49
|
+
// Main content section (non-filter screen)
|
|
50
|
+
mainContentSection: {
|
|
51
|
+
display: "flex",
|
|
52
|
+
flexDirection: "column",
|
|
53
|
+
gap: "24px"
|
|
54
|
+
},
|
|
55
|
+
// Stopwatch container
|
|
56
|
+
stopwatchContainer: {
|
|
57
|
+
display: "flex",
|
|
58
|
+
justifyContent: "center"
|
|
59
|
+
},
|
|
60
|
+
// Content container with backdrop
|
|
61
|
+
contentContainerWithBackdrop: {
|
|
62
|
+
borderRadius: e.smBorderRadius,
|
|
63
|
+
p: e.spacingScale.md,
|
|
64
|
+
display: "flex",
|
|
65
|
+
flexDirection: "column",
|
|
66
|
+
gap: e.spacingScale.md,
|
|
67
|
+
backdropFilter: "blur(4px)",
|
|
68
|
+
position: "relative",
|
|
69
|
+
"&::before": {
|
|
70
|
+
content: '""',
|
|
71
|
+
position: "absolute",
|
|
72
|
+
top: 0,
|
|
73
|
+
left: 0,
|
|
74
|
+
right: 0,
|
|
75
|
+
bottom: 0,
|
|
76
|
+
backgroundColor: e.contentBgColor,
|
|
77
|
+
opacity: 0.5,
|
|
78
|
+
borderRadius: "inherit",
|
|
79
|
+
zIndex: 0
|
|
80
|
+
},
|
|
81
|
+
"& > *": {
|
|
82
|
+
position: "relative",
|
|
83
|
+
zIndex: 1
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
// Aspect ratio container for embed/image
|
|
87
|
+
aspectRatioContainer: {
|
|
88
|
+
borderRadius: e.smBorderRadius
|
|
89
|
+
},
|
|
90
|
+
// Question image container
|
|
91
|
+
questionImageContainer: {
|
|
92
|
+
overflow: "hidden",
|
|
93
|
+
borderRadius: e.smBorderRadius
|
|
94
|
+
},
|
|
95
|
+
// Question image box
|
|
96
|
+
questionImageBox: {
|
|
97
|
+
borderRadius: e.smBorderRadius,
|
|
98
|
+
overflow: "hidden",
|
|
99
|
+
height: "auto"
|
|
100
|
+
},
|
|
101
|
+
// Question image
|
|
102
|
+
questionImage: {
|
|
103
|
+
width: "100%",
|
|
104
|
+
height: "100%",
|
|
105
|
+
objectFit: "cover"
|
|
106
|
+
},
|
|
107
|
+
// Question section
|
|
108
|
+
questionSection: {
|
|
109
|
+
display: e.isLarge ? "block" : "flex",
|
|
110
|
+
gap: "8px",
|
|
111
|
+
alignItems: "flex-start",
|
|
112
|
+
justifyContent: "center"
|
|
113
|
+
},
|
|
114
|
+
// Question steps typography
|
|
115
|
+
questionStepsText: {
|
|
116
|
+
fontFamily: e.fontFamilyPrimary,
|
|
117
|
+
lineHeight: "150%",
|
|
118
|
+
letterSpacing: "0.15px",
|
|
119
|
+
fontWeight: 500,
|
|
120
|
+
fontSize: "1.25em",
|
|
121
|
+
color: e.secondaryColor,
|
|
122
|
+
opacity: "70%",
|
|
123
|
+
textAlign: "center"
|
|
124
|
+
},
|
|
125
|
+
// Question text
|
|
126
|
+
questionText: {
|
|
127
|
+
fontFamily: e.fontFamilyPrimary,
|
|
128
|
+
lineHeight: "150%",
|
|
129
|
+
letterSpacing: "0.15px",
|
|
130
|
+
fontWeight: 500,
|
|
131
|
+
fontSize: "1.25em",
|
|
132
|
+
textAlign: "center",
|
|
133
|
+
color: e.darkTextColor
|
|
134
|
+
},
|
|
135
|
+
// Bottom footer container
|
|
136
|
+
bottomFooterContainer: {
|
|
137
|
+
display: "flex",
|
|
138
|
+
alignItems: "center",
|
|
139
|
+
justifyContent: e.isMobile ? "center" : "space-between",
|
|
140
|
+
flexDirection: e.isMobile ? "column-reverse" : "row",
|
|
141
|
+
gap: e.spacingScale.md
|
|
142
|
+
},
|
|
143
|
+
// Next button
|
|
144
|
+
nextButton: {
|
|
145
|
+
borderRadius: e.buttonRadius,
|
|
146
|
+
py: "10px",
|
|
147
|
+
pr: "12px",
|
|
148
|
+
pl: "16px",
|
|
149
|
+
bgcolor: e.primaryColor,
|
|
150
|
+
color: e.onPrimaryColor,
|
|
151
|
+
transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
|
|
152
|
+
transform: "scale(1)",
|
|
153
|
+
ml: e.isMobile ? 0 : { md: "auto" },
|
|
154
|
+
"&:hover": {
|
|
155
|
+
bgcolor: e.primaryColor,
|
|
156
|
+
transform: "scale(1.02)",
|
|
157
|
+
boxShadow: "var(--joy-shadow-md)"
|
|
158
|
+
},
|
|
159
|
+
"&:active": {
|
|
160
|
+
color: e.onPrimaryColor,
|
|
161
|
+
transform: "scale(0.98)",
|
|
162
|
+
boxShadow: "var(--joy-shadow-md)"
|
|
163
|
+
},
|
|
164
|
+
"&:disabled": {
|
|
165
|
+
bgcolor: e.primaryColor,
|
|
166
|
+
color: e.onPrimaryColor,
|
|
167
|
+
opacity: "34%",
|
|
168
|
+
boxShadow: "var(--joy-shadow-md)"
|
|
169
|
+
},
|
|
170
|
+
"--Icon-color": e.onPrimaryColor,
|
|
171
|
+
fontSize: "0.9375em",
|
|
172
|
+
boxShadow: "var(--joy-shadow-md)"
|
|
173
|
+
},
|
|
174
|
+
// Next button text
|
|
175
|
+
nextButtonText: {
|
|
176
|
+
fontFamily: e.fontFamilyPrimary,
|
|
177
|
+
fontWeight: 500,
|
|
178
|
+
fontSize: "0.9375em",
|
|
179
|
+
lineHeight: "24px",
|
|
180
|
+
letterSpacing: "0.46px",
|
|
181
|
+
textTransform: "uppercase",
|
|
182
|
+
color: e.onPrimaryColor,
|
|
183
|
+
gap: "8px",
|
|
184
|
+
display: "flex",
|
|
185
|
+
alignItems: "center"
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
export {
|
|
189
|
+
o as createStyles
|
|
190
|
+
};
|
package/packages/classic-quiz-play/src/components/Variants/Overlay/ScoreState/OverlayScoreState.js
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { j as e } from "../../../../../../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { Box as a, Typography as n, Button as x } from "@mui/joy";
|
|
3
|
+
import { useInternalTheme as w, useSpacingScale as L, isMobile as M, useImageBackgroundGradient as V } from "../../../../../../common/src/functions/theme.js";
|
|
4
|
+
import { extractBrandingProperties as q, sanitizeBackgroundUrl as U } from "../../../../../../common/src/functions/helpers.js";
|
|
5
|
+
import "../../../../../../../node_modules/i18next/dist/esm/i18next.js";
|
|
6
|
+
import "../../../../../../../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
|
|
7
|
+
import { WidgetTemplate as c } from "../../../../../../common/src/enums/enums.js";
|
|
8
|
+
import Y from "../../../../../../common/src/components/AdditionalCTA.js";
|
|
9
|
+
import "react";
|
|
10
|
+
import "../../../../../../common/src/providers/ConstantsProvider.js";
|
|
11
|
+
import G from "../../../../../../common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateWrapperSkeleton.js";
|
|
12
|
+
import H from "../../../../../../../node_modules/@mui/icons-material/esm/Replay.js";
|
|
13
|
+
import { useImageVariant as N } from "../../../../../../common/src/hooks/useImageVariant.js";
|
|
14
|
+
import "../../../../../../common/src/providers/ContainerProvider.js";
|
|
15
|
+
import D from "../../../../../../../node_modules/@mui/icons-material/esm/Share.js";
|
|
16
|
+
import J from "../../../../assets/default-quiz-bg.png.js";
|
|
17
|
+
import K from "../../../../assets/default-quiz-bg-vertical.jpg.js";
|
|
18
|
+
import X from "../../../Shared/ScoreStateWrapper.js";
|
|
19
|
+
import Z from "../../../Shared/PresentedBy.js";
|
|
20
|
+
import { createStyles as _ } from "./OverlayScoreState.styles.js";
|
|
21
|
+
import $ from "../../../Shared/AlertMessage.js";
|
|
22
|
+
import { useScoreStateHelpers as ee } from "../../../../hooks/useScoreStateHelpers.js";
|
|
23
|
+
import { useTranslation as te } from "../../../../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
24
|
+
const ke = (o) => {
|
|
25
|
+
var d;
|
|
26
|
+
const r = w(), h = L(), { t: s } = te(), l = M(), g = V(
|
|
27
|
+
c.OVERLAY
|
|
28
|
+
), y = o.defaultImagePlaceholderUrl ? o.defaultImagePlaceholderUrl : l ? K : J, { brandingImage: S, brandingColors: i, brandingLogo: j } = q(o.classicQuiz.branding || null), p = S || N(
|
|
29
|
+
{
|
|
30
|
+
images: o.classicQuiz.images,
|
|
31
|
+
imagePlaceholder: y
|
|
32
|
+
},
|
|
33
|
+
c.OVERLAY
|
|
34
|
+
), {
|
|
35
|
+
getHexagonBackground: C,
|
|
36
|
+
formatTime: f,
|
|
37
|
+
displayCongratulations: b,
|
|
38
|
+
getRandomEmoji: A,
|
|
39
|
+
shareResult: T,
|
|
40
|
+
scorePercentage: k
|
|
41
|
+
} = ee({
|
|
42
|
+
summary: o.summary,
|
|
43
|
+
totalTime: o.totalTime,
|
|
44
|
+
classicQuiz: o.classicQuiz,
|
|
45
|
+
variant: c.OVERLAY
|
|
46
|
+
}), z = (i == null ? void 0 : i.primaryColor) || r.colorSchemes.light.palette.primary.plainColor, Q = (i == null ? void 0 : i.secondaryColor) || r.colorSchemes.dark.textSecondary, B = r.colorSchemes.dark.secondaryContainer, v = r.colorSchemes.light.palette.primary.onPrimary, I = r.colorSchemes.dark.textPrimary, P = r.customFontFamily.light.primary, R = r.customFontFamily.light.secondary, W = r.customRadius.light.md, F = r.customRadius.light.xl, E = (i == null ? void 0 : i.backgroundColor) || r.colorSchemes.dark.onSurface, O = U(p), t = _({
|
|
47
|
+
spacingScale: h,
|
|
48
|
+
primaryColor: z,
|
|
49
|
+
secondaryColor: Q,
|
|
50
|
+
secondaryContainer: B,
|
|
51
|
+
onPrimaryColor: v,
|
|
52
|
+
textPrimary: I,
|
|
53
|
+
fontFamilyPrimary: P,
|
|
54
|
+
fontFamilySecondary: R,
|
|
55
|
+
mdBorderRadius: W,
|
|
56
|
+
xlBorderRadius: F,
|
|
57
|
+
contentBgColor: E,
|
|
58
|
+
successColor: r.colorSchemes.dark.palette.success.plainColor,
|
|
59
|
+
dangerColor: r.colorSchemes.dark.palette.danger.plainColor,
|
|
60
|
+
onSurfaceColor: r.colorSchemes.dark.onSurface,
|
|
61
|
+
scorePercentage: k,
|
|
62
|
+
isMobile: l
|
|
63
|
+
}), m = () => {
|
|
64
|
+
var u;
|
|
65
|
+
return /* @__PURE__ */ e.jsxs(a, { sx: t.mainContentWrapper, children: [
|
|
66
|
+
o.summary.classicQuizId ? /* @__PURE__ */ e.jsx(a, { sx: t.scoreContainer, children: /* @__PURE__ */ e.jsxs(a, { sx: t.scoreContentWrapper, children: [
|
|
67
|
+
/* @__PURE__ */ e.jsx(a, { sx: t.scoreSection, children: /* @__PURE__ */ e.jsx(a, { sx: t.scoreSectionWrapper, children: /* @__PURE__ */ e.jsxs(a, { sx: t.textSection, children: [
|
|
68
|
+
/* @__PURE__ */ e.jsxs(a, { sx: t.achievementBadgeContainer, children: [
|
|
69
|
+
/* @__PURE__ */ e.jsx(
|
|
70
|
+
"img",
|
|
71
|
+
{
|
|
72
|
+
style: t.hexagonBackground,
|
|
73
|
+
src: C(),
|
|
74
|
+
alt: "achievement-badge-background"
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ e.jsx(
|
|
78
|
+
"img",
|
|
79
|
+
{
|
|
80
|
+
style: t.achievementEmoji,
|
|
81
|
+
src: A("dark"),
|
|
82
|
+
alt: "achievement-badge"
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ e.jsx(n, { level: "body-lg", sx: t.congratulationsText, children: o.maxAttemptsReached ? s("classicQuiz.maxAttemptsReached") : b() }),
|
|
87
|
+
/* @__PURE__ */ e.jsx(a, { sx: t.scoreNumbersContainer, children: /* @__PURE__ */ e.jsxs(a, { sx: t.scoreNumbersWrapper, children: [
|
|
88
|
+
/* @__PURE__ */ e.jsx(n, { level: "h2", sx: t.correctScoreText, children: o.summary.correct }),
|
|
89
|
+
/* @__PURE__ */ e.jsxs(n, { level: "h2", sx: t.totalScoreText, children: [
|
|
90
|
+
"/",
|
|
91
|
+
o.summary.classicQuizQuestions
|
|
92
|
+
] })
|
|
93
|
+
] }) }),
|
|
94
|
+
o.classicQuiz.type && o.classicQuiz.type.toLocaleLowerCase() === "timed" ? /* @__PURE__ */ e.jsxs(n, { level: "body-md", sx: t.timeText, children: [
|
|
95
|
+
s("classicQuiz.youDidItFor"),
|
|
96
|
+
" ",
|
|
97
|
+
f()
|
|
98
|
+
] }) : null,
|
|
99
|
+
o.classicQuiz.scored ? /* @__PURE__ */ e.jsxs(n, { level: "body-lg", sx: t.pointsText, children: [
|
|
100
|
+
s("classicQuiz.youWon"),
|
|
101
|
+
" ",
|
|
102
|
+
o.summary.correct * o.classicQuiz.points,
|
|
103
|
+
" ",
|
|
104
|
+
s("common.labels.points")
|
|
105
|
+
] }) : null
|
|
106
|
+
] }) }) }),
|
|
107
|
+
/* @__PURE__ */ e.jsx(a, { sx: t.ctaSection, children: /* @__PURE__ */ e.jsxs(a, { sx: t.ctaContentWrapper, children: [
|
|
108
|
+
/* @__PURE__ */ e.jsx(n, { level: "body-lg", sx: t.thanksText, children: s("classicQuiz.thanksForPlaying") }),
|
|
109
|
+
/* @__PURE__ */ e.jsxs(a, { sx: t.buttonsContainer, children: [
|
|
110
|
+
!o.maxAttemptsReached && /* @__PURE__ */ e.jsx(
|
|
111
|
+
x,
|
|
112
|
+
{
|
|
113
|
+
sx: t.playAgainButton,
|
|
114
|
+
onClick: o.playAgain,
|
|
115
|
+
children: /* @__PURE__ */ e.jsxs(a, { sx: t.playAgainButtonContent, children: [
|
|
116
|
+
/* @__PURE__ */ e.jsx(H, { sx: t.playAgainIcon }),
|
|
117
|
+
/* @__PURE__ */ e.jsx(n, { sx: t.playAgainText, children: s("classicQuiz.buttons.playAgain") })
|
|
118
|
+
] })
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ e.jsx(x, { sx: t.shareButton, onClick: T, children: /* @__PURE__ */ e.jsxs(a, { sx: t.shareButtonContent, children: [
|
|
122
|
+
/* @__PURE__ */ e.jsx(D, { style: t.shareIcon }),
|
|
123
|
+
/* @__PURE__ */ e.jsx(n, { sx: t.shareText, children: s("classicQuiz.buttons.share") })
|
|
124
|
+
] }) }),
|
|
125
|
+
/* @__PURE__ */ e.jsx(
|
|
126
|
+
Y,
|
|
127
|
+
{
|
|
128
|
+
additionalCTA: o.additionalCTA,
|
|
129
|
+
buttonStyle: t.additionalCTAButton,
|
|
130
|
+
buttonContentStyle: t.additionalCTAButtonContent,
|
|
131
|
+
textStyle: t.additionalCTAText
|
|
132
|
+
}
|
|
133
|
+
)
|
|
134
|
+
] })
|
|
135
|
+
] }) })
|
|
136
|
+
] }) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
|
|
137
|
+
$,
|
|
138
|
+
{
|
|
139
|
+
variant: "error",
|
|
140
|
+
title: s("common.authentication.accessRequired"),
|
|
141
|
+
message: s("common.authentication.invalidOrMissingAuth")
|
|
142
|
+
}
|
|
143
|
+
) }),
|
|
144
|
+
/* @__PURE__ */ e.jsx(
|
|
145
|
+
Z,
|
|
146
|
+
{
|
|
147
|
+
brandingLogo: j,
|
|
148
|
+
textColor: r.colorSchemes.dark.textColor,
|
|
149
|
+
label: ((u = o.classicQuiz.labels) == null ? void 0 : u.sponsor) || null
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
] });
|
|
153
|
+
};
|
|
154
|
+
return /* @__PURE__ */ e.jsx(
|
|
155
|
+
G,
|
|
156
|
+
{
|
|
157
|
+
entity: o.classicQuiz,
|
|
158
|
+
backgroundImage: O,
|
|
159
|
+
imageBackgroundGradient: g,
|
|
160
|
+
isWrappedWithScoreStateWrapper: o.showAnswerExplanations,
|
|
161
|
+
children: o.showAnswerExplanations ? /* @__PURE__ */ e.jsx(
|
|
162
|
+
X,
|
|
163
|
+
{
|
|
164
|
+
questions: o.classicQuiz.questions,
|
|
165
|
+
userParticipation: o.summary.answers,
|
|
166
|
+
resultsTabPanelSxProps: { p: 0, fontSize: "1.25em" },
|
|
167
|
+
isOverlayVariant: !0,
|
|
168
|
+
brandingColors: (d = o.classicQuiz.branding) == null ? void 0 : d.colors,
|
|
169
|
+
children: /* @__PURE__ */ e.jsx(a, { sx: t.scoreStateWrapperContent, children: m() })
|
|
170
|
+
}
|
|
171
|
+
) : m()
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
};
|
|
175
|
+
export {
|
|
176
|
+
ke as default
|
|
177
|
+
};
|