\r\n
}\r\n initialValue={address.fullAddress}\r\n onSelect={({ description, terms, place_id }) => applyAddress(description, terms, place_id)}\r\n renderInput={props => (\r\n
\r\n {\r\n props.onChange(ev);\r\n onInputValueChange(ev);\r\n }}\r\n />\r\n \r\n )}\r\n renderSuggestions={(active, suggestions, onSelectSuggestion) => (\r\n
\r\n {suggestions.map((suggestion, index) => (\r\n
onSelectSuggestion(suggestion, event)}\r\n key={`qs-suburb-${index}`}\r\n >\r\n {suggestion.description}\r\n
\r\n ))}\r\n
\r\n )}\r\n />\r\n {showAreasSupportedDisclaimer && (\r\n
{areasSupportedDisclaimer}
\r\n )}\r\n
\r\n \r\n
\r\n
\r\n
setUnitNumber(e.target.value === '' ? null : e.target.value)}\r\n validate={{\r\n maxLength: { value: 10 }\r\n }}\r\n />\r\n \r\n
\r\n
setStreetNumber(e.target.value === '' ? null : e.target.value)}\r\n validate={{\r\n maxLength: { value: 5 }\r\n }}\r\n />\r\n \r\n
\r\n
setStreetName(e.target.value)}\r\n />\r\n \r\n {large && (\r\n <>\r\n {streetTypeField}\r\n {showMinimalManualFields ? null : streetSuffixField}\r\n >\r\n )}\r\n
{\r\n const array = [];\r\n\r\n if (!streetNumber || streetNumber.trim() === '') array.push('Street number is required.');\r\n if (!streetName || streetName.trim() === '') array.push('Street name is required.');\r\n if (/^\\d/.test(streetName ? streetName.trim() : '')) array.push('Please enter a valid street name.');\r\n\r\n if (array.length > 0) {\r\n cb(`${array.join(' ')}`);\r\n } else {\r\n cb(true);\r\n }\r\n }\r\n }}\r\n />\r\n \r\n\r\n {!large && (\r\n
\r\n {streetTypeField}\r\n {showMinimalManualFields ? null : streetSuffixField}\r\n
\r\n )}\r\n\r\n {detailedAddressEntry ? (\r\n <>\r\n
\r\n
\r\n
setLotNumber(e.target.value)}\r\n />\r\n \r\n\r\n
\r\n
setFloor(e.target.value)}\r\n />\r\n \r\n\r\n
\r\n
setFloorType(e.target.value)}\r\n />\r\n \r\n\r\n {!showMinimalManualFields && (\r\n
\r\n
setHouseNumber(e.target.value)}\r\n />\r\n \r\n )}\r\n
\r\n
\r\n {!showMinimalManualFields && (\r\n <>\r\n
\r\n
setHouseNumberSuffix(e.target.value)}\r\n />\r\n \r\n\r\n
\r\n
setStreetNumberSuffix(e.target.value)}\r\n />\r\n \r\n >\r\n )}\r\n\r\n
\r\n
setUnitType(e.target.value)}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {!showMinimalManualFields && (\r\n
\r\n
setPropertyName(e.target.value)}\r\n />\r\n \r\n )}\r\n >\r\n ) : (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default AddressManual;\r\n","import React, { useState } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport QsCheckBox from './qsCheckBox';\r\nimport AddressAutoComplete from './addressAutoComplete';\r\nimport AddressManual from './addressManual';\r\nimport { orientationTypes } from '../../enums/scaleTypes';\r\n\r\nconst AddressControl = ({\r\n readOnly,\r\n onAddressSelected,\r\n manualAddressVisible,\r\n manualSuburbSelectorEnabled,\r\n autoPlaceholder,\r\n autoPropertyAddress,\r\n autoAddressRequired,\r\n labelText,\r\n showAreasSupportedDisclaimer,\r\n showMinimalManualFields,\r\n keySuffix,\r\n country,\r\n large\r\n}) => {\r\n const [manualAddress, setManualAddress] = useState(false);\r\n\r\n const { areasSupportedDisclaimer } = useSelector(state => state.content.general);\r\n\r\n const manualAddressClick = () => {\r\n setManualAddress(!manualAddress);\r\n\r\n // Clear out address on parent when moving from auto to manual address\r\n if (onAddressSelected) {\r\n onAddressSelected({});\r\n }\r\n };\r\n\r\n return (\r\n \r\n {(labelText || manualAddressVisible) && (\r\n
\r\n {labelText && (\r\n
\r\n )}\r\n\r\n {manualAddressVisible && !readOnly && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n )}\r\n\r\n {manualAddress ? (\r\n
\r\n ) : (\r\n
\r\n )}\r\n {showAreasSupportedDisclaimer &&
{areasSupportedDisclaimer}
}\r\n
\r\n );\r\n};\r\n\r\nexport default AddressControl;\r\n","import React, { useRef } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { AvForm } from 'availity-reactstrap-validation';\r\nimport { Button } from 'reactstrap';\r\n\r\nimport AddressControl from '../common/addressControl';\r\nimport { hasValidAddress } from '../../utilities/addressUtilities';\r\n\r\nconst AddressFullSelector = ({ selectedAddress, onAddressSelected, onNext }) => {\r\n const { country } = useSelector(state => state.config);\r\n\r\n const formRef = useRef(null);\r\n\r\n const handleSubmit = () => {\r\n if (formRef.current) {\r\n formRef.current.submit();\r\n }\r\n };\r\n\r\n const hasSelectedAddress = hasValidAddress(selectedAddress);\r\n\r\n return (\r\n