fansunited-frontend-components 0.0.31-RC4 → 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.js +5 -0
- package/CollectLead.js +5 -0
- package/EventGamePlay.js +5 -0
- package/MatchQuizPlay.js +5 -0
- package/PersonalityQuizPlay.js +5 -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.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 -86783
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { useThemeMode as V } from "../hooks/useThemeMode.js";
|
|
2
|
+
import { WidgetTemplate as M } from "../enums/enums.js";
|
|
3
|
+
import { useContainerContext as i } from "../providers/ContainerProvider.js";
|
|
4
|
+
import g from "../../../../node_modules/@mui/joy/styles/extendTheme.js";
|
|
5
|
+
import { useTheme as o } from "../../../../node_modules/@mui/joy/styles/ThemeProvider.js";
|
|
6
|
+
import c from "../../../../node_modules/@mui/material/node_modules/@mui/system/esm/useMediaQuery/useMediaQuery.js";
|
|
7
|
+
const z = {
|
|
8
|
+
values: {
|
|
9
|
+
xs: 0,
|
|
10
|
+
sm: 444,
|
|
11
|
+
md: 600,
|
|
12
|
+
lg: 900,
|
|
13
|
+
xl: 1200,
|
|
14
|
+
xxl: 1536
|
|
15
|
+
}
|
|
16
|
+
}, L = {
|
|
17
|
+
"3xs": "2px",
|
|
18
|
+
"2xs": "4px",
|
|
19
|
+
xs: "8px",
|
|
20
|
+
sm: "12px",
|
|
21
|
+
md: "16px",
|
|
22
|
+
lg: "24px",
|
|
23
|
+
xl: "32px",
|
|
24
|
+
"2xl": "40px",
|
|
25
|
+
"3xl": "48px"
|
|
26
|
+
}, n = {
|
|
27
|
+
light: {
|
|
28
|
+
palette: {
|
|
29
|
+
success: {
|
|
30
|
+
plainColor: "#4CAF50",
|
|
31
|
+
outlinedBorder: "#4CAF50",
|
|
32
|
+
softBg: "#E3FBE3"
|
|
33
|
+
},
|
|
34
|
+
danger: {
|
|
35
|
+
softBg: "#FEE4E2",
|
|
36
|
+
plainColor: "#F44336",
|
|
37
|
+
outlinedBorder: "#F44336"
|
|
38
|
+
},
|
|
39
|
+
primary: {
|
|
40
|
+
plainColor: "#1A77D2",
|
|
41
|
+
outlinedBorder: "#1A77D2",
|
|
42
|
+
onPrimary: "#FAFAFA",
|
|
43
|
+
primaryContainer: "#2397F3"
|
|
44
|
+
},
|
|
45
|
+
warning: {
|
|
46
|
+
softBg: "#FEF0C7",
|
|
47
|
+
plainColor: "#DC6803"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
textPrimary: "#212121",
|
|
51
|
+
textSecondary: "#212121",
|
|
52
|
+
textColor: "#212121",
|
|
53
|
+
textDisabled: "#212121",
|
|
54
|
+
surface: "#FFFFFF",
|
|
55
|
+
onSurface: "#F5F5F5",
|
|
56
|
+
surfaceVariant: "#EEEEEE",
|
|
57
|
+
surfaceTintDim: "#212121",
|
|
58
|
+
surfaceInverse: "#F5F5F5",
|
|
59
|
+
outlineEnabledBorder: "#E0E0E0",
|
|
60
|
+
secondaryContainer: "#BDBDBD"
|
|
61
|
+
},
|
|
62
|
+
dark: {
|
|
63
|
+
palette: {
|
|
64
|
+
primary: {
|
|
65
|
+
plainColor: "#1A77D2",
|
|
66
|
+
outlinedBorder: "#1A77D2",
|
|
67
|
+
onPrimary: "#FAFAFA",
|
|
68
|
+
primaryContainer: "#2397F3"
|
|
69
|
+
},
|
|
70
|
+
success: {
|
|
71
|
+
plainColor: "#4CAF50",
|
|
72
|
+
outlinedBorder: "#4CAF50",
|
|
73
|
+
softBg: "#042F04"
|
|
74
|
+
},
|
|
75
|
+
danger: {
|
|
76
|
+
softBg: "#430A0A",
|
|
77
|
+
plainColor: "#F44336",
|
|
78
|
+
outlinedBorder: "#F44336"
|
|
79
|
+
},
|
|
80
|
+
warning: {
|
|
81
|
+
softBg: "#FEF0C7",
|
|
82
|
+
plainColor: "#DC6803"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
textPrimary: "#FAFAFA",
|
|
86
|
+
textSecondary: "#FAFAFA",
|
|
87
|
+
textColor: "#FAFAFA",
|
|
88
|
+
textDisabled: "#FAFAFA",
|
|
89
|
+
surface: "#424242",
|
|
90
|
+
onSurface: "#212121",
|
|
91
|
+
surfaceVariant: "#616161",
|
|
92
|
+
surfaceTintDim: "#FAFAFA",
|
|
93
|
+
surfaceInverse: "#FAFAFA",
|
|
94
|
+
outlineEnabledBorder: "#757575",
|
|
95
|
+
secondaryContainer: "#757575"
|
|
96
|
+
}
|
|
97
|
+
}, N = {
|
|
98
|
+
light: {
|
|
99
|
+
primary: "Ubuntu, sans-serif",
|
|
100
|
+
secondary: "Roboto, sans-serif"
|
|
101
|
+
},
|
|
102
|
+
dark: {
|
|
103
|
+
primary: "Ubuntu, sans-serif",
|
|
104
|
+
secondary: "Roboto, sans-serif"
|
|
105
|
+
}
|
|
106
|
+
}, K = {
|
|
107
|
+
light: {
|
|
108
|
+
none: "0px",
|
|
109
|
+
"2xs": "2px",
|
|
110
|
+
xs: "4px",
|
|
111
|
+
sm: "8px",
|
|
112
|
+
md: "12px",
|
|
113
|
+
lg: "16px",
|
|
114
|
+
xl: "24px",
|
|
115
|
+
"2xl": "232px",
|
|
116
|
+
full: "1000px"
|
|
117
|
+
},
|
|
118
|
+
dark: {
|
|
119
|
+
none: "0px",
|
|
120
|
+
"2xs": "2px",
|
|
121
|
+
xs: "4px",
|
|
122
|
+
sm: "8px",
|
|
123
|
+
md: "12px",
|
|
124
|
+
lg: "16px",
|
|
125
|
+
xl: "24px",
|
|
126
|
+
"2xl": "232px",
|
|
127
|
+
full: "1000px"
|
|
128
|
+
}
|
|
129
|
+
}, U = {
|
|
130
|
+
light: {
|
|
131
|
+
size: "1px"
|
|
132
|
+
},
|
|
133
|
+
dark: {
|
|
134
|
+
size: "2px"
|
|
135
|
+
}
|
|
136
|
+
}, m = {
|
|
137
|
+
light: {
|
|
138
|
+
standard: "linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(18, 18, 18, 0.8) 100%)",
|
|
139
|
+
split: "linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(18, 18, 18, 0.8) 100%)"
|
|
140
|
+
},
|
|
141
|
+
dark: {
|
|
142
|
+
standard: "linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(18, 18, 18, 0.8) 100%)",
|
|
143
|
+
split: "linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(18, 18, 18, 0.8) 100%)",
|
|
144
|
+
overlay: "linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(18, 18, 18, 0.8) 100%)"
|
|
145
|
+
}
|
|
146
|
+
}, Q = (e) => {
|
|
147
|
+
var t, d, s, h, F, u, x, p, k, y, f, S, B, A, C, b, T, D, E, v, w, R, j, W, G, P, I;
|
|
148
|
+
const r = g(), a = {
|
|
149
|
+
// Only add custom properties, don't override the entire palette
|
|
150
|
+
colorSchemes: {
|
|
151
|
+
light: {
|
|
152
|
+
palette: {
|
|
153
|
+
// Merge with existing palette
|
|
154
|
+
success: {
|
|
155
|
+
...r.colorSchemes.light.palette.success,
|
|
156
|
+
...((s = (d = (t = e == null ? void 0 : e.colorSchemes) == null ? void 0 : t.light) == null ? void 0 : d.palette) == null ? void 0 : s.success) || n.light.palette.success
|
|
157
|
+
},
|
|
158
|
+
danger: {
|
|
159
|
+
...r.colorSchemes.light.palette.danger,
|
|
160
|
+
...((u = (F = (h = e == null ? void 0 : e.colorSchemes) == null ? void 0 : h.light) == null ? void 0 : F.palette) == null ? void 0 : u.danger) || n.light.palette.danger
|
|
161
|
+
},
|
|
162
|
+
primary: {
|
|
163
|
+
...r.colorSchemes.light.palette.primary,
|
|
164
|
+
...((k = (p = (x = e == null ? void 0 : e.colorSchemes) == null ? void 0 : x.light) == null ? void 0 : p.palette) == null ? void 0 : k.primary) || n.light.palette.primary
|
|
165
|
+
},
|
|
166
|
+
warning: {
|
|
167
|
+
...r.colorSchemes.light.palette.warning,
|
|
168
|
+
...((S = (f = (y = e == null ? void 0 : e.colorSchemes) == null ? void 0 : y.light) == null ? void 0 : f.palette) == null ? void 0 : S.warning) || n.light.palette.warning
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
// Add custom properties
|
|
172
|
+
...((B = e == null ? void 0 : e.colorSchemes) == null ? void 0 : B.light) || n.light
|
|
173
|
+
},
|
|
174
|
+
dark: {
|
|
175
|
+
palette: {
|
|
176
|
+
primary: {
|
|
177
|
+
...r.colorSchemes.dark.palette.primary,
|
|
178
|
+
...((b = (C = (A = e == null ? void 0 : e.colorSchemes) == null ? void 0 : A.dark) == null ? void 0 : C.palette) == null ? void 0 : b.primary) || n.dark.palette.primary
|
|
179
|
+
},
|
|
180
|
+
success: {
|
|
181
|
+
...r.colorSchemes.dark.palette.success,
|
|
182
|
+
...((E = (D = (T = e == null ? void 0 : e.colorSchemes) == null ? void 0 : T.dark) == null ? void 0 : D.palette) == null ? void 0 : E.success) || n.dark.palette.success
|
|
183
|
+
},
|
|
184
|
+
danger: {
|
|
185
|
+
...r.colorSchemes.dark.palette.danger,
|
|
186
|
+
...((R = (w = (v = e == null ? void 0 : e.colorSchemes) == null ? void 0 : v.dark) == null ? void 0 : w.palette) == null ? void 0 : R.danger) || n.dark.palette.danger
|
|
187
|
+
},
|
|
188
|
+
warning: {
|
|
189
|
+
...r.colorSchemes.dark.palette.warning,
|
|
190
|
+
...((G = (W = (j = e == null ? void 0 : e.colorSchemes) == null ? void 0 : j.dark) == null ? void 0 : W.palette) == null ? void 0 : G.warning) || n.dark.palette.warning
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
// Add custom properties
|
|
194
|
+
...((P = e == null ? void 0 : e.colorSchemes) == null ? void 0 : P.dark) || n.dark
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
breakpoints: {
|
|
198
|
+
values: {
|
|
199
|
+
...r.breakpoints.values,
|
|
200
|
+
...((I = e == null ? void 0 : e.customBreakpoints) == null ? void 0 : I.values) || z.values
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
// Add other custom properties as needed
|
|
204
|
+
...e && {
|
|
205
|
+
spacingScale: e.spacingScale || L,
|
|
206
|
+
customFontFamily: e.customFontFamily || N,
|
|
207
|
+
customRadius: e.customRadius || K,
|
|
208
|
+
border: e.border || U,
|
|
209
|
+
imageBackgroundGradient: e.imageBackgroundGradient || m,
|
|
210
|
+
customBreakpoints: e.customBreakpoints || z
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
return g(a);
|
|
214
|
+
}, $ = (e) => {
|
|
215
|
+
const r = (e == null ? void 0 : e.mode) || "light", a = (e == null ? void 0 : e.modeStorageKey) || "theme-mode", t = Q(e);
|
|
216
|
+
return g({
|
|
217
|
+
...t,
|
|
218
|
+
mode: r,
|
|
219
|
+
modeStorageKey: a,
|
|
220
|
+
// Ensure Joy UI respects the provided mode
|
|
221
|
+
cssVarPrefix: "joy",
|
|
222
|
+
colorSchemeSelector: 'data-joy-color-scheme="%s"'
|
|
223
|
+
});
|
|
224
|
+
}, q = () => o().spacingScale, O = (e) => {
|
|
225
|
+
const r = q();
|
|
226
|
+
return r ? r[e] : "16px";
|
|
227
|
+
}, ee = () => {
|
|
228
|
+
const e = o(), { theme: r } = l(), { containerWidth: a, isContainerDetected: t } = i();
|
|
229
|
+
return t && a > 0 ? a < r.customBreakpoints.values.sm : c(
|
|
230
|
+
e.breakpoints.down(r.customBreakpoints.values.sm)
|
|
231
|
+
);
|
|
232
|
+
}, re = () => {
|
|
233
|
+
const e = o(), { theme: r } = l(), { containerWidth: a, isContainerDetected: t } = i();
|
|
234
|
+
return t && a > 0 ? a < r.customBreakpoints.values.md : c(
|
|
235
|
+
e.breakpoints.down(r.customBreakpoints.values.md)
|
|
236
|
+
);
|
|
237
|
+
}, ae = () => {
|
|
238
|
+
const e = o(), { theme: r } = l(), { containerWidth: a, isContainerDetected: t } = i();
|
|
239
|
+
return t && a > 0 ? a < r.customBreakpoints.values.lg : c(
|
|
240
|
+
e.breakpoints.down(r.customBreakpoints.values.lg)
|
|
241
|
+
);
|
|
242
|
+
}, te = () => {
|
|
243
|
+
const e = o(), { theme: r } = l(), { containerWidth: a, isContainerDetected: t } = i();
|
|
244
|
+
return t && a > 0 ? a >= r.customBreakpoints.values.md && a < r.customBreakpoints.values.lg : c(
|
|
245
|
+
e.breakpoints.between(
|
|
246
|
+
r.customBreakpoints.values.md,
|
|
247
|
+
r.customBreakpoints.values.lg
|
|
248
|
+
)
|
|
249
|
+
);
|
|
250
|
+
}, ne = () => {
|
|
251
|
+
const e = o(), { theme: r } = l(), { containerWidth: a, isContainerDetected: t } = i();
|
|
252
|
+
return t && a > 0 ? a >= r.customBreakpoints.values.lg : c(
|
|
253
|
+
e.breakpoints.up(r.customBreakpoints.values.lg)
|
|
254
|
+
);
|
|
255
|
+
}, le = () => o(), l = () => {
|
|
256
|
+
const e = o(), { mode: r } = V(
|
|
257
|
+
e.mode || "light",
|
|
258
|
+
e.modeStorageKey || "theme-mode"
|
|
259
|
+
);
|
|
260
|
+
return { theme: e, mode: r };
|
|
261
|
+
}, oe = () => {
|
|
262
|
+
var a, t, d, s;
|
|
263
|
+
const { theme: e, mode: r } = l();
|
|
264
|
+
return {
|
|
265
|
+
primary: ((t = (a = e.customFontFamily) == null ? void 0 : a[r]) == null ? void 0 : t.primary) || "Ubuntu, sans-serif",
|
|
266
|
+
secondary: ((s = (d = e.customFontFamily) == null ? void 0 : d[r]) == null ? void 0 : s.secondary) || "Roboto, sans-serif"
|
|
267
|
+
};
|
|
268
|
+
}, de = () => {
|
|
269
|
+
var a;
|
|
270
|
+
const { theme: e, mode: r } = l();
|
|
271
|
+
return ((a = e.customRadius) == null ? void 0 : a[r]) || K[r];
|
|
272
|
+
}, se = () => {
|
|
273
|
+
var a;
|
|
274
|
+
const { theme: e, mode: r } = l();
|
|
275
|
+
return ((a = e.colorSchemes) == null ? void 0 : a[r]) || n[r];
|
|
276
|
+
}, ie = () => {
|
|
277
|
+
var a;
|
|
278
|
+
const { theme: e, mode: r } = l();
|
|
279
|
+
return ((a = e.border) == null ? void 0 : a[r]) || U[r];
|
|
280
|
+
}, ce = (e) => {
|
|
281
|
+
const { theme: r, mode: a } = l();
|
|
282
|
+
return e === M.STANDARD || e === M.SPLIT ? r.imageBackgroundGradient[a][e] || m[a][e] : r.imageBackgroundGradient.dark.overlay || m.dark.overlay;
|
|
283
|
+
};
|
|
284
|
+
export {
|
|
285
|
+
Q as createCustomTheme,
|
|
286
|
+
$ as createEnhancedTheme,
|
|
287
|
+
O as getSpacing,
|
|
288
|
+
ne as isDesktop,
|
|
289
|
+
ee as isExtraSmall,
|
|
290
|
+
ae as isLarge,
|
|
291
|
+
re as isMobile,
|
|
292
|
+
te as isTablet,
|
|
293
|
+
ie as useBorderSize,
|
|
294
|
+
se as useColors,
|
|
295
|
+
de as useCornerRadius,
|
|
296
|
+
oe as useFontFamily,
|
|
297
|
+
ce as useImageBackgroundGradient,
|
|
298
|
+
le as useInternalTheme,
|
|
299
|
+
q as useSpacingScale,
|
|
300
|
+
l as useThemeWithMode
|
|
301
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WidgetTemplate as l } from "../enums/enums.js";
|
|
2
|
+
import { useImageUrl as o } from "./useImageUrl.js";
|
|
3
|
+
const t = (m, a) => {
|
|
4
|
+
var r;
|
|
5
|
+
const i = o(m.images);
|
|
6
|
+
let e = null;
|
|
7
|
+
return a !== l.OVERLAY ? e = i : e = ((r = m.images) == null ? void 0 : r.cover) || "", e || (e = m.imagePlaceholder), e;
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
t as useImageVariant
|
|
11
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { useState as m, useEffect as v } from "react";
|
|
2
|
+
import { ConstantsContext as z } from "../providers/ConstantsProvider.js";
|
|
3
|
+
import { useConstantContext as A } from "./useConstantContext.js";
|
|
4
|
+
import { countries as H } from "../constants/constants.js";
|
|
5
|
+
import { getDefaultCountryByCode as p, getDefaultCountryByLanguage as y, getCountryByCode as J } from "../functions/helpers.js";
|
|
6
|
+
function X(g) {
|
|
7
|
+
const {
|
|
8
|
+
sdk: d,
|
|
9
|
+
fields: r = ["fullName", "email"],
|
|
10
|
+
campaignId: b = "",
|
|
11
|
+
campaignName: F = "",
|
|
12
|
+
contentType: D = "",
|
|
13
|
+
contentId: P = "",
|
|
14
|
+
contentName: w = "",
|
|
15
|
+
syncWithProfile: I = !1
|
|
16
|
+
} = g, { leadPhoneCountryCode: i, language: f } = A(z), [e, s] = m({
|
|
17
|
+
firstName: "",
|
|
18
|
+
lastName: "",
|
|
19
|
+
fullName: "",
|
|
20
|
+
email: "",
|
|
21
|
+
gender: "",
|
|
22
|
+
country: "",
|
|
23
|
+
phoneCountryCode: i ? p(i) : y(f || "en"),
|
|
24
|
+
phoneNumber: "",
|
|
25
|
+
customFields: {}
|
|
26
|
+
});
|
|
27
|
+
v(() => {
|
|
28
|
+
const t = i ? p(i) : y(f || "en");
|
|
29
|
+
s((n) => !n.phoneNumber || !n.phoneCountryCode ? { ...n, phoneCountryCode: t } : n);
|
|
30
|
+
}, [i, f]);
|
|
31
|
+
const [N, L] = m({}), [E, h] = m(!1), [S, x] = m(!1), [B, C] = m(null), O = () => C(null), _ = (t) => (n) => {
|
|
32
|
+
s((o) => ({
|
|
33
|
+
...o,
|
|
34
|
+
[t]: n.target.value
|
|
35
|
+
}));
|
|
36
|
+
}, j = (t) => (n) => {
|
|
37
|
+
const o = n.target.value;
|
|
38
|
+
L((l) => ({ ...l, [t]: o }));
|
|
39
|
+
}, G = (t, n) => {
|
|
40
|
+
s((o) => ({
|
|
41
|
+
...o,
|
|
42
|
+
phoneCountryCode: n
|
|
43
|
+
}));
|
|
44
|
+
}, T = (t, n) => {
|
|
45
|
+
s((o) => ({
|
|
46
|
+
...o,
|
|
47
|
+
country: n || ""
|
|
48
|
+
}));
|
|
49
|
+
}, W = (t, n) => {
|
|
50
|
+
s((o) => ({
|
|
51
|
+
...o,
|
|
52
|
+
gender: n || ""
|
|
53
|
+
}));
|
|
54
|
+
}, q = async () => {
|
|
55
|
+
if (I)
|
|
56
|
+
try {
|
|
57
|
+
const t = d.profile.getOwn();
|
|
58
|
+
if (e.fullName && r.includes("fullName") ? t.setName(e.fullName.trim()) : e.firstName && r.includes("firstName") && e.lastName && r.includes("lastName") ? t.setName(
|
|
59
|
+
e.firstName.trim() + " " + e.lastName.trim()
|
|
60
|
+
) : e.firstName && r.includes("firstName") ? t.setName(e.firstName.trim()) : e.lastName && r.includes("lastName") && t.setName(e.lastName.trim()), e.email && r.includes("email") && t.setEmail(e.email.trim()), e.gender && r.includes("gender") && t.setGender(e.gender), e.country && r.includes("country")) {
|
|
61
|
+
const n = await d.profile.getCountries(), o = J(e.country), l = n.find((c) => c.name === (o == null ? void 0 : o.label));
|
|
62
|
+
l && t.setCountry(l.id);
|
|
63
|
+
}
|
|
64
|
+
e.phoneCountryCode && r.includes("phoneCountryCode") && t.setPhoneCountryCode(
|
|
65
|
+
"+" + e.phoneCountryCode.phone
|
|
66
|
+
), e.phoneNumber && r.includes("phoneNumber") && t.setPhoneNumber(e.phoneNumber.trim()), await t.update();
|
|
67
|
+
} catch (t) {
|
|
68
|
+
console.warn("[LeadForm] Failed to sync profile data:", t);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
return {
|
|
72
|
+
formData: e,
|
|
73
|
+
setFormData: s,
|
|
74
|
+
isLoading: E,
|
|
75
|
+
isSuccess: S,
|
|
76
|
+
error: B,
|
|
77
|
+
clearError: O,
|
|
78
|
+
handleInputChange: _,
|
|
79
|
+
handleCustomFieldChange: j,
|
|
80
|
+
customFieldsData: N,
|
|
81
|
+
handlePhoneCountryChange: G,
|
|
82
|
+
handleCountryChange: T,
|
|
83
|
+
handleGenderChange: W,
|
|
84
|
+
handleSubmit: async (t) => {
|
|
85
|
+
var c;
|
|
86
|
+
t && t.preventDefault(), C(null);
|
|
87
|
+
const n = {
|
|
88
|
+
firstName: e.firstName,
|
|
89
|
+
lastName: e.lastName,
|
|
90
|
+
fullName: e.fullName,
|
|
91
|
+
email: e.email,
|
|
92
|
+
gender: e.gender,
|
|
93
|
+
country: e.country,
|
|
94
|
+
phoneCountryCode: "+" + (((c = e.phoneCountryCode) == null ? void 0 : c.phone) ?? ""),
|
|
95
|
+
phoneNumber: e.phoneNumber,
|
|
96
|
+
campaignId: b,
|
|
97
|
+
campaignName: F,
|
|
98
|
+
contentType: D,
|
|
99
|
+
contentId: P,
|
|
100
|
+
contentName: w,
|
|
101
|
+
customFields: N
|
|
102
|
+
}, o = [
|
|
103
|
+
"firstName",
|
|
104
|
+
"lastName",
|
|
105
|
+
"fullName",
|
|
106
|
+
"email",
|
|
107
|
+
"gender",
|
|
108
|
+
"country",
|
|
109
|
+
"phoneCountryCode",
|
|
110
|
+
"phoneNumber",
|
|
111
|
+
"customFields"
|
|
112
|
+
], l = Object.fromEntries(
|
|
113
|
+
Object.entries(n).map(([a, u]) => o.includes(a) ? a === "customFields" ? [a, u] : r.includes(a) && u !== "" && u !== null ? [a, u] : [a, null] : [a, u])
|
|
114
|
+
);
|
|
115
|
+
h(!0);
|
|
116
|
+
try {
|
|
117
|
+
await d.profile.collectLead(l), await q(), x(!0);
|
|
118
|
+
} catch {
|
|
119
|
+
C("leads.form.error");
|
|
120
|
+
} finally {
|
|
121
|
+
h(!1);
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
countries: H
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
export {
|
|
128
|
+
X as useLeadForm
|
|
129
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useState as m, useCallback as f, useEffect as h } from "react";
|
|
2
|
+
import { useColorScheme as w } from "../../../../node_modules/@mui/joy/styles/CssVarsProvider.js";
|
|
3
|
+
const k = (d, r = "theme-mode") => {
|
|
4
|
+
const [l, u] = m(d), [o, c] = m(d), { mode: a, setMode: t } = w(), n = a || o, s = f(
|
|
5
|
+
(e) => {
|
|
6
|
+
c(e), t && t(e), typeof window < "u" && localStorage.setItem(r, e);
|
|
7
|
+
},
|
|
8
|
+
[t, r]
|
|
9
|
+
), M = f(() => {
|
|
10
|
+
s(n === "light" ? "dark" : "light");
|
|
11
|
+
}, [n, s]);
|
|
12
|
+
return h(() => {
|
|
13
|
+
if (typeof window < "u" && window.matchMedia) {
|
|
14
|
+
const e = window.matchMedia("(prefers-color-scheme: dark)"), i = (g) => {
|
|
15
|
+
u(g.matches ? "dark" : "light");
|
|
16
|
+
};
|
|
17
|
+
return e.addEventListener("change", i), () => e.removeEventListener("change", i);
|
|
18
|
+
}
|
|
19
|
+
}, []), h(() => {
|
|
20
|
+
t && a !== o && (t(o), c(o));
|
|
21
|
+
}, [t]), {
|
|
22
|
+
mode: n,
|
|
23
|
+
toggleMode: M,
|
|
24
|
+
setMode: s,
|
|
25
|
+
systemPreference: l
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
k as useThemeMode
|
|
30
|
+
};
|