{"version":3,"sources":["_platform/src/components/LoginForm/LoginForm.js","_platform/src/components/FormHint/FormHint.js","_platform/src/components/FormPlaceholder/FormPlaceholder.js","_platform/src/components/FormHelpText/FormHelpText.js","_platform/src/components/Button/Button.js","_platform/src/components/FormLabel/FormLabel.js","_platform/src/utils/sanitiseHTML.js","_platform/src/utils/formValidation.js","_platform/src/components/FormInput/FormInput.js","_platform/src/components/StatusMessage/StatusMessage.js","_platform/src/components/FormCheckbox/FormCheckbox.js"],"names":["defaultFormLabels","labelUserName","labelPassword","labelRememberMe","LoginForm","props","initialValues","onSubmitForm","status","_props$theme$settings","theme","settingsApp","labels","Object","_codebuild_output_src3000503699_src_RSR_Rewards_Lori_FED_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__","formLabels","react__WEBPACK_IMPORTED_MODULE_1___default","a","createElement","className","react_final_form__WEBPACK_IMPORTED_MODULE_3__","onSubmit","render","_ref","handleSubmit","submitting","method","name","component","FormInput","type","required","validate","label","placeholder","disabled","loginRememberMeEnabled","loginUseSessionStorage","FormCheckbox","_components_StatusMessage_StatusMessage__WEBPACK_IMPORTED_MODULE_8__","variant","statusDetails","message","_components_Button_Button__WEBPACK_IMPORTED_MODULE_5__","loginPasswordResetShow","passwordResetEnabled","passwordResetPagePath","react_router_dom__WEBPACK_IMPORTED_MODULE_9__","to","loginPasswordResetLabel","defaultProps","withTheme","Hint","concat","children","StyledHint","styled","_templateObject","customInputHintColor","gray600","customInputHintFontSize","react__WEBPACK_IMPORTED_MODULE_0__","__webpack_require__","react__WEBPACK_IMPORTED_MODULE_0___default","n","_smooth_ui_core_sc__WEBPACK_IMPORTED_MODULE_1__","FormPlaceholder","inline","py","pl","undefined","FormHelpText","StyledFormHelpText","htmlValue","dangerouslySetInnerHTML","__html","sanitiseHTML","div","ButtonBlock","Box","buttonBlockSpacerTop","buttonBlockSpacerBottom","buttonBlockHasSeparator","buttonBlockSpacerInner","buttonSeparatorColor","StyledButton","Button","_templateObject2","customInputBtnFontWeight","minWidth","inputBtnMinWidth","p","controlFocus","th","propTypes","PropTypes","bool","string","object","Indicator","span","withConfig","displayName","componentId","formPreferOptionalIndicator","CustomLabel","react__WEBPACK_IMPORTED_MODULE_2___default","_StyledLabel","htmlFor","isRequiredIndicator","isRequired","preferOptional","optionalText","formIndicatorOptionalText","requiredText","formIndicatorRequiredText","dompurify__WEBPACK_IMPORTED_MODULE_0__","dompurify__WEBPACK_IMPORTED_MODULE_0___default","dompurify","addHook","node","setAttribute","hasAttribute","d","__webpack_exports__","isValid","touched","valid","value","StyledInput","inputInline","_codebuild_output_src3000503699_src_RSR_Rewards_Lori_FED_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_5__","react__WEBPACK_IMPORTED_MODULE_7___default","_smooth_ui_core_sc__WEBPACK_IMPORTED_MODULE_9__","css","primary","_this$props","this","input","immutable","meta","helpText","hint","iHaveSuppliedAnExternalLabel","rest","_components_FormHelpText_FormHelpText__WEBPACK_IMPORTED_MODULE_10__","_components_FormLabel_FormLabel__WEBPACK_IMPORTED_MODULE_12__","_components_FormHint_FormHint__WEBPACK_IMPORTED_MODULE_11__","_components_FormPlaceholder_FormPlaceholder__WEBPACK_IMPORTED_MODULE_13__","assign","control","id","error","Component","_components_MessageBox_MessageBox__WEBPACK_IMPORTED_MODULE_1__","StatusMessage","CustomFormCheck","FormCheck","CustomCheckbox","Checkbox","customCheckboxDisabledBackground","gray300","_templateObject3","StyledCheckbox","useHelpTextAsLabel","_codebuild_output_src3000503699_src_RSR_Rewards_Lori_FED_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__","_smooth_ui_core_sc__WEBPACK_IMPORTED_MODULE_4__","_components_FormHelpText_FormHelpText__WEBPACK_IMPORTED_MODULE_5__","toString","_components_FormPlaceholder_FormPlaceholder__WEBPACK_IMPORTED_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AAAC,cAACqJ,EAAA,EAAD,CAAc9F,UAAWoE,EAAU1H,UAAU,sBAE7Cc,EAEFyE,EAAAzF,EAAAC,cAACiF,EAAD,CAAWU,oBAAqBA,IAtDtCC,EAwDUD,EAvDVE,EAwDUiC,EAAKtI,MAAMC,YAAY6F,4BAvDjCQ,EAwDUgC,EAAKtI,MAAMC,YAAYsG,0BAvDjCC,EAwDU8B,EAAKtI,MAAMC,YAAYwG,+BAtDd7C,IAAfwC,EAAiC,KAEjCA,IAAeC,EACVG,GAEJJ,GAAcC,EACVC,EAEF,QAkDF2B,GACCjC,EAAAzF,EAAAC,cAACuJ,EAAA,EAAD,CAAiBtG,QAAM,GACJ,SAAhBuE,EAAMV,QAAoC,IAAhBU,EAAMV,MAAiB,OAAS,QAIhEc,EAAOpC,EAAAzF,EAAAC,cAACwJ,EAAA,EAAD,KAAW5B,GAAmB,KACrCF,EAAKd,UAAYc,EAAKb,MACrBrB,EAAAzF,EAAAC,cAACoJ,EAAA,EAAD,CAAiBvC,MAAOa,EAAKb,OAAQa,EAAKY,OACxC,OAiBRW,EAAejH,aAAe,CAC5Bf,UAAU,EACV0G,cAAUvE,EACVwE,KAAM,GACNH,WAAW,EACXxE,QAAQ,EACR0C,yBAAqBvC,EACrB8F,wBAAoB9F,GAGPnB,gBAAUgH","file":"static/js/loginForm.79796472.chunk.js","sourcesContent":["/**\n * LoginForm\n *\n * This component relies on a LoginProvider-like component to supply data and\n * the submit methods via props.\n *\n * Usage:\n *\n * \n * \n * \n *\n * disableMeta on the LoginProvider, and formLabels on this component are optional props\n */\n\n// Core imports\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\n// Style, SEO and settings\nimport { withTheme } from '@smooth-ui/core-sc';\n\n// Component features\nimport { Form, Field } from 'react-final-form';\nimport { required } from '../../utils/formValidation'; // _platform\nimport Button, { ButtonBlock } from '../../components/Button/Button'; // _platform\nimport FormCheckbox from '../../components/FormCheckbox/FormCheckbox'; // _platform\nimport FormInput from '../../components/FormInput/FormInput'; // _platform\nimport StatusMessage from '../../components/StatusMessage/StatusMessage'; // _platform\nimport { Link } from 'react-router-dom';\n\n// Default form labels\n// These will be _shallow merged_ with props.formLabels (if provided)\n// Usage (from parent component):\n// \nconst defaultFormLabels = {\n labelUserName: 'User Name / Email',\n labelPassword: 'Password',\n labelRememberMe: 'Remember Login',\n};\n\nconst LoginForm = props => {\n const {\n initialValues,\n onSubmitForm,\n status,\n theme: { settingsApp = {} },\n } = props;\n const labels = { ...defaultFormLabels, ...props.formLabels }; // Merge props with default values\n const { labelUserName, labelPassword, labelRememberMe } = labels;\n // We could avoid merging into the labels const, then destructuring it, however leaving as 2 steps for legibility\n\n return (\n
\n (\n
\n \n {/* TODO: Form validation */}\n \n {!!settingsApp.loginRememberMeEnabled &&\n !settingsApp.loginUseSessionStorage && (\n \n )}\n\n \n {status.statusDetails.message ||\n (status.status === 'error' && (\n

\n Login Failed. Please remember that passwords are case\n sensitive.\n

\n ))}\n
\n\n \n \n \n \n )}\n />\n {settingsApp.loginPasswordResetShow &&\n settingsApp.passwordResetEnabled &&\n settingsApp.passwordResetPagePath && (\n
\n \n {settingsApp.loginPasswordResetLabel || 'Reset Password'}\n \n
\n )}\n
\n );\n};\nLoginForm.propTypes = {\n formLabels: PropTypes.shape({\n labelUserName: PropTypes.string,\n labelPassword: PropTypes.string,\n labelRememberMe: PropTypes.string,\n }),\n initialValues: PropTypes.object,\n onSubmitForm: PropTypes.func.isRequired,\n status: PropTypes.object.isRequired,\n theme: PropTypes.object,\n};\n\nLoginForm.defaultProps = {\n formLabels: defaultFormLabels,\n initialValues: {},\n theme: { settingsApp: {} },\n};\n\nexport default withTheme(LoginForm);\n","/**\n * FormInput Hint\n *\n * Used to display a hint above the input box\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@smooth-ui/core-sc';\n\nconst Hint = props => (\n
{props.children}
\n);\n\nHint.propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string,\n};\n\nHint.defaultProps = {\n className: '',\n};\n\nconst StyledHint = styled(Hint)`\n color: ${props => props.theme.customInputHintColor || props.theme.gray600};\n font-size: ${props => props.theme.customInputHintFontSize || '0.875em'};\n margin-bottom: 0.5em;\n`;\n\nexport default StyledHint;\n","/**\n * FormPlaceholder\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Box } from '@smooth-ui/core-sc';\n\nconst FormPlaceholder = ({ children, inline }) => (\n \n {children}\n \n);\n\nFormPlaceholder.propTypes = {\n children: PropTypes.node,\n inline: PropTypes.bool,\n};\n\nFormPlaceholder.defaultProps = {\n children: undefined,\n inline: undefined,\n};\n\nexport default FormPlaceholder;\n","/**\n * Form Fields Help Text\n *\n * Used to display a help text above the input label\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@smooth-ui/core-sc';\nimport sanitiseHTML from '_platform/src/utils/sanitiseHTML';\n\nconst FormHelpText = props => (\n \n {props.htmlValue && (\n \n )}\n {props.children}\n \n);\n\nFormHelpText.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n htmlValue: PropTypes.string,\n};\n\nFormHelpText.defaultProps = {\n children: undefined,\n className: '',\n htmlValue: undefined,\n};\n\nconst StyledFormHelpText = styled.div`\n &.helptext-as-label {\n display: inline;\n\n > div {\n display: inline;\n }\n }\n\n :not(.helptext-as-label) {\n margin-bottom: 0.5em;\n margin-top: 1.5em;\n }\n`;\n\nexport default FormHelpText;\n","/**\n * Button\n */\nimport PropTypes from 'prop-types';\nimport { Box, Button, controlFocus, styled, th } from '@smooth-ui/core-sc';\n\n// Button Block\nexport const ButtonBlock = styled(Box)`\n margin-top: ${props => props.theme.buttonBlockSpacerTop || '2rem'};\n margin-bottom: ${props => props.theme.buttonBlockSpacerBottom || '1rem'};\n\n ${props =>\n !!props.theme.buttonBlockHasSeparator\n ? `\n padding-top: ${props.theme.buttonBlockSpacerInner || '1.5rem'};\n border-top: 1px solid ${props.theme.buttonSeparatorColor || '#dee2e6'};\n `\n : null};\n`;\n\nconst StyledButton = styled(Button)`\n ${props => props.disabled && `cursor: not-allowed;`}\n ${props =>\n props.theme.customInputBtnFontWeight &&\n `font-weight: ${props.theme.customInputBtnFontWeight};`}\n margin-top: 1px;\n min-width: ${props => props.minWidth || props.theme.inputBtnMinWidth};\n text-align: center;\n\n &:focus {\n ${p => controlFocus(th(p.variant)(p))(p)}\n }\n`;\n\nStyledButton.propTypes = {\n disabled: PropTypes.bool,\n minWidth: PropTypes.string,\n theme: PropTypes.object,\n};\nexport default StyledButton;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Label, styled, withTheme } from '@smooth-ui/core-sc';\nimport 'styled-components/macro'; // For the CSS prop on elements\n\nconst Indicator = styled.span`\n ${props =>\n props.theme.settingsApp.formPreferOptionalIndicator\n ? `\n font-weight: normal;\n padding-left: 0.25em;\n `\n : 'color: red;'}\n`;\n\nconst whichIndicator = (\n isRequired,\n preferOptional,\n optionalText,\n requiredText\n) => {\n if (isRequired === undefined) return null;\n\n if (isRequired && !preferOptional) {\n return requiredText;\n }\n if (!isRequired && preferOptional) {\n return optionalText;\n }\n return null;\n};\n\nconst CustomLabel = props => {\n return (\n \n {props.children}:\n \n {whichIndicator(\n props.isRequiredIndicator,\n props.theme.settingsApp.formPreferOptionalIndicator,\n props.theme.settingsApp.formIndicatorOptionalText,\n props.theme.settingsApp.formIndicatorRequiredText\n )}\n \n \n );\n};\n\nCustomLabel.propTypes = {\n children: PropTypes.node.isRequired,\n htmlFor: PropTypes.string.isRequired,\n isRequiredIndicator: PropTypes.bool,\n theme: PropTypes.object.isRequired,\n};\n\nCustomLabel.defaultProps = {\n isRequiredIndicator: undefined,\n};\n\nexport default withTheme(CustomLabel);\n","import dompurify from 'dompurify';\n\n// Add a hook to make all links open a new window\ndompurify.addHook('afterSanitizeAttributes', function(node) {\n // set all elements owning target to target=_blank\n if ('target' in node) {\n node.setAttribute('target', '_blank');\n // prevent https://www.owasp.org/index.php/Reverse_Tabnabbing\n node.setAttribute('rel', 'noopener noreferrer');\n }\n // set non-HTML/MathML links to xlink:show=new\n if (\n !node.hasAttribute('target') &&\n (node.hasAttribute('xlink:href') || node.hasAttribute('href'))\n ) {\n node.setAttribute('xlink:show', 'new');\n }\n});\n\nexport default dompurify.sanitize;\n","/**\n * Form Validation utilities\n */\n\n// Return `valid` value as expected by control inputs Smooth-UI\nexport const isValid = (touched, valid) => {\n if (!touched) return undefined;\n if (valid) return true;\n if (!valid) return false;\n};\n\n// Required\nexport const required = value => (value ? undefined : 'Required');\n\n// Required with custom message\n// Usage: field.required && requiredWithMessage(field.requiredMessage || 'Required')\n// Check if the field is required, if so issue requiredWithMessage.\n// IMPORTANT: Must provide fallback message, otherwise the method won't run\nexport const requiredWithMessage = message => value =>\n value ? undefined : message;\n\n// Email address - matching the API\nexport const validEmail = value =>\n /\\b[a-zA-Z0-9._%\\-+NULL]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,6}\\b/.test(value) // eslint-disable-line no-useless-escape\n ? undefined\n : 'Please enter a valid email address';\n\n// Numbers only\nexport const validNumber = value =>\n isNaN(value) ? 'Must be a number' : undefined;\n\n// Minimum value\n// Usage: minValue(20)\nexport const minValue = min => value =>\n isNaN(value) || value >= min ? undefined : `Must be greater than ${min}`;\n\n// Compose validators\n// Usage: composeValidators(required, validNumber, minValue(20))\nexport const composeValidators = (...validators) => value =>\n validators.reduce((error, validator) => error || validator(value), undefined);\n","/**\n * FormInput\n */\n\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n ControlFeedback,\n css,\n FormGroup,\n Input,\n styled,\n} from '@smooth-ui/core-sc';\nimport FormHelpText from '../../components/FormHelpText/FormHelpText'; // _platform\nimport FormHint from '../../components/FormHint/FormHint'; // _platform\nimport FormLabel from '../../components/FormLabel/FormLabel'; // _platform\nimport FormPlaceholder from '../../components/FormPlaceholder/FormPlaceholder'; // _platform\nimport { isValid } from '../../utils/formValidation'; // _platform\n\n// Prevent inputInline from being passed through to DOM\nconst StyledInput = styled(({ inputInline, ...p }) => )`\n ${props =>\n props.inputInline\n ? css`\n display: inline-block;\n width: auto;\n `\n : null}\n\n :hover {\n border-color: ${props =>\n props.valid === undefined ? props.theme.primary : undefined};\n }\n`;\n\nclass FormInput extends Component {\n render() {\n const {\n input,\n inputInline,\n immutable,\n meta,\n helpText,\n label,\n hint,\n iHaveSuppliedAnExternalLabel,\n isRequiredIndicator,\n ...rest\n } = this.props;\n\n if (\n process.env.NODE_ENV === 'development' &&\n !label &&\n !iHaveSuppliedAnExternalLabel\n ) {\n // eslint-disable-next-line no-console\n console.warn(\n `Dev: FormInput '${input && input.name}' does not have label specified`\n );\n }\n\n return (\n \n {helpText && }\n {label ? (\n \n {label}\n \n ) : null}\n {hint ? {hint} : null}\n {immutable && {input.value}}\n {!immutable && (\n \n )}\n\n {meta.touched && !meta.valid ? (\n {meta.error}\n ) : null}\n \n );\n }\n}\n\nFormInput.propTypes = {\n helpText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n hint: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n iHaveSuppliedAnExternalLabel: PropTypes.bool,\n immutable: PropTypes.bool,\n input: PropTypes.object.isRequired,\n inputInline: PropTypes.bool,\n isRequiredIndicator: PropTypes.bool,\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n meta: PropTypes.object.isRequired,\n};\n\nFormInput.defaultProps = {\n helpText: undefined,\n hint: '',\n iHaveSuppliedAnExternalLabel: undefined,\n immutable: false,\n inputInline: false,\n isRequiredIndicator: undefined,\n label: undefined,\n};\n\nexport default FormInput;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport MessageBox from '../../components/MessageBox/MessageBox'; // _platform\n\nconst StatusMessage = props => {\n if (!props.children) return null;\n\n return props.variant === 'success' || props.variant === 'error' ? (\n \n ) : null;\n};\n\nStatusMessage.propTypes = {\n variant: PropTypes.string,\n};\n\nStatusMessage.defaultProps = {\n variant: undefined,\n};\n\nexport default StatusMessage;\n","/**\n * FormCheckbox\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n ControlFeedback,\n FormGroup,\n FormCheck,\n Checkbox,\n FormCheckLabel,\n styled,\n withTheme,\n} from '@smooth-ui/core-sc';\nimport FormHelpText from '../../components/FormHelpText/FormHelpText'; // _platform\nimport FormHint from '../../components/FormHint/FormHint'; // _platform\nimport FormPlaceholder from '../../components/FormPlaceholder/FormPlaceholder'; // _platform\nimport { isValid } from '../../utils/formValidation'; // _platform\n\nconst CustomFormCheck = styled(FormCheck)`\n align-items: flex-start;\n`;\n\nconst CustomCheckbox = styled(Checkbox)`\n /* Reset z-index to prevent showing over dropdowns and select elements */\n justify-content: flex-start;\n min-width: 25px;\n z-index: 0;\n\n &:hover > .sui-checkbox-content {\n border-color: ${props =>\n props.valid === undefined ? props.theme.primary : undefined};\n }\n\n input:disabled + .sui-checkbox-content {\n background-color: ${props =>\n props.theme.customCheckboxDisabledBackground || props.theme.gray300};\n }\n`;\n\nconst Indicator = styled.span`\n ${props =>\n props.theme.settingsApp.formPreferOptionalIndicator\n ? `\n font-weight: normal;\n padding-left: 0.25em;\n `\n : 'color: red;'}\n`;\n\nconst whichIndicator = (\n isRequired,\n preferOptional,\n optionalText,\n requiredText\n) => {\n if (isRequired === undefined) return null;\n\n if (isRequired && !preferOptional) {\n return requiredText;\n }\n if (!isRequired && preferOptional) {\n return optionalText;\n }\n return null;\n};\n\nconst StyledCheckbox = ({\n input,\n inline,\n disabled,\n immutable,\n isRequiredIndicator,\n meta,\n helpText,\n label,\n hint,\n useHelpTextAsLabel,\n ...rest\n}) => (\n \n {helpText && !useHelpTextAsLabel && }\n \n {!immutable && (\n \n )}\n \n {useHelpTextAsLabel ? (\n \n ) : (\n label\n )}\n \n {whichIndicator(\n isRequiredIndicator,\n rest.theme.settingsApp.formPreferOptionalIndicator,\n rest.theme.settingsApp.formIndicatorOptionalText,\n rest.theme.settingsApp.formIndicatorRequiredText\n )}\n \n \n {immutable && (\n \n {input.value === 'true' || input.value === true ? ' Yes' : ' No'}\n \n )}\n \n {hint ? {hint} : null}\n {meta.touched && !meta.valid ? (\n {meta.error}\n ) : null}\n \n);\n\nStyledCheckbox.propTypes = {\n disabled: PropTypes.bool,\n helpText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n hint: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n immutable: PropTypes.bool,\n inline: PropTypes.bool,\n input: PropTypes.object.isRequired,\n isRequiredIndicator: PropTypes.bool,\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,\n meta: PropTypes.object.isRequired,\n useHelpTextAsLabel: PropTypes.bool,\n};\n\nStyledCheckbox.defaultProps = {\n disabled: false,\n helpText: undefined,\n hint: '',\n immutable: false,\n inline: false,\n isRequiredIndicator: undefined,\n useHelpTextAsLabel: undefined,\n};\n\nexport default withTheme(StyledCheckbox);\n"],"sourceRoot":""}