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,4 @@
|
|
|
1
|
+
const H = "data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_929_504'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='25'%20height='24'%3e%3crect%20x='0.5'%20width='24'%20height='24'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_929_504)'%3e%3cpath%20d='M9.6875%206H11.5625V4.125H9.6875V6ZM13.4375%206V4.125H15.3125V6H13.4375ZM9.6875%2013.5V11.625H11.5625V13.5H9.6875ZM17.1875%209.75V7.875H19.0625V9.75H17.1875ZM17.1875%2013.5V11.625H19.0625V13.5H17.1875ZM13.4375%2013.5V11.625H15.3125V13.5H13.4375ZM17.1875%206V4.125H19.0625V6H17.1875ZM11.5625%207.875V6H13.4375V7.875H11.5625ZM5.9375%2019.825V4.125H7.8125V6H9.6875V7.875H7.8125V9.75H9.6875V11.625H7.8125V19.825H5.9375ZM15.3125%2011.625V9.75H17.1875V11.625H15.3125ZM11.5625%2011.625V9.75H13.4375V11.625H11.5625ZM9.6875%209.75V7.875H11.5625V9.75H9.6875ZM13.4375%209.75V7.875H15.3125V9.75H13.4375ZM15.3125%207.875V6H17.1875V7.875H15.3125Z'%20fill='%23212121'/%3e%3c/g%3e%3c/svg%3e";
|
|
2
|
+
export {
|
|
3
|
+
H as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { j as t } from "../../../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../../../common/src/providers/ContainerProvider.js";
|
|
4
|
+
import "../../../../node_modules/i18next/dist/esm/i18next.js";
|
|
5
|
+
import "../../../../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
|
|
6
|
+
import "@mui/joy";
|
|
7
|
+
import "../../../common/src/providers/ConstantsProvider.js";
|
|
8
|
+
import i from "../../../common/src/components/Skeletons/NotFoundSkeleton.js";
|
|
9
|
+
import r from "./Shared/MainCard.js";
|
|
10
|
+
import { useTranslation as n } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
11
|
+
const f = () => {
|
|
12
|
+
const { t: o } = n();
|
|
13
|
+
return /* @__PURE__ */ t.jsx(r, { brandingBorderColor: null, children: /* @__PURE__ */ t.jsx(
|
|
14
|
+
i,
|
|
15
|
+
{
|
|
16
|
+
notFoundTitle: o("classicQuiz.quizNotFound"),
|
|
17
|
+
notFoundMessage: o("classicQuiz.quizNotFoundDescription")
|
|
18
|
+
}
|
|
19
|
+
) });
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
f as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { j as i } from "../../../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { useState as n, useMemo as te, useEffect as W } from "react";
|
|
3
|
+
import { WidgetTemplate as y } from "../../../common/src/enums/enums.js";
|
|
4
|
+
import "../../../common/src/providers/ContainerProvider.js";
|
|
5
|
+
import { initializeI18n as ae } from "../../../common/src/functions/i18n.js";
|
|
6
|
+
import ie from "../../../common/src/components/Spinner.js";
|
|
7
|
+
import "@mui/joy";
|
|
8
|
+
import "../../../common/src/providers/ConstantsProvider.js";
|
|
9
|
+
import { useClassicQuizById as le } from "../hooks/useClassicQuizById.js";
|
|
10
|
+
import { useMyParticipation as se } from "../hooks/useMyParticipation.js";
|
|
11
|
+
import { ClassicQuizUserParticipationModel as J } from "fansunited-sdk-esm";
|
|
12
|
+
import ne from "./Variants/Overlay/OverlayVariant.js";
|
|
13
|
+
import re from "./Variants/Standard/StandardVariant.js";
|
|
14
|
+
import oe from "./Variants/Split/SplitVariant.js";
|
|
15
|
+
import ue from "./Variants/Standard/ScoreState/StandardScoreState.js";
|
|
16
|
+
import de from "./Variants/Split/ScoreState/SplitScoreState.js";
|
|
17
|
+
import me from "./Variants/Overlay/ScoreState/OverlayScoreState.js";
|
|
18
|
+
import { quizTypes as ce } from "../constants/constants.js";
|
|
19
|
+
import fe from "./ClassicQuizNotFound.js";
|
|
20
|
+
import ge from "./Variants/Standard/Error/StandardError.js";
|
|
21
|
+
import ye from "./Variants/Split/Error/SplitError.js";
|
|
22
|
+
import Ie from "./Variants/Overlay/Error/OverlayError.js";
|
|
23
|
+
import he from "./Variants/Standard/SignIn/StandardSignIn.js";
|
|
24
|
+
import Pe from "./Variants/Split/SignIn/SplitSignIn.js";
|
|
25
|
+
import Ce from "./Variants/Overlay/SignIn/OverlaySignIn.js";
|
|
26
|
+
import Se from "./Variants/Standard/LeadCollection/StandardLeadAfterCollection.js";
|
|
27
|
+
import Ae from "./Variants/Split/LeadCollection/SplitLeadAfterCollection.js";
|
|
28
|
+
import we from "./Variants/Overlay/LeadCollection/OverlayLeadAfterCollection.js";
|
|
29
|
+
function D(e) {
|
|
30
|
+
return e.template === y.STANDARD;
|
|
31
|
+
}
|
|
32
|
+
const pe = (e) => {
|
|
33
|
+
var H;
|
|
34
|
+
const [s, I] = n(1), [h, U] = n(null), [E, P] = n(!1), [j, Q] = n([]), [Y, d] = n(
|
|
35
|
+
[]
|
|
36
|
+
), [m, r] = n(!1), [X, R] = n(!1), [Z, L] = n(!1), [x, B] = n(!1), [z, T] = n(!0), [c, u] = n(0), [N, _] = n(!1), t = le(e.entityId, e.sdk), {
|
|
37
|
+
myParticipation: f,
|
|
38
|
+
isUnauthorized: $,
|
|
39
|
+
isApiError: k,
|
|
40
|
+
setIsUnauthorized: C,
|
|
41
|
+
setIsApiError: S
|
|
42
|
+
} = se(e.entityId, e.sdk, N), A = te(() => {
|
|
43
|
+
var l;
|
|
44
|
+
if (!t || !f || !((l = f[0]) != null && l.classicQuizId) || t.maxAttempts === 0 || t.maxAttempts === null)
|
|
45
|
+
return !1;
|
|
46
|
+
const a = f[0];
|
|
47
|
+
return (t == null ? void 0 : t.maxAttempts) <= (a == null ? void 0 : a.attempts);
|
|
48
|
+
}, [t, f]);
|
|
49
|
+
if (W(() => {
|
|
50
|
+
ae(e.language || "en");
|
|
51
|
+
}, [e.language]), W(() => {
|
|
52
|
+
var a;
|
|
53
|
+
t && t.type && (!(t.authRequirement === "LEAD" && ((a = e.leads) == null ? void 0 : a.position) === "before") && ce.includes(t.type.toLocaleLowerCase()) && B(!0), t.type.toLowerCase() === "countdown" && u(t.time || 10));
|
|
54
|
+
}, [t]), !t || !f)
|
|
55
|
+
return /* @__PURE__ */ i.jsx(ie, { my: 20 });
|
|
56
|
+
if (!t.id)
|
|
57
|
+
return /* @__PURE__ */ i.jsx(fe, {});
|
|
58
|
+
if (t.authRequirement === "REGISTERED" && !e.userIsLoggedIn)
|
|
59
|
+
return D(e) ? /* @__PURE__ */ i.jsx(
|
|
60
|
+
he,
|
|
61
|
+
{
|
|
62
|
+
classicQuiz: t,
|
|
63
|
+
imagePosition: e.imagePosition,
|
|
64
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
65
|
+
signInCTA: e.signInCTA,
|
|
66
|
+
rulesDisplay: e.rulesDisplay
|
|
67
|
+
}
|
|
68
|
+
) : e.template === y.OVERLAY ? /* @__PURE__ */ i.jsx(
|
|
69
|
+
Ce,
|
|
70
|
+
{
|
|
71
|
+
classicQuiz: t,
|
|
72
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
73
|
+
signInCTA: e.signInCTA,
|
|
74
|
+
rulesDisplay: e.rulesDisplay
|
|
75
|
+
}
|
|
76
|
+
) : /* @__PURE__ */ i.jsx(
|
|
77
|
+
Pe,
|
|
78
|
+
{
|
|
79
|
+
classicQuiz: t,
|
|
80
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
81
|
+
signInCTA: e.signInCTA,
|
|
82
|
+
rulesDisplay: e.rulesDisplay
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
const O = () => {
|
|
86
|
+
S(!1), C(!1), d([]), I(1), U(null), P(!1), Q([]), T(!0), r(!1), R(!1), L(!1), t.type && t.type.toLowerCase() === "countdown" ? u(t.time || 10) : u(0), _(!N);
|
|
87
|
+
};
|
|
88
|
+
if ($ || k)
|
|
89
|
+
return D(e) ? /* @__PURE__ */ i.jsx(
|
|
90
|
+
ge,
|
|
91
|
+
{
|
|
92
|
+
classicQuiz: t,
|
|
93
|
+
imagePosition: e.imagePosition,
|
|
94
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
95
|
+
isApiError: k,
|
|
96
|
+
toggleTryAgain: O,
|
|
97
|
+
rulesDisplay: e.rulesDisplay
|
|
98
|
+
}
|
|
99
|
+
) : e.template === y.OVERLAY ? /* @__PURE__ */ i.jsx(
|
|
100
|
+
Ie,
|
|
101
|
+
{
|
|
102
|
+
classicQuiz: t,
|
|
103
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
104
|
+
isApiError: k,
|
|
105
|
+
toggleTryAgain: O,
|
|
106
|
+
rulesDisplay: e.rulesDisplay
|
|
107
|
+
}
|
|
108
|
+
) : /* @__PURE__ */ i.jsx(
|
|
109
|
+
ye,
|
|
110
|
+
{
|
|
111
|
+
classicQuiz: t,
|
|
112
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
113
|
+
isApiError: k,
|
|
114
|
+
toggleTryAgain: O,
|
|
115
|
+
rulesDisplay: e.rulesDisplay
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
const q = async () => {
|
|
119
|
+
var o;
|
|
120
|
+
const a = t.questions[s - 1];
|
|
121
|
+
let l = null;
|
|
122
|
+
h && (l = a.options[h - 1].optionId), P(!0), T(!1);
|
|
123
|
+
const G = [
|
|
124
|
+
...j,
|
|
125
|
+
{
|
|
126
|
+
questionId: a.questionId,
|
|
127
|
+
optionId: l
|
|
128
|
+
}
|
|
129
|
+
];
|
|
130
|
+
if (Q(G), s === t.questionsCount) {
|
|
131
|
+
if (((o = e.leads) == null ? void 0 : o.position) === "after" && t.authRequirement === "LEAD" && !X) {
|
|
132
|
+
L(!0), setTimeout(() => {
|
|
133
|
+
I((g) => g + 1), P(!1);
|
|
134
|
+
}, 1500);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
r(!0);
|
|
138
|
+
try {
|
|
139
|
+
await e.sdk.miniGames.participateInClassicQuiz(
|
|
140
|
+
e.entityId,
|
|
141
|
+
G
|
|
142
|
+
);
|
|
143
|
+
} catch (g) {
|
|
144
|
+
if (d([new J()]), e.sdk.helpers.getSDKConfiguration().errorHandlingMode === "standard") {
|
|
145
|
+
const w = g;
|
|
146
|
+
w.error.code === 401 || w.error.code === 403 ? C(!0) : S(!0);
|
|
147
|
+
} else {
|
|
148
|
+
const w = g;
|
|
149
|
+
w.data.error.code === 401 || w.data.error.code === 403 ? C(!0) : S(!0);
|
|
150
|
+
}
|
|
151
|
+
r(!1);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const ee = await e.sdk.miniGames.getMyClassicQuizParticipations({
|
|
155
|
+
classicQuizIds: [e.entityId]
|
|
156
|
+
});
|
|
157
|
+
d(ee), setTimeout(() => {
|
|
158
|
+
I((g) => g + 1), r(!1);
|
|
159
|
+
}, 1500);
|
|
160
|
+
} else
|
|
161
|
+
setTimeout(() => {
|
|
162
|
+
I((K) => K + 1), U(null), P(!1), t.type && t.type.toLowerCase() === "countdown" && u(t.time || 10), T(!0);
|
|
163
|
+
}, 1500);
|
|
164
|
+
}, b = (a) => {
|
|
165
|
+
U(a);
|
|
166
|
+
}, V = (a) => {
|
|
167
|
+
u(a), t.type && t.type.toLocaleLowerCase() === "countdown" && a === 0 && !x && q();
|
|
168
|
+
}, M = () => {
|
|
169
|
+
I(1), U(null), P(!1), Q([]), d([]), T(!0), r(!1), R(!1), L(!1), t.type && t.type.toLowerCase() === "countdown" ? u(t.time || 10) : u(0);
|
|
170
|
+
}, v = () => {
|
|
171
|
+
B(!1);
|
|
172
|
+
}, F = async () => {
|
|
173
|
+
R(!0), r(!0);
|
|
174
|
+
try {
|
|
175
|
+
await e.sdk.miniGames.participateInClassicQuiz(
|
|
176
|
+
e.entityId,
|
|
177
|
+
j
|
|
178
|
+
);
|
|
179
|
+
} catch (l) {
|
|
180
|
+
if (d([new J()]), e.sdk.helpers.getSDKConfiguration().errorHandlingMode === "standard") {
|
|
181
|
+
const o = l;
|
|
182
|
+
o.error.code === 401 || o.error.code === 403 ? C(!0) : S(!0);
|
|
183
|
+
} else {
|
|
184
|
+
const o = l;
|
|
185
|
+
o.data.error.code === 401 || o.data.error.code === 403 ? C(!0) : S(!0);
|
|
186
|
+
}
|
|
187
|
+
r(!1);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
const a = await e.sdk.miniGames.getMyClassicQuizParticipations({
|
|
191
|
+
classicQuizIds: [e.entityId]
|
|
192
|
+
});
|
|
193
|
+
d(a), r(!1), L(!1);
|
|
194
|
+
}, p = () => {
|
|
195
|
+
const a = s > t.questionsCount ? t.questionsCount - 1 : s - 1, l = t.questions[a];
|
|
196
|
+
return e.template === y.OVERLAY ? /* @__PURE__ */ i.jsx(
|
|
197
|
+
ne,
|
|
198
|
+
{
|
|
199
|
+
sdk: e.sdk,
|
|
200
|
+
leads: e.leads,
|
|
201
|
+
classicQuiz: t,
|
|
202
|
+
question: l,
|
|
203
|
+
showAnswer: E,
|
|
204
|
+
selectedOption: h,
|
|
205
|
+
currentQuestion: s > t.questionsCount ? t.questionsCount : s,
|
|
206
|
+
answerQuestion: b,
|
|
207
|
+
handleNext: q,
|
|
208
|
+
isStopwatchRunning: z,
|
|
209
|
+
onTimeUpdate: V,
|
|
210
|
+
stopwatchTime: c,
|
|
211
|
+
applyFilterScreen: x,
|
|
212
|
+
startPlaying: v,
|
|
213
|
+
isSubmitting: m,
|
|
214
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
215
|
+
rulesDisplay: e.rulesDisplay
|
|
216
|
+
}
|
|
217
|
+
) : D(e) ? /* @__PURE__ */ i.jsx(
|
|
218
|
+
re,
|
|
219
|
+
{
|
|
220
|
+
sdk: e.sdk,
|
|
221
|
+
leads: e.leads,
|
|
222
|
+
classicQuiz: t,
|
|
223
|
+
question: l,
|
|
224
|
+
showAnswer: E,
|
|
225
|
+
selectedOption: h,
|
|
226
|
+
currentQuestion: s > t.questionsCount ? t.questionsCount : s,
|
|
227
|
+
answerQuestion: b,
|
|
228
|
+
handleNext: q,
|
|
229
|
+
imagePosition: e.imagePosition,
|
|
230
|
+
userParticipation: j,
|
|
231
|
+
isStopwatchRunning: z,
|
|
232
|
+
onTimeUpdate: V,
|
|
233
|
+
stopwatchTime: c,
|
|
234
|
+
applyFilterScreen: x,
|
|
235
|
+
startPlaying: v,
|
|
236
|
+
isSubmitting: m,
|
|
237
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
238
|
+
rulesDisplay: e.rulesDisplay
|
|
239
|
+
}
|
|
240
|
+
) : /* @__PURE__ */ i.jsx(
|
|
241
|
+
oe,
|
|
242
|
+
{
|
|
243
|
+
sdk: e.sdk,
|
|
244
|
+
leads: e.leads,
|
|
245
|
+
classicQuiz: t,
|
|
246
|
+
question: l,
|
|
247
|
+
showAnswer: E,
|
|
248
|
+
selectedOption: h,
|
|
249
|
+
currentQuestion: s > t.questionsCount ? t.questionsCount : s,
|
|
250
|
+
answerQuestion: b,
|
|
251
|
+
handleNext: q,
|
|
252
|
+
isStopwatchRunning: z,
|
|
253
|
+
onTimeUpdate: V,
|
|
254
|
+
stopwatchTime: c,
|
|
255
|
+
applyFilterScreen: x,
|
|
256
|
+
startPlaying: v,
|
|
257
|
+
isSubmitting: m,
|
|
258
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
259
|
+
rulesDisplay: e.rulesDisplay
|
|
260
|
+
}
|
|
261
|
+
);
|
|
262
|
+
};
|
|
263
|
+
if (s > t.questionsCount && Z && ((H = e.leads) == null ? void 0 : H.position) === "after" && t.authRequirement === "LEAD")
|
|
264
|
+
return D(e) ? /* @__PURE__ */ i.jsx(
|
|
265
|
+
Se,
|
|
266
|
+
{
|
|
267
|
+
classicQuiz: t,
|
|
268
|
+
sdk: e.sdk,
|
|
269
|
+
leads: e.leads,
|
|
270
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
271
|
+
onLeadSubmitted: F,
|
|
272
|
+
imagePosition: e.imagePosition,
|
|
273
|
+
isSubmitting: m,
|
|
274
|
+
rulesDisplay: e.rulesDisplay
|
|
275
|
+
}
|
|
276
|
+
) : e.template === y.OVERLAY ? /* @__PURE__ */ i.jsx(
|
|
277
|
+
we,
|
|
278
|
+
{
|
|
279
|
+
classicQuiz: t,
|
|
280
|
+
sdk: e.sdk,
|
|
281
|
+
leads: e.leads,
|
|
282
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
283
|
+
onLeadSubmitted: F,
|
|
284
|
+
isSubmitting: m,
|
|
285
|
+
rulesDisplay: e.rulesDisplay
|
|
286
|
+
}
|
|
287
|
+
) : /* @__PURE__ */ i.jsx(
|
|
288
|
+
Ae,
|
|
289
|
+
{
|
|
290
|
+
classicQuiz: t,
|
|
291
|
+
sdk: e.sdk,
|
|
292
|
+
leads: e.leads,
|
|
293
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
294
|
+
onLeadSubmitted: F,
|
|
295
|
+
isSubmitting: m,
|
|
296
|
+
rulesDisplay: e.rulesDisplay
|
|
297
|
+
}
|
|
298
|
+
);
|
|
299
|
+
if (s > t.questionsCount && Y.length || A) {
|
|
300
|
+
const a = A ? f[0] : Y[0];
|
|
301
|
+
return e.template === y.OVERLAY ? /* @__PURE__ */ i.jsx(
|
|
302
|
+
me,
|
|
303
|
+
{
|
|
304
|
+
summary: a,
|
|
305
|
+
totalTime: c,
|
|
306
|
+
showAnswerExplanations: e.showAnswerExplanations || !1,
|
|
307
|
+
classicQuiz: t,
|
|
308
|
+
maxAttemptsReached: A,
|
|
309
|
+
playAgain: M,
|
|
310
|
+
sdk: e.sdk,
|
|
311
|
+
leads: e.leads,
|
|
312
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
313
|
+
additionalCTA: e.additionalCTA,
|
|
314
|
+
rulesDisplay: e.rulesDisplay
|
|
315
|
+
}
|
|
316
|
+
) : D(e) ? /* @__PURE__ */ i.jsx(
|
|
317
|
+
ue,
|
|
318
|
+
{
|
|
319
|
+
imagePosition: e.imagePosition || "left",
|
|
320
|
+
summary: a,
|
|
321
|
+
totalTime: c,
|
|
322
|
+
showAnswerExplanations: e.showAnswerExplanations || !1,
|
|
323
|
+
classicQuiz: t,
|
|
324
|
+
maxAttemptsReached: A,
|
|
325
|
+
sdk: e.sdk,
|
|
326
|
+
leads: e.leads,
|
|
327
|
+
playAgain: M,
|
|
328
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
329
|
+
additionalCTA: e.additionalCTA,
|
|
330
|
+
rulesDisplay: e.rulesDisplay
|
|
331
|
+
}
|
|
332
|
+
) : /* @__PURE__ */ i.jsx(
|
|
333
|
+
de,
|
|
334
|
+
{
|
|
335
|
+
summary: a,
|
|
336
|
+
totalTime: c,
|
|
337
|
+
showAnswerExplanations: e.showAnswerExplanations || !1,
|
|
338
|
+
classicQuiz: t,
|
|
339
|
+
maxAttemptsReached: A,
|
|
340
|
+
playAgain: M,
|
|
341
|
+
sdk: e.sdk,
|
|
342
|
+
leads: e.leads,
|
|
343
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
344
|
+
additionalCTA: e.additionalCTA,
|
|
345
|
+
rulesDisplay: e.rulesDisplay
|
|
346
|
+
}
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
return p();
|
|
350
|
+
};
|
|
351
|
+
export {
|
|
352
|
+
pe as default
|
|
353
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { j as D } from "../../../../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { t as s } from "../../../../../node_modules/i18next/dist/esm/i18next.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import "../../../../common/src/providers/ContainerProvider.js";
|
|
5
|
+
import "../../../../../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
|
|
6
|
+
import "@mui/joy";
|
|
7
|
+
import "../../../../common/src/providers/ConstantsProvider.js";
|
|
8
|
+
import E from "../../../../common/src/components/Leads/CollectLeadForm.js";
|
|
9
|
+
const A = ({
|
|
10
|
+
sdk: t,
|
|
11
|
+
contentId: e,
|
|
12
|
+
contentName: o,
|
|
13
|
+
brandingColors: i,
|
|
14
|
+
brandingUrls: c,
|
|
15
|
+
campaignId: a,
|
|
16
|
+
campaignName: n,
|
|
17
|
+
startGame: l,
|
|
18
|
+
fields: r = ["fullName", "email"],
|
|
19
|
+
leadTitle: m,
|
|
20
|
+
leadDescription: u,
|
|
21
|
+
leadCta: p,
|
|
22
|
+
leadSuccessTitle: d,
|
|
23
|
+
leadSuccessDescription: f,
|
|
24
|
+
syncWithProfile: b = !1,
|
|
25
|
+
isAfterPosition: x = !1,
|
|
26
|
+
isSubmittingParticipation: C = !1
|
|
27
|
+
}) => {
|
|
28
|
+
const L = m ?? s("leads.header.title"), h = u ?? s("leads.header.description"), j = p ?? s("leads.buttons.submit"), z = d ?? s("leads.success.title"), g = f ?? s("leads.success.description"), Q = {
|
|
29
|
+
defaultLabel: x ? s("classicQuiz.buttons.finish") : s("classicQuiz.buttons.start"),
|
|
30
|
+
onClick: l
|
|
31
|
+
}, k = {
|
|
32
|
+
id: e,
|
|
33
|
+
type: "quiz",
|
|
34
|
+
name: o
|
|
35
|
+
}, q = {
|
|
36
|
+
colors: i,
|
|
37
|
+
urls: c
|
|
38
|
+
}, y = {
|
|
39
|
+
id: a,
|
|
40
|
+
name: n
|
|
41
|
+
}, B = {
|
|
42
|
+
title: L,
|
|
43
|
+
description: h,
|
|
44
|
+
submitButtonLabel: j,
|
|
45
|
+
successTitle: z,
|
|
46
|
+
successDescription: g
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ D.jsx(
|
|
49
|
+
E,
|
|
50
|
+
{
|
|
51
|
+
sdk: t,
|
|
52
|
+
content: k,
|
|
53
|
+
onSuccessCta: Q,
|
|
54
|
+
branding: q,
|
|
55
|
+
campaign: y,
|
|
56
|
+
fields: r,
|
|
57
|
+
labels: B,
|
|
58
|
+
syncWithProfile: b,
|
|
59
|
+
isSubmittingParticipation: C
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
A as default
|
|
65
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { j as e } from "../../../../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { useInternalTheme as a, useCornerRadius as f, useFontFamily as d } from "../../../../common/src/functions/theme.js";
|
|
3
|
+
import "../../../../../node_modules/i18next/dist/esm/i18next.js";
|
|
4
|
+
import "../../../../../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
|
|
5
|
+
import { Alert as p, Stack as u, Typography as s } from "@mui/joy";
|
|
6
|
+
import "react";
|
|
7
|
+
import "../../../../common/src/providers/ConstantsProvider.js";
|
|
8
|
+
import x from "../../../../../node_modules/@mui/icons-material/esm/CheckCircle.js";
|
|
9
|
+
import h from "../../../../../node_modules/@mui/icons-material/esm/Info.js";
|
|
10
|
+
import y from "../../../../../node_modules/@mui/icons-material/esm/Warning.js";
|
|
11
|
+
import "../../../../common/src/providers/ContainerProvider.js";
|
|
12
|
+
const g = (r, o) => {
|
|
13
|
+
switch (r) {
|
|
14
|
+
case "success":
|
|
15
|
+
return /* @__PURE__ */ e.jsx(x, {});
|
|
16
|
+
case "error":
|
|
17
|
+
return /* @__PURE__ */ e.jsx(y, { sx: { color: o } });
|
|
18
|
+
case "info":
|
|
19
|
+
return /* @__PURE__ */ e.jsx(h, {});
|
|
20
|
+
}
|
|
21
|
+
}, j = (r) => {
|
|
22
|
+
switch (r) {
|
|
23
|
+
case "success":
|
|
24
|
+
return "success";
|
|
25
|
+
case "error":
|
|
26
|
+
return "danger";
|
|
27
|
+
case "info":
|
|
28
|
+
return "primary";
|
|
29
|
+
}
|
|
30
|
+
}, T = ({
|
|
31
|
+
variant: r,
|
|
32
|
+
title: o,
|
|
33
|
+
message: i,
|
|
34
|
+
description: n
|
|
35
|
+
}) => {
|
|
36
|
+
const m = a(), l = f(), t = d().secondary, c = j(r);
|
|
37
|
+
return /* @__PURE__ */ e.jsx(
|
|
38
|
+
p,
|
|
39
|
+
{
|
|
40
|
+
variant: "soft",
|
|
41
|
+
color: c,
|
|
42
|
+
startDecorator: g(
|
|
43
|
+
r,
|
|
44
|
+
m.colorSchemes.light.palette.danger.plainColor
|
|
45
|
+
),
|
|
46
|
+
sx: {
|
|
47
|
+
gap: 1,
|
|
48
|
+
borderRadius: l.sm,
|
|
49
|
+
fontSize: "0.875em",
|
|
50
|
+
"--Icon-fontSize": "1.25em"
|
|
51
|
+
},
|
|
52
|
+
children: /* @__PURE__ */ e.jsxs(
|
|
53
|
+
u,
|
|
54
|
+
{
|
|
55
|
+
sx: {
|
|
56
|
+
fontSize: "1.5em"
|
|
57
|
+
},
|
|
58
|
+
children: [
|
|
59
|
+
o && /* @__PURE__ */ e.jsx(
|
|
60
|
+
s,
|
|
61
|
+
{
|
|
62
|
+
level: "title-md",
|
|
63
|
+
color: c,
|
|
64
|
+
fontWeight: "bold",
|
|
65
|
+
sx: { fontFamily: t, fontSize: "0.875em" },
|
|
66
|
+
children: o
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ e.jsx(
|
|
70
|
+
s,
|
|
71
|
+
{
|
|
72
|
+
level: "body-sm",
|
|
73
|
+
sx: { fontFamily: t, fontSize: "0.675em" },
|
|
74
|
+
children: i
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
n && /* @__PURE__ */ e.jsx(
|
|
78
|
+
s,
|
|
79
|
+
{
|
|
80
|
+
level: "body-xs",
|
|
81
|
+
sx: { fontFamily: t, fontSize: "0.6em" },
|
|
82
|
+
children: n
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
export {
|
|
92
|
+
T as default
|
|
93
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { j as o } from "../../../../../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { Box as t } from "@mui/joy";
|
|
3
|
+
import r from "./Option.js";
|
|
4
|
+
import { isMobile as m } from "../../../../../common/src/functions/theme.js";
|
|
5
|
+
import "../../../../../../node_modules/i18next/dist/esm/i18next.js";
|
|
6
|
+
import "../../../../../../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
|
|
7
|
+
import "react";
|
|
8
|
+
import "../../../../../common/src/providers/ConstantsProvider.js";
|
|
9
|
+
import "../../../../../common/src/providers/ContainerProvider.js";
|
|
10
|
+
const j = (e) => {
|
|
11
|
+
const l = m();
|
|
12
|
+
if (e.optionsLayout === "twoByTwo") {
|
|
13
|
+
const n = [];
|
|
14
|
+
for (let i = 0; i < e.options.length; i += 2) {
|
|
15
|
+
const s = e.options.slice(i, i + 2);
|
|
16
|
+
n.push(s);
|
|
17
|
+
}
|
|
18
|
+
return /* @__PURE__ */ o.jsx(t, { sx: { py: 2, display: "flex", flexDirection: "column", gap: 2 }, children: n.map((i, s) => /* @__PURE__ */ o.jsx(
|
|
19
|
+
t,
|
|
20
|
+
{
|
|
21
|
+
sx: {
|
|
22
|
+
display: "flex",
|
|
23
|
+
flexDirection: l ? "column" : "row",
|
|
24
|
+
gap: 2
|
|
25
|
+
},
|
|
26
|
+
children: i.map((a) => /* @__PURE__ */ o.jsx(
|
|
27
|
+
r,
|
|
28
|
+
{
|
|
29
|
+
option: a,
|
|
30
|
+
showAnswer: e.showAnswer,
|
|
31
|
+
questionImage: e.questionImage,
|
|
32
|
+
selectedOption: e.selectedOption,
|
|
33
|
+
answerQuestion: e.answerQuestion,
|
|
34
|
+
brandingColors: e.brandingColors
|
|
35
|
+
},
|
|
36
|
+
a.optionId
|
|
37
|
+
))
|
|
38
|
+
},
|
|
39
|
+
`row-${s}`
|
|
40
|
+
)) });
|
|
41
|
+
}
|
|
42
|
+
return e.optionsLayout === "column" ? /* @__PURE__ */ o.jsx(t, { sx: { py: 2, display: "flex", flexDirection: "column", gap: 2 }, children: e.options.map((n) => /* @__PURE__ */ o.jsx(
|
|
43
|
+
r,
|
|
44
|
+
{
|
|
45
|
+
option: n,
|
|
46
|
+
showAnswer: e.showAnswer,
|
|
47
|
+
selectedOption: e.selectedOption,
|
|
48
|
+
questionImage: e.questionImage,
|
|
49
|
+
answerQuestion: e.answerQuestion,
|
|
50
|
+
brandingColors: e.brandingColors
|
|
51
|
+
},
|
|
52
|
+
n.optionId
|
|
53
|
+
)) }) : /* @__PURE__ */ o.jsx(
|
|
54
|
+
t,
|
|
55
|
+
{
|
|
56
|
+
sx: {
|
|
57
|
+
py: 2,
|
|
58
|
+
display: "flex",
|
|
59
|
+
flexWrap: "wrap",
|
|
60
|
+
flexDirection: l ? "column" : "row",
|
|
61
|
+
gap: 2
|
|
62
|
+
},
|
|
63
|
+
children: e.options.map((n) => /* @__PURE__ */ o.jsx(
|
|
64
|
+
r,
|
|
65
|
+
{
|
|
66
|
+
option: n,
|
|
67
|
+
showAnswer: e.showAnswer,
|
|
68
|
+
selectedOption: e.selectedOption,
|
|
69
|
+
questionImage: e.questionImage,
|
|
70
|
+
answerQuestion: e.answerQuestion,
|
|
71
|
+
brandingColors: e.brandingColors
|
|
72
|
+
},
|
|
73
|
+
n.optionId
|
|
74
|
+
))
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
export {
|
|
79
|
+
j as default
|
|
80
|
+
};
|