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zB,EAC5E,mBAACN,EAAA,EAAK,CAAC,eAAe,WACnB,UAAC6C,EAAA,EAAO,KAAK,iBACZ,OAAC,MACC,UAAWnD,EAAO,kBAClB,KAAK,OACL,KAAM,GAAGmD,EAAA,EAAO,SAAS,kCAEzB,mBAAC,KAAK,CAAC,QAAQ,wBAAwB,iCAAqB,EAC9D,EAEJ,EACF,EAEDA,EAAA,EAAO,KAAK,wBACX,OAACrB,EAAqB,CAAC,SAAUW,EAAmB,YAAA7B,CAAA,CAA0B,KAEhF,OAACT,EAAmB,EAAC,EACpB,CAACoC,MAAqB,OAACP,EAAU,EAAC,GACrC,EAGDmB,EAAA,EAAO,KAAK,qBAAuBR,MAClC,OAAC,KAAQ,CACP,mBAACjC,EAAA,CACC,SAAUgC,EACV,YAAA9B,CAAA,CACD,EACH,EAGDkC,GAAsB,CAACK,EAAA,EAAO,KAAK,wBAClC,OAAC,KAAQ,CACP,mBAACE,EAAA,GACC,2BAAAN,EACA,SAAUH,EACV,OAAQ,IAAMC,EAAmB,EACnC,EACF,GAEJ,EAEJ,CAEJ,EAIM,EAAa/C,IACV,CACL,qBAAmB,OAAI,CACrB,QAAS,EACT,UAAWA,EAAM,QAAQ,EAAG,CAC9B,CAAC,EAED,SAAO,OAAI,CACT,MAAO,MACT,CAAC,CACH,E","sources":["webpack://grafana/./public/app/core/components/Login/LoginServiceButtons.tsx","webpack://grafana/./public/app/core/components/Login/PasswordlessConfirmationForm.tsx","webpack://grafana/./public/app/core/components/Login/PasswordlessLoginForm.tsx","webpack://grafana/./public/app/core/components/Login/UserSignup.tsx","webpack://grafana/./public/app/core/components/Login/LoginPage.tsx"],"sourcesContent":["import { css, cx } from '@emotion/css';\nimport { pickBy } from 'lodash';\n\nimport { GrafanaTheme2, DEFAULT_SAML_NAME } from '@grafana/data';\nimport { Icon, IconName, LinkButton, Stack, useStyles2, useTheme2 } from '@grafana/ui';\nimport config from 'app/core/config';\nimport { Trans } from 'app/core/internationalization';\n\nexport interface LoginService {\n bgColor: string;\n enabled: boolean;\n name: string;\n hrefName?: string;\n icon: IconName;\n}\n\nexport interface LoginServices {\n [key: string]: LoginService;\n}\n\nconst loginServices: () => LoginServices = () => {\n const oauthEnabled = !!config.oauth;\n\n return {\n saml: {\n bgColor: '#464646',\n enabled: config.samlEnabled,\n name: config.samlName || DEFAULT_SAML_NAME,\n icon: 'key-skeleton-alt',\n },\n google: {\n bgColor: '#e84d3c',\n enabled: oauthEnabled && Boolean(config.oauth.google),\n name: config.oauth?.google?.name || 'Google',\n icon: config.oauth?.google?.icon || ('google' as const),\n },\n azuread: {\n bgColor: '#2f2f2f',\n enabled: oauthEnabled && Boolean(config.oauth.azuread),\n name: config.oauth?.azuread?.name || 'Microsoft',\n icon: config.oauth?.azuread?.icon || ('microsoft' as const),\n },\n github: {\n bgColor: '#464646',\n enabled: oauthEnabled && Boolean(config.oauth.github),\n name: config.oauth?.github?.name || 'GitHub',\n icon: config.oauth?.github?.icon || ('github' as const),\n },\n gitlab: {\n bgColor: '#fc6d26',\n enabled: oauthEnabled && Boolean(config.oauth.gitlab),\n name: config.oauth?.gitlab?.name || 'GitLab',\n icon: config.oauth?.gitlab?.icon || ('gitlab' as const),\n },\n grafanacom: {\n bgColor: '#262628',\n enabled: oauthEnabled && Boolean(config.oauth.grafana_com),\n name: config.oauth?.grafana_com?.name || 'Grafana.com',\n icon: config.oauth?.grafana_com?.icon || ('grafana' as const),\n hrefName: 'grafana_com',\n },\n okta: {\n bgColor: '#2f2f2f',\n enabled: oauthEnabled && Boolean(config.oauth.okta),\n name: config.oauth?.okta?.name || 'Okta',\n icon: config.oauth?.okta?.icon || ('okta' as const),\n },\n oauth: {\n bgColor: '#262628',\n enabled: oauthEnabled && Boolean(config.oauth.generic_oauth),\n name: config.oauth?.generic_oauth?.name || 'OAuth',\n icon: config.oauth?.generic_oauth?.icon || ('signin' as const),\n hrefName: 'generic_oauth',\n },\n };\n};\n\nconst getServiceStyles = (theme: GrafanaTheme2) => {\n return {\n button: css({\n color: '#d8d9da',\n position: 'relative',\n }),\n buttonIcon: css({\n position: 'absolute',\n left: theme.spacing(1),\n top: '50%',\n transform: 'translateY(-50%)',\n }),\n divider: {\n base: css({\n color: theme.colors.text.primary,\n display: 'flex',\n marginBottom: theme.spacing(1),\n justifyContent: 'space-between',\n textAlign: 'center',\n width: '100%',\n }),\n line: css({\n width: 100,\n height: 10,\n borderBottom: `1px solid ${theme.colors.text}`,\n }),\n },\n };\n};\n\nconst LoginDivider = () => {\n const styles = useStyles2(getServiceStyles);\n return (\n
\n
\n
\n
\n
\n {!config.disableLoginForm && or}\n
\n
\n
\n
\n
\n );\n};\n\nfunction getButtonStyleFor(service: LoginService, styles: ReturnType, theme: GrafanaTheme2) {\n return cx(\n styles.button,\n css({\n backgroundColor: service.bgColor,\n color: theme.colors.getContrastText(service.bgColor),\n\n ['&:hover']: {\n backgroundColor: theme.colors.emphasize(service.bgColor, 0.15),\n boxShadow: theme.shadows.z1,\n },\n })\n );\n}\n\nexport const LoginServiceButtons = () => {\n const enabledServices = pickBy(loginServices(), (service) => service.enabled);\n const hasServices = Object.keys(enabledServices).length > 0;\n const theme = useTheme2();\n const styles = useStyles2(getServiceStyles);\n\n if (hasServices) {\n return (\n \n \n {Object.entries(enabledServices).map(([key, service]) => {\n const serviceName = service.name;\n return (\n \n \n Sign in with {{ serviceName }}\n \n );\n })}\n \n );\n }\n\n return null;\n};\n","import { css } from '@emotion/css';\nimport { useId, useEffect, useState } from 'react';\nimport { useForm } from 'react-hook-form';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { selectors } from '@grafana/e2e-selectors';\nimport { locationService } from '@grafana/runtime';\nimport { Button, Input, Field, useStyles2 } from '@grafana/ui';\nimport { Branding } from 'app/core/components/Branding/Branding';\nimport { t } from 'app/core/internationalization';\n\nimport { PasswordlessConfirmationFormModel } from './LoginCtrl';\n\ninterface Props {\n onSubmit: (data: PasswordlessConfirmationFormModel) => void;\n isLoggingIn: boolean;\n}\n\nexport const PasswordlessConfirmation = ({ onSubmit, isLoggingIn }: Props) => {\n const styles = useStyles2(getStyles);\n const confirmationCodeId = useId();\n const codeId = useId();\n const usernameId = useId();\n const nameId = useId();\n const [signup, setSignup] = useState(false);\n\n const {\n handleSubmit,\n register,\n setValue,\n formState: { errors },\n } = useForm({ mode: 'onChange' });\n\n useEffect(() => {\n Branding.LoginTitle = \"We've sent you an email!\";\n Branding.GetLoginSubTitle = () =>\n \"Check your inbox and click the confirmation link or use the confirmation code we've sent.\";\n\n const queryValues = locationService.getSearch();\n\n setValue('code', queryValues.get('code') || '');\n if (queryValues.get('confirmationCode')) {\n setValue('confirmationCode', queryValues.get('confirmationCode') || '');\n if (!queryValues.get('signup')) {\n handleSubmit(onSubmit)();\n }\n }\n if (queryValues.get('signup')) {\n setSignup(true);\n }\n if (queryValues.get('username')) {\n setValue('username', queryValues.get('username') || '');\n }\n if (queryValues.get('name')) {\n setValue('name', queryValues.get('name') || '');\n }\n }, [setValue, handleSubmit, onSubmit, setSignup]);\n\n return (\n
\n
\n \n \n \n \n {signup && (\n <>\n \n \n \n \n \n )}\n \n {isLoggingIn ? t('login.form.submit-loading-label', 'Logging in...') : t('login.form.submit-label', 'Log in')}\n \n \n
\n );\n};\n\nexport const getStyles = (theme: GrafanaTheme2) => {\n return {\n wrapper: css({\n width: '100%',\n paddingBottom: theme.spacing(2),\n }),\n\n submitButton: css({\n justifyContent: 'center',\n width: '100%',\n }),\n\n skipButton: css({\n alignSelf: 'flex-start',\n }),\n };\n};\n","import { css } from '@emotion/css';\nimport { useId } from 'react';\nimport { useForm } from 'react-hook-form';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { selectors } from '@grafana/e2e-selectors';\nimport { Button, Input, Field, useStyles2 } from '@grafana/ui';\nimport { t } from 'app/core/internationalization';\n\nimport { PasswordlessFormModel } from './LoginCtrl';\n\ninterface Props {\n onSubmit: (data: PasswordlessFormModel) => void;\n isLoggingIn: boolean;\n}\n\nexport const PasswordlessLoginForm = ({ onSubmit, isLoggingIn }: Props) => {\n const styles = useStyles2(getStyles);\n const emailId = useId();\n const {\n handleSubmit,\n register,\n formState: { errors },\n } = useForm({ mode: 'onChange' });\n\n return (\n
\n
\n \n \n \n \n {isLoggingIn\n ? t('login.form.verify-email-loading-label', 'Sending email...')\n : t('login.form.verify-email-label', 'Send a verification email')}\n \n \n
\n );\n};\n\nexport const getStyles = (theme: GrafanaTheme2) => {\n return {\n wrapper: css({\n width: '100%',\n paddingBottom: theme.spacing(2),\n }),\n\n submitButton: css({\n justifyContent: 'center',\n width: '100%',\n }),\n\n skipButton: css({\n alignSelf: 'flex-start',\n }),\n };\n};\n","import { css } from '@emotion/css';\n\nimport { LinkButton, Stack } from '@grafana/ui';\nimport { getConfig } from 'app/core/config';\nimport { Trans } from 'app/core/internationalization';\n\nexport const UserSignup = () => {\n const href = getConfig().verifyEmailEnabled ? `${getConfig().appSubUrl}/verify` : `${getConfig().appSubUrl}/signup`;\n const paddingTop = css({ paddingTop: '16px' });\n\n return (\n \n
\n New to Grafana?\n
\n \n Sign up\n \n
\n );\n};\n","// Libraries\nimport { css } from '@emotion/css';\n\n// Components\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { config } from '@grafana/runtime';\nimport { Alert, LinkButton, Stack, useStyles2 } from '@grafana/ui';\nimport { Branding } from 'app/core/components/Branding/Branding';\nimport { t, Trans } from 'app/core/internationalization';\n\nimport { ChangePassword } from '../ForgottenPassword/ChangePassword';\n\nimport LoginCtrl from './LoginCtrl';\nimport { LoginForm } from './LoginForm';\nimport { LoginLayout, InnerBox } from './LoginLayout';\nimport { LoginServiceButtons } from './LoginServiceButtons';\nimport { PasswordlessConfirmation } from './PasswordlessConfirmationForm';\nimport { PasswordlessLoginForm } from './PasswordlessLoginForm';\nimport { UserSignup } from './UserSignup';\n\nconst LoginPage = () => {\n const styles = useStyles2(getStyles);\n document.title = Branding.AppTitle;\n\n return (\n \n {({\n loginHint,\n passwordHint,\n disableLoginForm,\n disableUserSignUp,\n login,\n passwordlessStart,\n passwordlessConfirm,\n showPasswordlessConfirmation,\n isLoggingIn,\n changePassword,\n skipPasswordChange,\n isChangingPassword,\n showDefaultPasswordWarning,\n loginErrorMessage,\n }) => (\n \n {!isChangingPassword && !showPasswordlessConfirmation && (\n \n {loginErrorMessage && (\n \n {loginErrorMessage}\n \n )}\n\n {!disableLoginForm && !config.auth.passwordlessEnabled && (\n \n \n {!config.auth.disableLogin && (\n \n Forgot your password?\n \n )}\n \n \n )}\n {config.auth.passwordlessEnabled && (\n \n )}\n \n {!disableUserSignUp && }\n \n )}\n\n {config.auth.passwordlessEnabled && showPasswordlessConfirmation && (\n \n \n \n )}\n\n {isChangingPassword && !config.auth.passwordlessEnabled && (\n \n skipPasswordChange()}\n />\n \n )}\n \n )}\n \n );\n};\n\nexport default LoginPage;\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n forgottenPassword: css({\n padding: 0,\n marginTop: theme.spacing(0.5),\n }),\n\n alert: css({\n width: '100%',\n }),\n };\n};\n"],"names":["loginServices","oauthEnabled","getServiceStyles","theme","LoginDivider","styles","getButtonStyleFor","service","LoginServiceButtons","enabledServices","hasServices","Stack","key","serviceName","Icon","PasswordlessConfirmation","onSubmit","isLoggingIn","getStyles","confirmationCodeId","codeId","usernameId","nameId","signup","setSignup","handleSubmit","register","setValue","errors","Branding","queryValues","Field","Input","selectors","Button","PasswordlessLoginForm","emailId","UserSignup","href","paddingTop","LoginCtrl","loginHint","passwordHint","disableLoginForm","disableUserSignUp","login","passwordlessStart","passwordlessConfirm","showPasswordlessConfirmation","changePassword","skipPasswordChange","isChangingPassword","showDefaultPasswordWarning","loginErrorMessage","LoginLayout","Alert","config","LoginForm","ChangePassword"],"sourceRoot":""}