{"version":3,"sources":["webpack:///./src/js/react-modules/cobrands-login/index.tsx"],"names":["CobrandsLogin","usernameLabel","usernamePlaceholder","passwordLabel","passwordPlaceholder","submitLabel","loginFormUrl","buttonLoadingText","applicationNameEndpoint","labelDemoUat","labelUat","labelProd","labelLocal","applicationToolsEndpoint","assoicateSsoSubmitEndpoint","useState","isSubmitting","setSubmitState","isModalOpen","setModalOpen","modalContent","setModalContent","errorContent","setErrorContent","modalErrorContent","setModalErrorContent","environmentValue","setEnvironment","appNameData","setAppNameData","appToolData","setToolData","selectedApp","setSelectedAppName","selectedTool","setSelectedTool","radioButtonFields","setRadioButtonFields","fingerprintField","document","getElementById","TextInputProps","className","id","labelText","placeholder","PasswordProps","handleSiteToolSetup","event","axios","get","then","response","data","options","setSelectedApp","currentTarget","value","setInitialLoadApp","handleSelectedTool","setEnvironmentValue","name","onSubmit","preventDefault","fingerprint","window","var_ns","data_parse","post","username","target","password","redirectUrl","location","href","hasOwnProperty","type","isAssociate","currentEnvironment","currentApp","ssoOptions","length","push","label","showLocal","showQa","labelIntegration","showUat","securityQuestionEndpoint","message","catch","error","required","kind","title","role","lowContrast","hideCloseButton","withOverlay","active","small","open","onClose","size","demoTitle","demoDescription","onClick","demoRemainingDays","prev","demoLoginSuccessRedirectUrl","demoExitButtonText","demoSignUpRedirectUrl","demoContinueButtonText","answer","rememberDevice","checked","questionId","question","inputPlaceholder","key","Date","getTime","rememberDeviceText","exitButtonText","continueButtonText","manualSite","txtSite","manualUser","txtUser","useTool","localSelectedApp","localEnvironment","inputUser","siteUrl","appName","selectedEnvironment","legendText","orientation","defaultSelected","onChange","map","option","defaultValue","CurrentApp","text","selected","ssoOptionsDev"],"mappings":"iiFAsgBeA,UAheO,SAAC,GAeG,IAdxBC,EAcwB,EAdxBA,cACAC,EAawB,EAbxBA,oBACAC,EAYwB,EAZxBA,cACAC,EAWwB,EAXxBA,oBACAC,EAUwB,EAVxBA,YACAC,EASwB,EATxBA,aACAC,EAQwB,EARxBA,kB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EAAawG","file":"100.bundle.js?v=58e80fd2c0afdd3e0e9d","sourcesContent":["import React, { useState } from 'react';\nimport {\n Form,\n TextInput,\n Button,\n Loading,\n ComposedModal,\n ModalBody,\n ModalFooter,\n Checkbox,\n InlineNotification,\n ModalHeader,\n RadioButton,\n RadioButtonGroup,\n Select,\n SelectItem\n} from 'carbon-components-react';\nimport axios from 'axios';\nimport { ArrowRight32 } from '@carbon/icons-react';\nimport { Dropdown } from 'carbon-components';\n\ntype CobrandsLoginProps = {\n usernameLabel: string;\n usernamePlaceholder: string;\n passwordLabel: string;\n passwordPlaceholder: string;\n submitLabel: string;\n loginFormUrl: string;\n buttonLoadingText: string;\n labelDemoUat: string;\n labelUat: string;\n labelProd: string;\n labelLocal: string;\n applicationNameEndpoint: string;\n applicationToolsEndpoint: string;\n assoicateSsoSubmitEndpoint: string;\n};\n\nconst CobrandsLogin = ({\n usernameLabel,\n usernamePlaceholder,\n passwordLabel,\n passwordPlaceholder,\n submitLabel,\n loginFormUrl,\n buttonLoadingText,\n labelDemoUat,\n labelUat,\n labelProd,\n labelLocal,\n applicationNameEndpoint,\n applicationToolsEndpoint,\n assoicateSsoSubmitEndpoint\n}: CobrandsLoginProps) => {\n const [isSubmitting, setSubmitState] = useState(false);\n const [isModalOpen, setModalOpen] = useState(false);\n const [modalContent, setModalContent] = useState(null);\n const [errorContent, setErrorContent] = useState(null);\n const [modalErrorContent, setModalErrorContent] = useState(null);\n const [environmentValue, setEnvironment] = useState(null);\n const [appNameData, setAppNameData] = useState([]);\n const [appToolData, setToolData] = useState([]);\n const [selectedApp, setSelectedAppName] = useState('');\n const [selectedTool, setSelectedTool] = useState('');\n const [radioButtonFields, setRadioButtonFields] = useState([]);\n const fingerprintField = document.getElementById(\n 'var_field'\n ) as HTMLInputElement;\n\n const TextInputProps = {\n className: 'login-cobrands__input-container',\n id: 'username',\n labelText: usernameLabel,\n placeholder: usernamePlaceholder\n };\n\n const PasswordProps = {\n className: 'login-cobrands__input-container',\n id: 'password',\n labelText: passwordLabel,\n placeholder: passwordPlaceholder\n };\n\n const handleSubmit = (event: any) => {\n event.preventDefault();\n\n let fingerprint = null;\n\n //@ts-ignore - ignoring this bit as we are using 3rd party code to get a browser finger print and need to access it this way\n if (fingerprintField && window.var_ns) {\n //@ts-ignore\n window.var_ns.data_parse('var_field');\n\n fingerprint = fingerprintField.value;\n }\n\n setSubmitState(true);\n \n axios\n .post(loginFormUrl, {\n username: event.target.username.value,\n password: event.target.password.value,\n fingerprint: fingerprint\n })\n .then(function (response) {\n if (response.data.redirectUrl) {\n window.location.href = response.data.redirectUrl;\n } else if (response.data.hasOwnProperty('demoRemainingDays')) {\n setModalContent({\n type: 'demo',\n ...response.data\n });\n setModalOpen(true);\n } else if (response.data.isAssociate) {\n response.data.currentEnvironment ? (setEnvironmentValue(response.data.currentEnvironment, '')): '';\n response.data.currentApp ? (setInitialLoadApp(response.data.currentApp)): '';\n response.data.ssoOptions ? (handleSiteToolSetup(event)) : null;\n if (radioButtonFields.length == 0) {\n radioButtonFields.push({\n label: response.data.labelDemoUat,\n id: 'envirDemoUat',\n value: 'demouat'\n });\n if(response.data.showLocal) {\n radioButtonFields.push({\n label: response.data.labelLocal,\n id: 'labelLocal',\n value: 'local'\n });\n } \n if(response.data.showQa) {\n radioButtonFields.push({\n label: response.data.labelIntegration,\n id: 'envirIntegration',\n value: 'integration'\n });\n } \n if(response.data.showUat) {\n radioButtonFields.push({\n label: response.data.labelUat,\n id: 'envirUat',\n value: 'uat'\n });\n } \n radioButtonFields.push({\n label: response.data.labelProd,\n id: 'envirProd',\n value: 'prod'\n });\n }\n \n setRadioButtonFields(radioButtonFields);\n\n setModalContent({\n type: 'associate',\n ...response.data\n });\n setModalOpen(true);\n } else if (response.data.securityQuestionEndpoint) {\n setModalContent({\n type: 'security',\n ...response.data\n });\n setModalOpen(true);\n } else if (response.data.message) {\n setErrorContent(response.data.message);\n }\n\n setSubmitState(false);\n })\n .catch(function (error) {\n setSubmitState(false);\n });\n };\n\n const handleSiteToolSetup = async (event: any) => {\n axios\n .get(applicationToolsEndpoint)\n .then( function (response) {\n if (response.data) {\n setToolData(response.data.options);\n }\n })\n };\n const setSelectedApp = async (event: any) => {\n setSelectedAppName(event.currentTarget.value);\n };\n\n const setInitialLoadApp = async (value: string) => {\n setSelectedAppName(value);\n }\n\n const handleSelectedTool = async (event: any) => {\n setSelectedTool(event.currentTarget.value);\n };\n\n const handleAssociateSubmit = (event: any) => {\n event.preventDefault();\n var manualSite = event.target.txtSite ? event.target.txtSite.value : '';\n var manualUser = event.target.txtUser ? event.target.txtUser.value : '';\n var useTool = selectedTool;\n var localSelectedApp = selectedApp;\n var localEnvironment = environmentValue;\n\n axios\n .post(assoicateSsoSubmitEndpoint,{\n inputUser: manualUser,\n siteUrl: manualSite,\n appName: localSelectedApp,\n selectedTool: useTool,\n selectedEnvironment: localEnvironment\n })\n .then(function (response) {\n if (response.data.redirectUrl) {\n window.location.href = response.data.redirectUrl;\n }\n }\n )\n };\n\n const setEnvironmentValue = async (value: string, name: string) => {\n if (value == null){\n value = 'demouat';\n }\n setEnvironment(value);\n\n axios\n .get(applicationNameEndpoint + '?id=' + environmentValue)\n .then(function (response) {\n if (response.data) {\n setAppNameData(response.data.options)\n }\n })\n };\n\n const handleSecurityQuestionSubmit = (event: any) => {\n event.preventDefault();\n\n let fingerprint = null;\n\n //@ts-ignore - ignoring this bit as we are using 3rd party code to get a browser finger print and need to access it this way\n if (fingerprintField && window.var_ns) {\n fingerprint = fingerprintField.value;\n }\n\n axios\n .post(modalContent.securityQuestionEndpoint, {\n answer: event.target.answer.value,\n rememberDevice: event.target.rememberDevice.checked,\n questionId: modalContent.questionId,\n fingerprint: fingerprint\n })\n .then(function (response) {\n if (response.data.redirectUrl) {\n window.location.href = response.data.redirectUrl;\n } else if (response.data.securityQuestionEndpoint) {\n setModalContent({\n type: 'security',\n ...response.data\n });\n setModalOpen(true);\n } else if (response.data.message) {\n setModalErrorContent(response.data.message);\n }\n })\n .catch(function (error) {});\n };\n\n return (\n <>\n
\n \n\n \n\n {errorContent && (\n \n )}\n\n {isSubmitting ? (\n
\n \n \n {buttonLoadingText}\n \n
\n ) : (\n \n )}\n \n\n {modalContent && modalContent.type === 'demo' && (\n setModalOpen(false)}\n size=\"sm\"\n className=\"security-question-modal\"\n >\n \n

\n {modalContent.demoTitle}\n

\n
\n \n
{modalContent.demoDescription}
\n
\n \n {\n if (modalContent.demoRemainingDays > 0) {\n if (!!modalContent.securityQuestionEndpoint) {\n setModalContent((prev: any) => ({\n ...prev,\n type: 'security'\n }));\n } else {\n window.location.href =\n modalContent.demoLoginSuccessRedirectUrl;\n }\n } else {\n setModalOpen(false);\n }\n }}\n kind=\"secondary\"\n >\n {modalContent.demoExitButtonText}\n \n {\n window.location.href = modalContent.demoSignUpRedirectUrl;\n }}\n kind=\"primary\"\n >\n {modalContent.demoContinueButtonText}\n \n \n \n )}\n\n {modalContent && modalContent.type === 'security' && (\n setModalOpen(false)}\n size=\"sm\"\n className=\"security-question-modal\"\n >\n \n

\n {modalContent.title}\n

\n
\n
\n \n \n\n \n\n {modalErrorContent && (\n \n )}\n \n \n \n \n \n
\n \n )}\n\n {modalContent && modalContent.type === 'associate' && (\n setModalOpen(false)}\n size=\"sm\"\n className=\"security-question-modal\"\n >\n \n

\n {modalContent.title}\n

\n
\n
\n \n \n {\n radioButtonFields.length > 0 ?\n (\n radioButtonFields.map((option: { label: string; id: string; value: string}) => (\n \n ))\n ) : \n }\n\n \n\n \n \n {\n appNameData.length > 0 ? (\n appNameData.map((option: { label: string; value: string }) => (\n \n ))\n ) : \n } \n \n { modalContent.ssoOptions ? (\n <>\n \n\n { (modalContent.ssoOptions && modalContent.ssoOptionsDev) ? (\n\n <> \n \n \n {\n appToolData.length > 0 ? (\n appToolData.map((option: { label: string; value: string }) => (\n \n ))\n ) :\n \n }\n \n \n ): null}\n \n ) : null }\n\n {modalErrorContent && (\n \n )}\n \n \n \n \n \n
\n \n )}\n \n );\n};\n\nexport default CobrandsLogin;\n"],"sourceRoot":""}