{"version":3,"sources":["webpack:///./src/components/GlobalSpinner/index.js","webpack:///./src/components/Address/index.js","webpack:///./src/components/Address/Container.jsx","webpack:///./src/components/Address/Component.jsx","webpack:///./src/components/Address/QAS/Component.jsx","webpack:///./src/components/Address/ManualAddress/Container.jsx","webpack:///./src/components/Address/ManualAddress/Component.jsx","webpack:///./src/components/Form/DynamicForm/Component.jsx","webpack:///./src/components/GlobalSpinner/constants.js","webpack:///./src/components/Modals/Modal.tsx","webpack:///./src/components/Modals/Footers/SingleButton.jsx","webpack:///./src/components/Address/QAS/index.js","webpack:///./src/components/GlobalSpinner/Container.ts","webpack:///./src/components/GlobalSpinner/Component.jsx","webpack:///./src/components/GlobalSpinner/reducers.js","webpack:///./src/components/Modals/HtmlModal.jsx","webpack:///./src/components/Modals/Footers/SubmitAndCancelButton.jsx","webpack:///./src/components/Modals/index.js","webpack:///./src/components/Address/ManualAddress/index.js","webpack:///./src/components/Form/DynamicForm/index.js","webpack:///./src/components/Form/dynamicFieldProps.js","webpack:///./src/components/Address/ManualAddress/reducers.js","webpack:///./src/components/Address/reducers.js","webpack:///./src/constants/countries.js"],"names":["reducers","mapStateToProps","state","componentState","partition","root","showQas","get","qasAvailableFromVerification","qasAvailable","mapDispatchToProps","dispatch","ownProps","setShowQas","value","actions","formName","fieldName","checkQasCountryAvailabilityV2","country","checkCountryAvailabilityV2","Container","connect","propTypes","string","isRequired","className","label","enableQasAddressText","bool","defaultProps","i18nPrefix","manualClass","qasClass","Address","props","getManualAddressInstructions","bind","onSwitchToManualAddress","onSwitchToAddressFinder","canScrollToAddressField","this","prevProps","prevState","scrollToClass","analyticsData","eventCategory","analyticsEventCategory","addressSelection","eventAction","analyticsEventAction","addressDropdown","eventLabel","analyticsEventLabel","addressManualSelected","pushAnalyticsEvent","setState","regoSteps","addressSelectInputType","addressFinderSelected","title","text","type","onClick","htmlFor","name","customErrorMessage","getQasErrorMessage","customInstructions","getQasInstructions","clearOnUnmount","formSection","instructions","func","QAS","component","id","validate","required","element","resetFields","fields","forEach","field","change","formInitialValues","getFormInitialValues","addressFields","onMount","fetchAddress","onCountryChange","newCountry","oldAddressFields","clear","ManualAddress","formCountry","Country","nextProps","map","visible","modifiedAddressFields","filterAddressFields","useFieldValidation","arrayOf","shape","renderInstructions","undefined","validateField","maxLength","minLength","regex","regexError","isMatch","RenderField","properties","FieldComponent","RenderDynamicFields","dynamicFields","index","parentKey","Array","key","f","width","DynamicForm","wrapperClass","length","dynamicFieldsProps","oneOfType","statePartitions","LOADING","COUNT","backdrop","document","createElement","classList","add","modalCount","onClose","componentDidMount","body","appendChild","componentWillUnmount","remove","removeChild","render","style","display","role","children","footer","React","Component","Modal","SingleButton","disabled","loading","displayName","initialLoadingState","spinnerReducer","action","endsWith","currentCount","set","HtmlModal","content","dangerouslySetInnerHTML","__html","node","SubmitAndCancelButton","submit","cancel","btnCancelProps","data-recipient-info","recipientInfo","button","Footers","dynamicFieldProps","buttonText","handleCallBack","number","placeholder","actionTypes","FETCH_ADDRESS_FIELDS","createAction","RefDataApi","addressTemplate","dashesOnlyRegex","mapFieldType","addressField","ElementType","toLowerCase","getOptionValue","option","Abbreviations","UseAbbreviations","Object","keys","find","abbr","mapFieldOptions","Options","exec","i18n","hidden","getFormFieldProps","FieldName","DisplayLabel","data","Required","MaxLength","RegularExpression","manualAddressReducer","handleActions","meta","payload","AddressProperties","SET_SHOW_QAS","PREFIX","COUNTRY_AVAILABILITY","VerificationApi","countryAvailabilityV2","reducer","Qas","COUNTRY_US","COUNTRY_NZ","COUNTRY_AU","COUNTRY_GB","COUNTRY_CA","COUNTRIES_WITH_STATES","COUNTRIES_WITH_DIRECT_DEBIT","COUNTRIES_WITH_DRIVER_LICENCE_CONSENT"],"mappings":"+XAAA,c,sBAISA,U,IAHT,c,wlBCDA,e,sBAISA,U,IAHT,c,uUCAA,8BAEA,6B,mPAEMC,EAAkB,SAACC,GACrB,IAAMC,EAAiBD,GAAM,QAAAE,UAAUC,MACvC,MAAO,CACHC,QAASH,E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cesContent":["import Container from './Container';\nimport reducers from './reducers';\n\nexport default Container;\nexport { reducers };\n","import Container from './Container';\nimport reducers from './reducers';\n\nexport default Container;\nexport { reducers };\n","import { connect } from 'react-redux';\nimport PropTypes from 'constants/PropTypes';\nimport Component from './Component';\nimport { partition, actions } from './reducers';\n\nconst mapStateToProps = (state) => {\n const componentState = state[partition.root];\n return {\n showQas: componentState.get(partition.showQas),\n qasAvailableFromVerification: componentState.get(partition.qasAvailable),\n };\n};\n\nconst mapDispatchToProps = (dispatch, ownProps) => ({\n setShowQas: (value) =>\n dispatch(actions.setShowQas(value, ownProps.formName, ownProps.fieldName)),\n checkQasCountryAvailabilityV2: (country) =>\n dispatch(\n actions.checkCountryAvailabilityV2(country, ownProps.formName, ownProps.fieldName),\n ),\n});\n\nconst Container = connect(mapStateToProps, mapDispatchToProps)(Component);\n\nContainer.propTypes = {\n country: PropTypes.string.isRequired,\n formName: PropTypes.string.isRequired,\n fieldName: PropTypes.string.isRequired,\n className: PropTypes.string,\n label: PropTypes.string,\n enableQasAddressText: PropTypes.bool,\n};\n\nContainer.defaultProps = {\n enableQasAddressText: false,\n};\n\nexport default Container;\n","import React, { Component } from 'react';\nimport PropTypes from 'constants/PropTypes';\nimport i18n from 'libs/i18n';\nimport { scrollToClass } from 'libs/events';\nimport {\n pushAnalyticsEvent,\n analyticsEventCategory,\n analyticsEventLabel,\n analyticsEventAction,\n} from 'libs/analytics';\nimport Instuctions from 'components/Form/Instructions';\nimport QAS from './QAS';\nimport ManualAddress from './ManualAddress';\n\nconst i18nPrefix = 'address';\nconst manualClass = 'uia-manual';\nconst qasClass = 'uia-qas';\n\nclass Address extends Component {\n constructor(props) {\n super(props);\n\n this.getManualAddressInstructions = this.getManualAddressInstructions.bind(this);\n this.onSwitchToManualAddress = this.onSwitchToManualAddress.bind(this);\n this.onSwitchToAddressFinder = this.onSwitchToAddressFinder.bind(this);\n\n this.state = {\n canScrollToAddressField: false,\n };\n }\n\n componentDidMount() {\n const { country } = this.props;\n this.props.checkQasCountryAvailabilityV2(country);\n }\n\n componentDidUpdate(prevProps, prevState) {\n const { qasAvailableFromVerification, country, setShowQas, className } = this.props;\n\n if (country !== prevProps.country) {\n this.props.checkQasCountryAvailabilityV2(country);\n }\n\n if (qasAvailableFromVerification !== prevProps.qasAvailableFromVerification) {\n setShowQas(qasAvailableFromVerification);\n }\n\n const { canScrollToAddressField } = this.state;\n if (\n canScrollToAddressField !== prevState.canScrollToAddressField &&\n canScrollToAddressField\n ) {\n scrollToClass(`${className} ${qasClass}`);\n }\n }\n\n onSwitchToManualAddress() {\n const analyticsData = {\n eventCategory: analyticsEventCategory.addressSelection,\n eventAction: analyticsEventAction.addressDropdown,\n eventLabel: analyticsEventLabel.addressManualSelected,\n };\n\n pushAnalyticsEvent(analyticsData);\n\n this.setState({\n canScrollToAddressField: false,\n });\n }\n\n onSwitchToAddressFinder() {\n const analyticsData = {\n eventCategory: analyticsEventCategory.regoSteps,\n eventAction: analyticsEventAction.addressSelectInputType,\n eventLabel: analyticsEventLabel.addressFinderSelected,\n };\n\n pushAnalyticsEvent(analyticsData);\n\n this.setState({\n canScrollToAddressField: true,\n });\n }\n\n getQasErrorMessage() {\n return (\n \n {i18n(`${i18nPrefix}-qas-error-text`)}\n {\n this.onSwitchToManualAddress();\n this.props.setShowQas(false);\n }}\n >\n {i18n(`${i18nPrefix}-qas-error-text-button`)}\n \n \n }\n />\n );\n }\n\n getQasInstructions() {\n return (\n
\n \n {\n this.onSwitchToManualAddress();\n this.props.setShowQas(false);\n }}\n >\n {i18n(`${i18nPrefix}-qas-enter-manually`)}\n \n
\n );\n }\n\n getManualAddressInstructions() {\n return this.props.qasAvailableFromVerification ? (\n
\n \n {\n this.onSwitchToAddressFinder();\n this.props.setShowQas(true);\n }}\n >\n {i18n(`${i18nPrefix}-manual-enter-automatically`)}\n \n
\n ) : null;\n }\n\n render() {\n const {\n country,\n fieldName,\n formName,\n label,\n className,\n showQas,\n enableQasAddressText,\n } = this.props;\n\n switch (showQas) {\n case true:\n return (\n
\n \n
\n );\n case false:\n return (\n
\n \n
\n );\n default:\n return null;\n }\n }\n}\n\nAddress.propTypes = {\n country: PropTypes.string.isRequired,\n fieldName: PropTypes.string.isRequired,\n formName: PropTypes.string.isRequired,\n className: PropTypes.string,\n label: PropTypes.string,\n showQas: PropTypes.bool,\n setShowQas: PropTypes.func.isRequired,\n checkQasCountryAvailabilityV2: PropTypes.func.isRequired,\n enableQasAddressText: PropTypes.bool,\n qasAvailableFromVerification: PropTypes.bool,\n};\n\nexport default Address;\n","import React, { Component } from 'react';\nimport PropTypes from 'constants/PropTypes';\nimport renderField from 'components/Form/renderField';\nimport OfxField from 'components/Form/OfxField';\nimport { required } from 'validation';\nimport QASInput from './QASInput';\n\nclass QAS extends Component {\n constructor(props) {\n super(props);\n\n this.component = renderField(\n {\n id: props.fieldName,\n className: 'form-control',\n type: QASInput,\n },\n props.label,\n );\n }\n\n render() {\n const {\n fieldName,\n country,\n customErrorMessage,\n customInstructions,\n clearOnUnmount,\n enableQasAddressText,\n qasAvailableFromVerification,\n } = this.props;\n\n return (\n \n );\n }\n}\n\nQAS.propTypes = {\n fieldName: PropTypes.string.isRequired,\n label: PropTypes.string,\n country: PropTypes.string.isRequired,\n customErrorMessage: PropTypes.element,\n customInstructions: PropTypes.element,\n clearOnUnmount: PropTypes.bool,\n enableQasAddressText: PropTypes.bool,\n qasAvailableFromVerification: PropTypes.bool,\n};\n\nQAS.defaultProps = {\n enableQasAddressText: false,\n};\n\nexport default QAS;\n","import { connect } from 'react-redux';\nimport { change, getFormInitialValues } from 'redux-form';\nimport PropTypes from 'constants/PropTypes';\nimport Component from './Component';\nimport { partition, actions } from './reducers';\n\nconst resetFields = (dispatch, formName, formSection, fields) =>\n fields.forEach((field) => {\n dispatch(change(formName, `${formSection}.${field.name}`, ''));\n });\n\nconst mapStateToProps = (state, ownProps) => {\n const formInitialValues = getFormInitialValues(ownProps.formName)(state);\n return {\n formInitialValues,\n addressFields: state[partition].get(ownProps.country),\n };\n};\n\nconst mapDispatchToProps = (dispatch, { formName, formSection }) => ({\n dispatch,\n onMount: (country) => dispatch(actions.fetchAddress(country)),\n onCountryChange: (newCountry, oldAddressFields) => {\n dispatch(actions.fetchAddress(newCountry));\n resetFields(dispatch, formName, formSection, oldAddressFields);\n },\n clear: (addressFields) => resetFields(dispatch, formName, formSection, addressFields),\n});\n\nconst Container = connect(mapStateToProps, mapDispatchToProps)(Component);\n\nContainer.propTypes = {\n formName: PropTypes.string.isRequired,\n formSection: PropTypes.string.isRequired,\n label: PropTypes.string,\n country: PropTypes.string.isRequired,\n clearOnUnmount: PropTypes.bool,\n instructions: PropTypes.element,\n};\n\nexport default Container;\n","import React, { Component } from 'react';\nimport { FormSection, change } from 'redux-form';\nimport PropTypes from 'constants/PropTypes';\nimport { FormLabel } from 'components';\nimport DynamicForm from 'components/Form/DynamicForm';\nimport dynamicFieldProps from 'components/Form/dynamicFieldProps';\n\nclass ManualAddress extends Component {\n componentDidMount() {\n const { country, onMount } = this.props;\n onMount(country);\n if (this.props.formInitialValues) {\n const formCountry =\n this.props.formInitialValues.country || this.props.formInitialValues.Country;\n if (this.props.formInitialValues && formCountry !== country) {\n this.props.dispatch(change(this.props.formName, this.props.formSection, {}));\n }\n }\n }\n\n componentWillReceiveProps(nextProps) {\n const { addressFields, country, onCountryChange } = this.props;\n\n if (country !== nextProps.country) {\n onCountryChange(nextProps.country, addressFields);\n }\n }\n\n componentWillUnmount() {\n const { clearOnUnmount, clear, addressFields } = this.props;\n\n if (clearOnUnmount) {\n clear(addressFields);\n }\n }\n\n filterAddressFields(addressFields, country) {\n return addressFields.map((field) => {\n if (field.props && field.props.id === 'StateProvince') {\n if (country === 'NZ') {\n return {\n ...field,\n label: '',\n props: {\n ...field.props,\n },\n visible: false,\n };\n }\n }\n return field;\n });\n }\n\n render() {\n const { formSection, label, addressFields, instructions, country } = this.props;\n const modifiedAddressFields = this.filterAddressFields(addressFields, country);\n\n return (\n
\n \n {label && (\n \n

{label}

\n
\n )}\n
\n \n
\n {instructions}\n
\n
\n );\n }\n}\n\nManualAddress.propTypes = {\n country: PropTypes.string.isRequired,\n addressFields: PropTypes.arrayOf(dynamicFieldProps),\n formSection: PropTypes.string.isRequired,\n label: PropTypes.string,\n clearOnUnmount: PropTypes.bool,\n onMount: PropTypes.func.isRequired,\n onCountryChange: PropTypes.func.isRequired,\n clear: PropTypes.func.isRequired,\n instructions: PropTypes.element,\n dispatch: PropTypes.func,\n formName: PropTypes.string,\n formInitialValues: PropTypes.shape({\n country: PropTypes.string,\n Country: PropTypes.string,\n }),\n};\n\nManualAddress.defaultProps = {\n addressFields: [],\n};\n\nexport default ManualAddress;\n","import React from 'react';\nimport PropTypes from 'constants/PropTypes';\nimport { Field } from 'redux-form';\nimport * as validations from 'validation';\nimport FormField from 'components/Form/FormField';\nimport Instructions from 'components/Form/Instructions';\nimport dynamicFieldProps from 'components/Form/dynamicFieldProps';\n\nexport const renderInstructions = (instructions) => {\n let { title, text } = instructions;\n\n // In case we pass the wrong mapping through. We can put a console.log in here.\n if (text && !title) {\n title = text;\n text = undefined;\n }\n return title && ;\n};\n\nconst validateField = ({ required, maxLength, minLength, regex, regexError }) => (value) =>\n validations.required(required)(value) ||\n validations.maxLength(maxLength)(value) ||\n validations.minLength(minLength)(value) ||\n validations.isMatch(regex, regexError)(value);\n\nconst RenderField = (field) => (\n \n);\n\nconst FieldComponent = ({ field, useFieldValidation }) => {\n const properties = {\n ...field.props,\n type: `dynamic-${field.props.type}`,\n };\n const validate = useFieldValidation ? validateField(field.props) : undefined;\n delete properties.regex;\n delete properties.regexError;\n return ;\n};\n\nFieldComponent.propTypes = {\n field: dynamicFieldProps.isRequired,\n useFieldValidation: PropTypes.bool,\n};\n\nconst RenderDynamicFields = ({ dynamicFields, useFieldValidation }) => {\n const fields = dynamicFields.map((field, index) => {\n const parentKey = index;\n if (field instanceof Array) {\n return (\n
\n {field.map((f) => (\n
\n {f.visible && (\n \n )}\n
\n ))}\n
\n );\n }\n return (\n field.visible && (\n \n )\n );\n });\n\n return
{fields}
;\n};\n\nconst DynamicForm = ({ fields, wrapperClass, useFieldValidation = false }) => {\n if (fields.length === 0) {\n return null;\n }\n\n const dynamicFields = RenderDynamicFields({ dynamicFields: fields, useFieldValidation });\n return wrapperClass ?
{dynamicFields}
: dynamicFields;\n};\n\nconst dynamicFieldsProps = PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.arrayOf(dynamicFieldProps), dynamicFieldProps]),\n);\n\nRenderDynamicFields.propTypes = {\n dynamicFields: dynamicFieldsProps,\n useFieldValidation: PropTypes.bool,\n};\n\nDynamicForm.propTypes = {\n fields: dynamicFieldsProps,\n wrapperClass: PropTypes.string,\n useFieldValidation: PropTypes.bool,\n};\n\nexport default DynamicForm;\n","const LOADING = 'Loading';\nconst COUNT = 'count';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const statePartitions = {\n LOADING,\n COUNT,\n};\n","import * as React from 'react';\n\ninterface IModalProps {\n title: JSX.Element | string;\n children: JSX.Element | JSX.Element[];\n footer?: JSX.Element;\n className?: string;\n onClose?: Function;\n}\n\ndeclare var document: any;\n\nconst backdrop = document.createElement('div');\nbackdrop.classList.add('modal-backdrop');\nbackdrop.classList.add('in');\n\nlet modalCount = 0;\n\nclass Modal extends React.Component {\n constructor(props: IModalProps) {\n super(props);\n\n this.onClose = this.onClose.bind(this);\n }\n\n componentDidMount() {\n modalCount += 1;\n document.body.classList.add('modal-open');\n document.body.appendChild(backdrop);\n }\n\n componentWillUnmount() {\n modalCount -= 1;\n if (modalCount === 0) {\n document.body.classList.remove('modal-open');\n document.body.removeChild(backdrop);\n }\n }\n\n onClose() {\n if (this.props.onClose) {\n this.props.onClose();\n }\n }\n\n render() {\n const { onClose } = this.props;\n const style = {\n display: 'block',\n };\n return (\n
\n
\n
\n
\n
{this.props.title}
\n {onClose &&
\n
{this.props.children}
\n {this.props.footer && (\n
{this.props.footer}
\n )}\n
\n
\n
\n );\n }\n}\n\nexport default Modal;\n","import React from 'react';\nimport PropTypes from 'constants/PropTypes';\n\nconst SingleButton = (props) => (\n \n {props.text}\n \n);\n\nSingleButton.propTypes = {\n onClick: PropTypes.func,\n text: PropTypes.string.isRequired,\n className: PropTypes.string,\n disabled: PropTypes.bool,\n};\n\nSingleButton.defaultProps = {\n className: 'btn btn-primary uia-primary-button',\n};\n\nexport default SingleButton;\n","import Component from './Component';\nimport { reducers } from './QASInput';\n\nexport default Component;\nexport { reducers };\n","import { connect } from 'react-redux';\nimport Component from './Component';\nimport { statePartitions } from './constants';\n\nexport const mapStateToProps = (state: any) => ({\n loading: state[statePartitions.LOADING].get(statePartitions.COUNT) > 0,\n});\n\nconst Container = connect(mapStateToProps)(Component);\n\nexport default Container;\n","import React from 'react';\nimport PropTypes from 'constants/PropTypes';\n\nconst Component = ({ loading }) => {\n if (!loading) {\n return null;\n }\n\n return (\n
\n
\n
\n );\n};\n\nComponent.displayName = 'GlobalSpinner';\nComponent.propTypes = {\n loading: PropTypes.bool,\n};\n\nexport default Component;\n","import { Map } from 'immutable';\nimport { statePartitions } from './constants';\n\nconst initialLoadingState = new Map({\n [statePartitions.COUNT]: 0,\n});\n\nexport const spinnerReducer = (state = initialLoadingState, action) => {\n if (action.type.endsWith('_PENDING')) {\n const currentCount = state.get(statePartitions.COUNT);\n return state.set(statePartitions.COUNT, currentCount + 1);\n }\n\n if (action.type.endsWith('_FULFILLED') || action.type.endsWith('_REJECTED')) {\n const currentCount = state.get(statePartitions.COUNT);\n return state.set(statePartitions.COUNT, currentCount - 1);\n }\n\n return state;\n};\n\nexport default {\n [statePartitions.LOADING]: spinnerReducer,\n};\n","import React from 'react';\nimport PropTypes from 'constants/PropTypes';\nimport Modal from './Modal';\n\nconst HtmlModal = (props) => {\n const { className, title, footer, content } = props;\n return (\n \n \n \n );\n};\n\nHtmlModal.propTypes = {\n className: PropTypes.string,\n title: PropTypes.node.isRequired,\n content: PropTypes.string.isRequired,\n footer: PropTypes.node.isRequired,\n};\n\nexport default HtmlModal;\n","import React from 'react';\nimport PropTypes from 'constants/PropTypes';\nimport SingleButton from './SingleButton';\n\nconst defaultSubmitButtonCss = 'btn btn-primary uia-primary-button';\nconst defaultCancelButtonCss = 'btn btn-secondary uia-secondary-button';\n\nconst SubmitAndCancelButton = ({ submit, cancel }) => {\n const btnCancelProps = cancel;\n btnCancelProps.className = cancel.className || defaultCancelButtonCss;\n\n return (\n
\n \n {submit.text}\n \n \n
\n );\n};\n\nSubmitAndCancelButton.propTypes = {\n submit: PropTypes.button.isRequired,\n cancel: PropTypes.button.isRequired,\n};\n\nexport default SubmitAndCancelButton;\n","import Modal from './Modal';\nimport HtmlModal from './HtmlModal';\nimport SingleButton from './Footers/SingleButton';\nimport SubmitAndCancelButton from './Footers/SubmitAndCancelButton';\n\nconst Footers = {\n SingleButton,\n SubmitAndCancelButton,\n};\n\nexport { Modal, HtmlModal, Footers };\n","import Container from './Container';\nimport reducers from './reducers';\n\nexport default Container;\nexport { reducers };\n","import Component from './Component';\n\nexport default Component;\n","import PropTypes from 'constants/PropTypes';\n\nconst dynamicFieldProps = PropTypes.shape({\n name: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n buttonText: PropTypes.string,\n handleCallBack: PropTypes.func,\n visible: PropTypes.bool,\n instructions: PropTypes.shape({\n text: PropTypes.string,\n title: PropTypes.string,\n }),\n width: PropTypes.number,\n props: PropTypes.shape({\n id: PropTypes.string.isRequired,\n required: PropTypes.bool,\n type: PropTypes.string,\n placeholder: PropTypes.string,\n name: PropTypes.string,\n maxLength: PropTypes.number,\n regex: PropTypes.string,\n regexError: PropTypes.string,\n }),\n});\n\nexport default dynamicFieldProps;\n","import { createAction, handleActions } from 'redux-actions';\nimport { Map } from 'immutable';\nimport { i18n } from 'libs/i18n';\nimport { RefDataApi } from 'libs/api';\n\nexport const actionTypes = {\n FETCH_ADDRESS_FIELDS: 'MANUAL_ADDRESS.FETCH_ADDRESS_FIELDS',\n};\n\nconst fetchAddress = createAction(\n actionTypes.FETCH_ADDRESS_FIELDS,\n RefDataApi.addressTemplate,\n (country) => country,\n);\n\nexport const dashesOnlyRegex = /^-*$/;\n\nconst mapFieldType = (addressField) => {\n if (addressField.ElementType === 'Select') {\n return 'select2';\n }\n return addressField.ElementType.toLowerCase();\n};\n\nconst getOptionValue = (addressField, option) => {\n if (addressField.Abbreviations && addressField.UseAbbreviations) {\n return (\n Object.keys(addressField.Abbreviations).find(\n (abbr) => addressField.Abbreviations[abbr] === option,\n ) || option\n );\n }\n\n return option;\n};\n\nconst mapFieldOptions = (addressField) => {\n if (addressField.ElementType !== 'Select') {\n return null;\n }\n\n return addressField.Options.map((option) => {\n const isDashesOnly = dashesOnlyRegex.exec(option) !== null;\n return isDashesOnly\n ? {\n text: i18n('manual-address-dropdown-item-all'),\n children: [],\n hidden: true,\n }\n : {\n text: option,\n value: getOptionValue(addressField, option),\n };\n });\n};\n\nconst getFormFieldProps = (addressField) => ({\n name: addressField.FieldName,\n label: addressField.DisplayLabel,\n visible: true,\n data: mapFieldOptions(addressField),\n props: {\n id: addressField.FieldName,\n required: addressField.Required,\n type: mapFieldType(addressField),\n placeholder: addressField.DisplayLabel,\n maxLength: addressField.MaxLength,\n regex: addressField.RegularExpression,\n },\n});\n\nexport const manualAddressReducer = handleActions(\n {\n [`${actionTypes.FETCH_ADDRESS_FIELDS}_FULFILLED`]: (state, { meta, payload }) =>\n state.set(\n meta,\n payload.AddressProperties.map((addressField) => getFormFieldProps(addressField)),\n ),\n },\n new Map(),\n);\n\nexport const partition = 'ManualAddress';\n\nexport const actions = {\n fetchAddress,\n};\n\nexport default {\n [partition]: manualAddressReducer,\n};\n","import { createAction, handleActions } from 'redux-actions';\nimport { Map } from 'immutable';\nimport { VerificationApi } from 'libs/api';\nimport { reducers as qasReducers } from './QAS';\nimport { reducers as manualAddressReducers } from './ManualAddress';\n\nconst PREFIX = 'ADDRESS';\n\nconst actionTypes = {\n SET_SHOW_QAS: `${PREFIX}.SET_SHOW_QAS`,\n COUNTRY_AVAILABILITY: `${PREFIX}.QAS_COUNTRY_AVAILABILITY`,\n};\n\nexport const partition = {\n root: 'Address',\n showQas: 'ShowQas',\n qasAvailable: 'QasAvailable',\n};\n\nconst setShowQas = createAction(actionTypes.SET_SHOW_QAS, (value) => value);\n\nconst checkCountryAvailabilityV2 = createAction(actionTypes.COUNTRY_AVAILABILITY, (country) =>\n VerificationApi.QAS.countryAvailabilityV2(country),\n);\n\nconst reducer = handleActions(\n {\n [actionTypes.SET_SHOW_QAS]: (state, action) => state.set(partition.showQas, action.payload),\n [`${actionTypes.COUNTRY_AVAILABILITY}_PENDING`]: (state) =>\n state.set(partition.qasAvailable, undefined),\n [`${actionTypes.COUNTRY_AVAILABILITY}_FULFILLED`]: (state, action) =>\n state.set(partition.qasAvailable, action.payload.Qas),\n [`${actionTypes.COUNTRY_AVAILABILITY}_REJECTED`]: (state) =>\n state.set(partition.qasAvailable, false),\n },\n new Map({\n [partition.showQas]: undefined,\n [partition.qasAvailable]: undefined,\n }),\n);\n\nexport const actions = {\n setShowQas,\n checkCountryAvailabilityV2,\n};\n\nexport default {\n [partition.root]: reducer,\n ...qasReducers,\n ...manualAddressReducers,\n};\n","export const COUNTRY_US = 'US';\nexport const COUNTRY_NZ = 'NZ';\nexport const COUNTRY_AU = 'AU';\nexport const COUNTRY_GB = 'GB';\nexport const COUNTRY_CA = 'CA';\nexport const COUNTRIES_WITH_STATES = [COUNTRY_US, COUNTRY_AU];\nexport const COUNTRIES_WITH_DIRECT_DEBIT = [COUNTRY_US, COUNTRY_CA];\nexport const COUNTRIES_WITH_DRIVER_LICENCE_CONSENT = [COUNTRY_AU, COUNTRY_NZ];\n"],"sourceRoot":""}