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EAAM7G,IAAI,CACxB,OAMR,MACE,WAACkO,EAAAA,CAAcA,CAAAA,CAACzE,sBAAoB,oBAAoBC,cAAY,4BAClE,UAAClH,MAAAA,CAAIqF,UAAU,8BAAsBxE,IACrC,WAACb,MAAAA,CAAIqF,UAAU,gBACb,UAACrF,MAAAA,CAAIqF,UAAU,yBAAiBqI,IAChC,UAAC1N,MAAAA,CAAIqF,UAAU,yBAAiBsI,OAElC,WAAC3N,MAAAA,CAAIqF,UAAU,gBACb,UAACrF,MAAAA,CAAIqF,UAAU,yBAAiBuI,IAChC,UAAC5N,MAAAA,CAAIqF,UAAU,+BAAuByI,IACtC,UAAC9N,MAAAA,CAAIqF,UAAU,+BAAuB4I,SAI9C,EAAE,kCCrOK,eAAK7L,CAAAA,sHAAAA,OAKX","sources":["webpack://_N_E/../../libs/mi-groups-components/src/hooks/useCustomerInfo.tsx","webpack://_N_E/../../libs/mi-groups-components/src/hooks/useLookupsByType.tsx","webpack://_N_E/../../libs/mi-groups-components/src/molecules/AddressInfo/AddressInfo.styles.tsx","webpack://_N_E/../../libs/mi-groups-components/src/molecules/AddressInfo/AddressInfo.tsx","webpack://_N_E/../../libs/mi-groups-components/src/molecules/Dropdown/Dropdown.styles.tsx","webpack://_N_E/../../libs/mi-groups-components/src/molecules/Dropdown/Dropdown.tsx","webpack://_N_E/../../libs/mi-groups-components/src/molecules/UserInfo/UserInfo.styles.tsx","webpack://_N_E/../../libs/mi-groups-components/src/molecules/UserInfo/UserInfo.tsx","webpack://_N_E/../../libs/mi-groups-graphql/src/models/rfp/getLookupsByType.types.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { useLazyQuery } from '@apollo/client';\nimport {\n  AddressType,\n  CustomerInfoResponse,\n  CustomerPaymentMethod,\n  getCustomerInfoQuery,\n} from '@marriott/mi-groups-graphql';\nimport { getSession } from '../utils';\nimport { useAuthStore, useLocaleStore } from '../store';\nimport { UserInfoFormData } from '../molecules/UserInfo/UserInfo.types';\nimport { AddressInfoFormData } from '../molecules/AddressInfo/AddressInfo.types';\n\nexport type CustomerSessionData = {\n  sessionData: {\n    cacheData: {\n      data: {\n        consumerID: string;\n        rewardsId?: string;\n      };\n    };\n  };\n};\n\nexport const useCustomerInfo = (includePaymentMethods = false) => {\n  const { locale } = useLocaleStore();\n  const { isAuthenticated } = useAuthStore();\n\n  const [customerInfo, setCustomerInfo] = useState<UserInfoFormData & AddressInfoFormData>();\n  const [customerPaymentMethods, setCustomerPaymentMethods] = useState<CustomerPaymentMethod[]>([]);\n\n  const [getCustomerInfo] = useLazyQuery<CustomerInfoResponse>(getCustomerInfoQuery);\n\n  const getCustomerSessionData = async () => {\n    try {\n      const { sessionData } = (await getSession()) as CustomerSessionData;\n      const { consumerID, rewardsId } = sessionData?.cacheData?.data || {};\n      return { customerId: consumerID, rewardId: rewardsId };\n    } catch (error) {\n      return { customerId: '', rewardId: '' };\n    }\n  };\n\n  const getCustomerDetails = () => {\n    getCustomerSessionData().then(({ customerId, rewardId }) => {\n      if (customerId) {\n        getCustomerInfo({\n          variables: {\n            customerId,\n            includePaymentMethods,\n          },\n          context: {\n            headers: {\n              'accept-language': locale,\n            },\n          },\n          fetchPolicy: 'no-cache',\n          onCompleted: ({ customer, customerPaymentMethods }) => {\n            const { profile, contactInformation } = customer;\n            const phone = contactInformation?.phones?.[0];\n            const address = contactInformation?.addresses?.[0]?.address;\n            setCustomerInfo({\n              userInfo: {\n                firstName: profile.name?.givenName,\n                lastName: profile.name?.surname,\n                email: contactInformation.emails?.[0]?.address,\n                callingCode: {\n                  label: phone?.country?.description || '',\n                  value: phone?.country?.description || '',\n                  code: phone?.country?.code || '',\n                  description: phone?.country?.description || '',\n                  shortDescription: phone?.country?.code || '',\n                },\n                phoneNumber: phone?.number || '',\n                rewardId: rewardId as string,\n              },\n              addressInfo: {\n                addressType: (contactInformation?.addresses?.[0]?.type as AddressType) || AddressType.BUSINESS,\n                companyName: address?.companyName || '',\n                addressLine1: address?.line1 || '',\n                addressLine2: address?.line2 || '',\n                country: {\n                  label: address?.country?.description || '',\n                  value: address?.country?.code || '',\n                  code: address?.country?.code || '',\n                  description: address?.country?.description || '',\n                },\n                city: address?.city || '',\n                state: address?.stateProvince || '',\n                zipcode: address?.postalCode || '',\n              },\n            });\n            customerPaymentMethods && setCustomerPaymentMethods(customerPaymentMethods);\n          },\n        });\n      }\n    });\n  };\n\n  useEffect(() => {\n    isAuthenticated && getCustomerDetails();\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [isAuthenticated]);\n\n  return {\n    customerInfo,\n    customerPaymentMethods,\n  };\n};\n","import { LookupType, getLookupsByTypeQuery } from '@marriott/mi-groups-graphql';\nimport { useQuery } from '@apollo/client';\nimport { useLocaleStore } from '../store';\n\nexport const useLookupsByType = (type: LookupType) => {\n  const { locale } = useLocaleStore();\n\n  const { data, loading, error } = useQuery(getLookupsByTypeQuery, {\n    variables: { type },\n    context: {\n      headers: {\n        'accept-language': locale,\n      },\n    },\n    fetchPolicy: 'cache-first',\n  });\n\n  if (error) {\n    console.error('Error: ', error);\n  }\n\n  return {\n    lookups: data?.lookupsByType?.lookups,\n    loading,\n    error,\n  };\n};\n","import styled from 'styled-components';\n\nexport const StyledAddressInfo = styled.div`\n  .radio-controls-list {\n    label {\n      width: fit-content;\n    }\n  }\n`;\n","import { FC, useEffect, useState } from 'react';\nimport { Controller } from 'react-hook-form';\nimport { Lookup, LookupType, AddressType } from '@marriott/mi-groups-graphql';\nimport { RadiobuttonControlsList, baseVariables } from '@marriott/mi-ui-library';\nimport {\n  ADDRESS_REGEX,\n  USA,\n  CANADA,\n  LETTERS_REGEX,\n  CITY_REGEX,\n  GENERAL_ZIP_CODE_REGEX,\n  USA_ZIP_CODE_REGEX,\n  CANADA_ZIP_CODE_REGEX,\n} from '../../constants';\nimport { useLookupsByType, useMediaQuery } from '../../hooks';\nimport { useLocaleStore } from '../../store';\nimport { TextFormField } from '../TextFormField';\nimport { Dropdown } from '../Dropdown';\nimport { DropdownOption } from '../Dropdown/Dropdown.types';\nimport { AddressInfoProps } from './AddressInfo.types';\nimport { StyledAddressInfo } from './AddressInfo.styles';\n\nexport const AddressInfo: FC<AddressInfoProps> = props => {\n  const {\n    labels,\n    customerAddressType,\n    customerCountry,\n    customerState,\n    control,\n    setValue,\n    errors,\n    clearErrors,\n    onApiError,\n  } = props;\n  const {\n    title,\n    personalLabel,\n    businessLabel,\n    companyName,\n    addressLine1,\n    addressLine2,\n    country,\n    city,\n    state,\n    zipcode,\n  } = labels;\n\n  const isTabletAndAbove = useMediaQuery(baseVariables.mediaQuery.md);\n\n  const { locale } = useLocaleStore();\n\n  const [showCompanyName, setShowCompanyName] = useState<boolean>(true);\n  const [countryOptions, setCountryOptions] = useState<DropdownOption<Lookup>[]>([]);\n  const [selectedCountry, setSelectedCountry] = useState(USA);\n  const [stateOptions, setStateOptions] = useState<DropdownOption<Lookup>[]>([]);\n  const [selectedState, setSelectedState] = useState(state.defaultValue);\n\n  const {\n    lookups: countries,\n    loading: countriesLoading,\n    error: countriesError,\n  } = useLookupsByType(LookupType.COUNTRIES);\n  const { lookups: states, loading: statesLoading, error: statesError } = useLookupsByType(LookupType.STATES);\n\n  const sortOptions = (lookups: Lookup[]) => {\n    return [...lookups]\n      .sort((a, b) => a.description.localeCompare(b.description))\n      .map(lookup => ({\n        ...lookup,\n        label: lookup.description,\n        value: lookup.code,\n      }));\n  };\n\n  useEffect(() => {\n    customerAddressType && handleAddressTypeChange(customerAddressType as AddressType);\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [customerAddressType]);\n\n  useEffect(() => {\n    if (countries) {\n      const options = sortOptions(countries);\n      setCountryOptions(options);\n    }\n  }, [countries]);\n\n  useEffect(() => {\n    if (customerCountry) {\n      setSelectedCountry(customerCountry);\n    } else {\n      const countryCode = locale?.split('-')[1];\n      const defaultCountry = countries?.find((country: Lookup) => country.code === countryCode)?.code;\n      defaultCountry && setSelectedCountry(defaultCountry);\n    }\n  }, [customerCountry, locale, countries]);\n\n  useEffect(() => {\n    if (states) {\n      const options = sortOptions(states);\n      setStateOptions(options);\n    }\n  }, [states]);\n\n  useEffect(() => {\n    if (customerCountry === USA && customerState && stateOptions.length) {\n      const state = stateOptions.find(option => option.code === customerState);\n      if (state) {\n        setValue('addressInfo.state', JSON.stringify(state));\n        setSelectedState(state?.code as string);\n      }\n    } else {\n      setValue('addressInfo.state', customerState);\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [customerState, customerCountry, stateOptions]);\n\n  useEffect(() => {\n    if (onApiError && (countriesError || statesError)) {\n      onApiError();\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [countriesError, statesError]);\n\n  const handleAddressTypeChange = (selectedAddressType: AddressType) => {\n    setValue('addressInfo.addressType', selectedAddressType);\n    if (selectedAddressType === AddressType.BUSINESS) {\n      setShowCompanyName(true);\n    } else {\n      setShowCompanyName(false);\n      setValue('addressInfo.companyName', '');\n      clearErrors('addressInfo.companyName');\n    }\n  };\n\n  const addressOptions = [\n    { code: AddressType.BUSINESS, label: businessLabel },\n    { code: AddressType.PERSONAL, label: personalLabel },\n  ];\n\n  const isCountryUsa = selectedCountry === USA;\n  const isCountryCanada = selectedCountry === CANADA;\n  const isCountryUsaOrCanada = isCountryUsa || isCountryCanada;\n\n  const addressTypeOptions = (\n    <Controller\n      name={'addressInfo.addressType'}\n      control={control}\n      render={({ field }) => (\n        <RadiobuttonControlsList\n          key=\"addressType\"\n          name=\"addressType\"\n          controls={addressOptions}\n          defaultSelected={addressOptions.filter(item => item.code === field.value)}\n          colLength={isTabletAndAbove ? 4 : 6}\n          tabIndexForInput={-1}\n          onChange={selectedValue => handleAddressTypeChange(selectedValue[0].code as AddressType)}\n        />\n      )}\n    />\n  );\n\n  const companyNameField = (\n    <Controller\n      name=\"addressInfo.companyName\"\n      control={control}\n      rules={{\n        required: showCompanyName && companyName.requiredError,\n      }}\n      render={({ field }) => (\n        <TextFormField\n          {...field}\n          type=\"text\"\n          label={companyName.label}\n          ariaLabel={companyName.ariaLabel}\n          className=\"m-input-field\"\n          maxLength={companyName.maxLength}\n          showErrorMessage={!!errors?.addressInfo?.companyName?.message}\n          errorMessage={errors?.addressInfo?.companyName?.message}\n          disabled={!showCompanyName}\n          testId=\"company-name\"\n          onChange={event => {\n            field.onChange(event);\n            clearErrors(field.name);\n          }}\n        />\n      )}\n    />\n  );\n\n  const addressLine1Field = (\n    <Controller\n      name=\"addressInfo.addressLine1\"\n      control={control}\n      rules={{\n        required: addressLine1.requiredError,\n      }}\n      render={({ field }) => (\n        <TextFormField\n          {...field}\n          type=\"text\"\n          label={addressLine1.label}\n          ariaLabel={addressLine1.ariaLabel}\n          className=\"m-input-field\"\n          maxLength={addressLine1.maxLength}\n          showErrorMessage={!!errors?.addressInfo?.addressLine1?.message}\n          errorMessage={errors?.addressInfo?.addressLine1?.message}\n          testId=\"address-line1\"\n          onChange={event => {\n            field.onChange(event);\n            clearErrors(field.name);\n          }}\n        />\n      )}\n    />\n  );\n\n  const addressLine2Field = (\n    <Controller\n      name=\"addressInfo.addressLine2\"\n      control={control}\n      render={({ field }) => (\n        <TextFormField\n          {...field}\n          type=\"text\"\n          label={addressLine2.label}\n          ariaLabel={addressLine2.ariaLabel}\n          className=\"m-input-field\"\n          maxLength={addressLine2.maxLength}\n          showErrorMessage={!!errors?.addressInfo?.addressLine2?.message}\n          errorMessage={errors?.addressInfo?.addressLine2?.message}\n          testId=\"address-line2\"\n          onChange={event => {\n            field.onChange(event);\n            clearErrors(field.name);\n          }}\n        />\n      )}\n    />\n  );\n\n  const countryField = (\n    <Controller\n      name=\"addressInfo.country\"\n      control={control}\n      render={({ field }) => {\n        return (\n          <Dropdown\n            name=\"country\"\n            label={country.label}\n            ariaLabel={country.ariaLabel}\n            expandIconAriaLabel={labels.expandIconAriaLabel}\n            collapseIconAriaLabel={labels.collapseIconAriaLabel}\n            options={countryOptions}\n            selectedValue={selectedCountry}\n            disabled={countriesLoading || !!countriesError}\n            onChange={event => {\n              field.onChange(event);\n              if (event.value !== selectedCountry) {\n                setSelectedCountry(event.value);\n                setValue('addressInfo.state', '');\n              }\n            }}\n          />\n        );\n      }}\n    />\n  );\n\n  const cityField = (\n    <Controller\n      name=\"addressInfo.city\"\n      control={control}\n      rules={{\n        required: city.requiredError,\n        pattern: city.formatError\n          ? {\n              value: CITY_REGEX,\n              message: `${city.formatError}`,\n            }\n          : undefined,\n      }}\n      render={({ field }) => (\n        <TextFormField\n          {...field}\n          type=\"text\"\n          label={city.label}\n          ariaLabel={city.ariaLabel}\n          className=\"m-input-field\"\n          maxLength={city.maxLength}\n          showErrorMessage={!!errors?.addressInfo?.city?.message}\n          errorMessage={errors?.addressInfo?.city?.message}\n          testId=\"city\"\n          onChange={event => {\n            field.onChange(event);\n            clearErrors(field.name);\n          }}\n        />\n      )}\n    />\n  );\n\n  const stateField = (\n    <Controller\n      name=\"addressInfo.state\"\n      control={control}\n      rules={{\n        required: isCountryUsaOrCanada && state.requiredError,\n        pattern:\n          !isCountryUsaOrCanada && state.formatError\n            ? {\n                value: LETTERS_REGEX,\n                message: `${state.formatError}`,\n              }\n            : undefined,\n      }}\n      render={({ field }) =>\n        isCountryUsa ? (\n          <Dropdown\n            name=\"state\"\n            label={state.label}\n            ariaLabel={state.ariaLabel}\n            expandIconAriaLabel={labels.expandIconAriaLabel}\n            collapseIconAriaLabel={labels.collapseIconAriaLabel}\n            placeholder={state.defaultValue}\n            options={stateOptions}\n            selectedValue={selectedState}\n            disabled={statesLoading || !!statesError}\n            isError={!!errors?.addressInfo?.state?.message}\n            errorMessage={errors?.addressInfo?.state?.message}\n            onChange={event => {\n              field.onChange(JSON.stringify(event));\n              clearErrors(field.name);\n            }}\n          />\n        ) : (\n          <TextFormField\n            {...field}\n            type=\"text\"\n            label={state.label}\n            ariaLabel={state.ariaLabel}\n            className=\"m-input-field\"\n            maxLength={state.maxLength}\n            showHelperText={!!field.value}\n            helperText={state.helperText}\n            showErrorMessage={!!errors?.addressInfo?.state?.message}\n            errorMessage={errors?.addressInfo?.state?.message}\n            testId=\"state\"\n            onChange={event => {\n              field.onChange(event);\n              clearErrors(field.name);\n            }}\n          />\n        )\n      }\n    />\n  );\n\n  let zipCodeRegex;\n\n  if (isCountryUsa) {\n    zipCodeRegex = USA_ZIP_CODE_REGEX;\n  } else if (isCountryCanada) {\n    zipCodeRegex = CANADA_ZIP_CODE_REGEX;\n  } else {\n    zipCodeRegex = GENERAL_ZIP_CODE_REGEX;\n  }\n\n  const zipcodeField = (\n    <Controller\n      name=\"addressInfo.zipcode\"\n      control={control}\n      rules={{\n        required: isCountryUsaOrCanada && zipcode.requiredError,\n        pattern: zipcode.formatError\n          ? {\n              value: zipCodeRegex,\n              message: `${zipcode.formatError}`,\n            }\n          : undefined,\n      }}\n      render={({ field }) => (\n        <TextFormField\n          {...field}\n          type=\"text\"\n          label={zipcode.label}\n          ariaLabel={zipcode.ariaLabel}\n          className=\"m-input-field\"\n          maxLength={zipcode.maxLength}\n          showErrorMessage={!!errors?.addressInfo?.zipcode?.message}\n          errorMessage={errors?.addressInfo?.zipcode?.message}\n          testId=\"zipcode\"\n          onChange={event => {\n            field.onChange(event);\n            clearErrors(field.name);\n          }}\n        />\n      )}\n    />\n  );\n\n  return (\n    <StyledAddressInfo data-component-name=\"m-groups-AddressInfo\" data-testid=\"groups-AddressInfo\">\n      <div className=\"t-subtitle-l pb-5\">{title}</div>\n      <div className=\"row\">\n        <div className=\"col-md-6 pb-4 px-0\">{addressTypeOptions}</div>\n      </div>\n      <div className=\"row\">\n        <div className=\"col-12 pb-5\">{companyNameField}</div>\n      </div>\n      <div className=\"row\">\n        <div className=\"col-md-6 pb-5\">{addressLine1Field}</div>\n        <div className=\"col-md-6 pb-5\">{addressLine2Field}</div>\n      </div>\n      <div className=\"row\">\n        <div className=\"col-md-6 pb-5\">{countryField}</div>\n        <div className=\"col-md-6 pb-5\">{cityField}</div>\n      </div>\n      <div className=\"row\">\n        <div className=\"col-md-6 pb-5 pb-md-0\">{stateField}</div>\n        <div className=\"col-md-6\">{zipcodeField}</div>\n      </div>\n    </StyledAddressInfo>\n  );\n};\n","import styled from 'styled-components';\nimport { baseVariables, toRem } from '@marriott/mi-ui-library';\n\nconst { color, mediaQuery } = baseVariables;\n\nexport const StyledDropdownContainer = styled.div`\n  &.m-input-field {\n    input {\n      overflow: hidden;\n      text-overflow: ellipsis;\n      white-space: nowrap;\n      padding-right: ${toRem(30)} !important;\n      :dir(rtl) {\n        padding-top: ${toRem(14)};\n        padding-bottom: ${toRem(14)};\n        line-height: inherit !important;\n      }\n    }\n    position: relative;\n  }\n  .icon-arrow-up,\n  .icon-arrow-down {\n    pointer-events: none;\n    font-size: ${toRem(12)};\n    :dir(rtl) {\n      top: ${toRem(14)};\n    }\n  }\n  @media ${mediaQuery.lg} {\n    .icon-arrow-up,\n    .icon-arrow-down {\n      cursor: pointer;\n      pointer-events: unset;\n    }\n  }\n`;\n\nexport const StyledOptionList = styled.ul`\n  list-style: none;\n  padding: 0;\n  margin: 0;\n  position: absolute;\n  top: ${toRem(45)};\n  left: 0;\n  width: 100%;\n  max-height: ${toRem(200)};\n  overflow-y: auto;\n  box-shadow: 0 ${toRem(2)} ${toRem(4)} rgba(0, 0, 0, 0.24);\n  z-index: 2;\n  box-sizing: border-box;\n  border-radius: 0 0 ${toRem(10)} ${toRem(10)};\n  background-color: ${color.alert10};\n`;\n\nexport const StyledOptionItem = styled.li`\n  padding: ${toRem(8)} ${toRem(8)} ${toRem(8)} ${toRem(15)};\n  cursor: pointer;\n  width: 100%;\n  box-sizing: border-box;\n  &.active {\n    font-weight: bold;\n  }\n  &.highlighted {\n    background-color: ${color.neutral20};\n  }\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n`;\n","import React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\nimport DOMPurify from 'isomorphic-dompurify';\nimport { UseSelectStateChange, useSelect } from 'downshift';\nimport { TextFormField } from '../index';\nimport { DropdownOption, DropdownProps } from './Dropdown.types';\nimport { StyledDropdownContainer, StyledOptionList, StyledOptionItem } from './Dropdown.styles';\n\nexport const Dropdown = <T,>(\n  {\n    label,\n    ariaLabel,\n    className,\n    placeholder,\n    isError,\n    errorMessage,\n    disabled = false,\n    options,\n    helperText = '',\n    selectedValue,\n    selectedIndex,\n    useValueAsLabel = false,\n    renderLabelAsHtml = false,\n    expandIconAriaLabel = 'expand icon',\n    collapseIconAriaLabel = 'collapse icon',\n    onClick,\n    onChange,\n  }: DropdownProps<T>,\n  ref: React.Ref<HTMLInputElement>\n) => {\n  const inputId = React.useId();\n  const dropdownRef = useRef<HTMLInputElement>(null);\n  const inputFieldRef = useRef<HTMLInputElement>(null);\n  const selectedOptionRef = useRef<HTMLInputElement>(null);\n\n  const itemToString = (item: DropdownOption<T> | null) => (item ? item.label : '');\n\n  const onSelectedOptionChange = ({ selectedItem }: UseSelectStateChange<DropdownOption<T>>) => {\n    if (\n      selectedItem &&\n      (selectedItem.value !== selectedOption?.value || selectedItem?.label !== selectedOption?.label)\n    ) {\n      onChange(selectedItem);\n    }\n  };\n\n  const onIsOpenChange = ({ isOpen }: UseSelectStateChange<DropdownOption<T>>) =>\n    isOpen && selectedOptionRef?.current?.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n\n  const {\n    isOpen,\n    toggleMenu,\n    highlightedIndex,\n    setHighlightedIndex,\n    selectedItem: selectedOption,\n    selectItem: selectOption,\n    getToggleButtonProps,\n    getMenuProps,\n    getItemProps,\n  } = useSelect({\n    id: inputId,\n    items: options,\n    itemToString,\n    onIsOpenChange: onIsOpenChange,\n    onSelectedItemChange: onSelectedOptionChange,\n  });\n\n  useEffect(() => {\n    if (selectedValue || selectedIndex) {\n      const selectedOptionIndex = selectedIndex || options.findIndex(option => option.value === selectedValue);\n      if (selectedOptionIndex !== -1) {\n        selectOption(options[selectedOptionIndex]);\n        setHighlightedIndex(selectedOptionIndex);\n      }\n    } else {\n      selectOption(null);\n      setHighlightedIndex(-1);\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [options, selectedValue, selectedIndex]);\n\n  return (\n    <StyledDropdownContainer\n      data-component-name=\"m-groups-Dropdown\"\n      data-testid=\"groups-Dropdown\"\n      ref={dropdownRef}\n      className={clsx('m-input-field', className, isError ? 'is-error' : '')}\n    >\n      <TextFormField\n        type=\"text\"\n        label={label}\n        ariaLabel={ariaLabel}\n        placeholder={placeholder}\n        value={useValueAsLabel ? selectedOption?.value : selectedOption?.label || ''}\n        disabled={disabled}\n        readOnly={true}\n        className={clsx('t-font-s', disabled ? 'is-disabled' : '')}\n        showIcon={!disabled}\n        iconClass={!isOpen ? 'icon icon-arrow-down' : 'icon icon-arrow-up'}\n        isIconClickable={true}\n        iconClickHandler={() => {\n          document?.getElementById(inputId)?.focus();\n          toggleMenu();\n        }}\n        iconAriaLabel={!isOpen ? expandIconAriaLabel : collapseIconAriaLabel}\n        showHelperText={!!helperText && !isError}\n        helperText={helperText}\n        ref={inputFieldRef || ref}\n        testId={inputId}\n        getLabelProps={() => ({ htmlFor: inputId })}\n        onFocus={onClick}\n        {...getToggleButtonProps({ id: inputId, role: 'combobox', 'aria-label': ariaLabel })}\n      />\n      <StyledOptionList\n        className={clsx('custom-scrollbar', isOpen === true ? 'd-block' : 'd-none')}\n        tabIndex={-1}\n        {...getMenuProps({ 'aria-labelledby': inputId })}\n      >\n        {options.map((option, index) => {\n          let fragmentString = '';\n\n          if (renderLabelAsHtml) {\n            const sanitizedNode = DOMPurify.sanitize(option.label, { RETURN_DOM: true });\n            fragmentString = sanitizedNode.innerHTML;\n          }\n\n          return (\n            <StyledOptionItem\n              key={index}\n              className={clsx({ active: selectedOption === option, highlighted: highlightedIndex === index })}\n              {...getItemProps({ item: option, index, ref: index === highlightedIndex ? selectedOptionRef : null })}\n            >\n              {renderLabelAsHtml ? (\n                <div className=\"dropdown-option\" dangerouslySetInnerHTML={{ __html: fragmentString }}></div>\n              ) : (\n                option.label\n              )}\n            </StyledOptionItem>\n          );\n        })}\n      </StyledOptionList>\n      {isError && <span className={'error-text t-font-xs'}>{errorMessage}</span>}\n    </StyledDropdownContainer>\n  );\n};\n","import styled from 'styled-components';\nimport { toRem } from '@marriott/mi-ui-library';\n\nexport const StyledUserInfo = styled.div`\n  .title {\n    padding-bottom: ${toRem(40)};\n  }\n\n  .calling-code {\n    ul {\n      width: ${toRem(300)};\n      li {\n        white-space: break-spaces;\n        .dropdown-option {\n          display: flex;\n          justify-content: space-between;\n        }\n      }\n    }\n  }\n`;\n","import { FC, useEffect, useState } from 'react';\nimport { Controller } from 'react-hook-form';\nimport { baseVariables } from '@marriott/mi-ui-library';\nimport { Lookup, LookupType } from '@marriott/mi-groups-graphql';\nimport { TextFormField } from '../TextFormField';\nimport { Dropdown } from '../Dropdown';\nimport { DEFAULT_CALLING_CODE, EMAIL_REGEX, USER_NAME_REGEX, NUM_REGEX, USA } from '../../constants';\nimport { useLookupsByType, useMediaQuery } from '../../hooks';\nimport { useLocaleStore } from '../../store';\nimport { DropdownOption } from '../Dropdown/Dropdown.types';\nimport { UserInfoProps } from './UserInfo.types';\nimport { StyledUserInfo } from './UserInfo.styles';\n\nexport const UserInfo: FC<UserInfoProps> = props => {\n  const { labels, customerCallingCountry, isEmailDisabled, control, errors, setValue, clearErrors, onApiError } = props;\n  const { title, firstName, lastName, email, callingCode, phoneNumber } = labels;\n\n  const isDesktop = useMediaQuery(baseVariables.mediaQuery.lg);\n\n  const { locale } = useLocaleStore();\n\n  const [callingCodeOptions, setCallingCodeOptions] = useState<DropdownOption<Lookup>[]>([]);\n  const [selectedCallingCode, setSelectedCallingCode] = useState(DEFAULT_CALLING_CODE);\n  const [selectedCallingCodeIndex, setSelectedCallingCodeIndex] = useState<number>();\n\n  // to validate phone number based on selected calling code\n  const isUsCallingCode = callingCodeOptions[selectedCallingCodeIndex as number]?.shortDescription === USA;\n  const phoneNumberMinLength = isUsCallingCode ? phoneNumber.usMinLength : phoneNumber.nonUsMinLength;\n  const phoneNumberMaxLength = isUsCallingCode ? phoneNumber.usMaxLength : phoneNumber.nonUsMaxLength;\n  const phoneNumberFormatError = isUsCallingCode ? phoneNumber.usFormatError : phoneNumber.nonUsFormatError;\n\n  const { lookups: countries } = useLookupsByType(LookupType.COUNTRIES);\n  const {\n    lookups: callingCodes,\n    loading: callingCodesLoading,\n    error: callingCodesError,\n  } = useLookupsByType(LookupType.CALLING_CODES);\n\n  const sortOptions = (lookups: Lookup[]) => {\n    return [...lookups]\n      .sort((a, b) => a.description.localeCompare(b.description))\n      .map(lookup => ({\n        ...lookup,\n        shortDescription: lookup.label,\n        label: `${lookup.description} <span>+${lookup.code}</span>`,\n        value: `+${lookup.code}`,\n      }));\n  };\n\n  useEffect(() => {\n    if (callingCodes) {\n      const options = sortOptions(callingCodes);\n      setCallingCodeOptions(options);\n    }\n  }, [callingCodes]);\n\n  useEffect(() => {\n    const localeCountryCode = locale?.split('-')[1];\n    const matchingCountry = countries?.find((country: Lookup) => country.code === localeCountryCode);\n    const defaultCountry = customerCallingCountry || matchingCountry?.code || '';\n    const matchingCallingCodeIndex = callingCodeOptions.findIndex(\n      callingCodeOption => callingCodeOption.shortDescription?.toLowerCase() === defaultCountry.toLowerCase()\n    );\n    const matchingCallingCodeOption = callingCodeOptions[matchingCallingCodeIndex];\n    matchingCallingCodeOption && setValue('userInfo.callingCode', matchingCallingCodeOption);\n    setSelectedCallingCodeIndex(matchingCallingCodeIndex);\n    matchingCallingCodeOption && setSelectedCallingCode(`+${matchingCallingCodeOption?.code}`);\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [customerCallingCountry, locale, countries, callingCodeOptions]);\n\n  useEffect(() => {\n    if (onApiError && callingCodesError) {\n      onApiError();\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [callingCodesError]);\n\n  const firstNameField = (\n    <Controller\n      name=\"userInfo.firstName\"\n      control={control}\n      rules={{\n        required: firstName.requiredError,\n      }}\n      render={({ field }) => (\n        <TextFormField\n          {...field}\n          type=\"text\"\n          label={firstName.label}\n          ariaLabel={firstName.ariaLabel}\n          className=\"m-input-field\"\n          maxLength={firstName.maxLength}\n          showErrorMessage={!!errors?.userInfo?.firstName?.message}\n          errorMessage={errors?.userInfo?.firstName?.message}\n          testId=\"first-name\"\n          onChange={event => {\n            field.onChange(event);\n            clearErrors(field.name);\n          }}\n        />\n      )}\n    />\n  );\n\n  const lastNameField = (\n    <Controller\n      name=\"userInfo.lastName\"\n      control={control}\n      rules={{\n        required: lastName.requiredError,\n      }}\n      render={({ field }) => (\n        <TextFormField\n          {...field}\n          type=\"text\"\n          label={lastName.label}\n          ariaLabel={lastName.ariaLabel}\n          className=\"m-input-field\"\n          maxLength={lastName.maxLength}\n          showErrorMessage={!!errors?.userInfo?.lastName?.message}\n          errorMessage={errors?.userInfo?.lastName?.message}\n          testId=\"last-name\"\n          onChange={event => {\n            field.onChange(event);\n            clearErrors(field.name);\n          }}\n        />\n      )}\n    />\n  );\n\n  const emailField = (\n    <Controller\n      name=\"userInfo.email\"\n      control={control}\n      rules={{\n        required: email.requiredError,\n        pattern: {\n          value: EMAIL_REGEX,\n          message: `${email.formatError}`,\n        },\n      }}\n      render={({ field }) => (\n        <TextFormField\n          {...field}\n          type=\"text\"\n          label={email.label}\n          ariaLabel={email.ariaLabel}\n          className=\"m-input-field\"\n          maxLength={email.maxLength}\n          disabled={isEmailDisabled}\n          showErrorMessage={!!errors?.userInfo?.email?.message}\n          errorMessage={errors?.userInfo?.email?.message}\n          testId=\"email\"\n          onChange={event => {\n            field.onChange(event);\n            clearErrors(field.name);\n          }}\n        />\n      )}\n    />\n  );\n\n  const callingCodeField = (\n    <Controller\n      name=\"userInfo.callingCode\"\n      control={control}\n      render={({ field }) => {\n        return (\n          <Dropdown\n            name=\"callingCode\"\n            label={isDesktop ? callingCode.label : callingCode.mobileLabel}\n            ariaLabel={callingCode.ariaLabel}\n            expandIconAriaLabel={callingCode.expandIconAriaLabel}\n            collapseIconAriaLabel={callingCode.collapseIconAriaLabel}\n            className=\"calling-code\"\n            options={callingCodeOptions}\n            selectedValue={selectedCallingCode}\n            selectedIndex={selectedCallingCodeIndex}\n            disabled={callingCodesLoading || !!callingCodesError}\n            useValueAsLabel={true}\n            renderLabelAsHtml={true}\n            onChange={event => {\n              field.onChange(event);\n              setSelectedCallingCode(event.value);\n              const callingCodeIndex = callingCodeOptions.findIndex(\n                callingCodeOption => callingCodeOption.description?.toLowerCase() === event.description.toLowerCase()\n              );\n              setSelectedCallingCodeIndex(callingCodeIndex);\n            }}\n          />\n        );\n      }}\n    />\n  );\n\n  const phoneNumberField = (\n    <Controller\n      name=\"userInfo.phoneNumber\"\n      control={control}\n      rules={{\n        required: phoneNumber.requiredError,\n        pattern: {\n          value: NUM_REGEX,\n          message: phoneNumberFormatError,\n        },\n        validate: value => (value.length < phoneNumberMinLength ? phoneNumberFormatError : true),\n      }}\n      render={({ field }) => (\n        <TextFormField\n          {...field}\n          type=\"text\"\n          label={phoneNumber.label}\n          ariaLabel={phoneNumber.ariaLabel}\n          className=\"m-input-field\"\n          maxLength={phoneNumberMaxLength}\n          showErrorMessage={!!errors?.userInfo?.phoneNumber?.message}\n          errorMessage={errors?.userInfo?.phoneNumber?.message}\n          testId=\"phone-number\"\n          onChange={event => {\n            field.onChange(event);\n            clearErrors(field.name);\n          }}\n        />\n      )}\n    />\n  );\n\n  return (\n    <StyledUserInfo data-component-name=\"m-groups-UserInfo\" data-testid=\"groups-UserInfo\">\n      <div className=\"t-subtitle-l title\">{title}</div>\n      <div className=\"row\">\n        <div className=\"col-md-6 pb-5\">{firstNameField}</div>\n        <div className=\"col-md-6 pb-5\">{lastNameField}</div>\n      </div>\n      <div className=\"row\">\n        <div className=\"col-md-6 pb-5\">{emailField}</div>\n        <div className=\"col-4 col-md-2 pb-5\">{callingCodeField}</div>\n        <div className=\"col-8 col-md-4 pb-5\">{phoneNumberField}</div>\n      </div>\n    </StyledUserInfo>\n  );\n};\n","export type LookupsByTypeResponse = {\n  lookupsByType: {\n    lookups: Lookup[];\n  };\n};\n\nexport type Lookup = {\n  code: string;\n  description: string;\n  label: string;\n  shortDescription?: string;\n};\n\nexport enum LookupType {\n  CALLING_CODES = 'COUNTRY_DIALING_CODES',\n  COUNTRIES = 'COUNTRIES',\n  STATES = 'STATE_OPTIONS',\n  COST = 'COST_TYPES',\n}\n"],"names":["useCustomerInfo","includePaymentMethods","locale","useLocaleStore","isAuthenticated","useAuthStore","customerInfo","setCustomerInfo","useState","customerPaymentMethods","setCustomerPaymentMethods","getCustomerInfo","useLazyQuery","getCustomerInfoQuery","getCustomerSessionData","sessionData","getSession","consumerID","rewardsId","cacheData","data","customerId","rewardId","error","getCustomerDetails","then","variables","context","headers","fetchPolicy","onCompleted","contactInformation","profile","phone","address","customer","phones","addresses","userInfo","firstName","name","givenName","lastName","surname","email","emails","callingCode","label","country","description","value","code","shortDescription","phoneNumber","number","addressInfo","addressType","type","AddressType","BUSINESS","companyName","addressLine1","line1","addressLine2","line2","city","state","stateProvince","zipcode","postalCode","useEffect","useLookupsByType","loading","useQuery","getLookupsByTypeQuery","console","lookups","lookupsByType","StyledAddressInfo","styled","div","AddressInfo","props","zipCodeRegex","labels","customerAddressType","customerCountry","customerState","control","setValue","errors","clearErrors","onApiError","title","personalLabel","businessLabel","isTabletAndAbove","useMediaQuery","baseVariables","mediaQuery","md","showCompanyName","setShowCompanyName","countryOptions","setCountryOptions","selectedCountry","setSelectedCountry","USA","stateOptions","setStateOptions","selectedState","setSelectedState","defaultValue","countries","countriesLoading","countriesError","LookupType","COUNTRIES","states","statesLoading","statesError","STATES","sortOptions","sort","a","b","localeCompare","map","lookup","handleAddressTypeChange","options","countryCode","split","defaultCountry","find","length","option","JSON","stringify","selectedAddressType","addressOptions","PERSONAL","isCountryUsa","isCountryCanada","CANADA","isCountryUsaOrCanada","addressTypeOptions","Controller","render","field","RadiobuttonControlsList","controls","defaultSelected","filter","item","colLength","tabIndexForInput","onChange","selectedValue","companyNameField","rules","required","requiredError","TextFormField","ariaLabel","className","maxLength","showErrorMessage","message","errorMessage","disabled","testId","event","addressLine1Field","addressLine2Field","countryField","Dropdown","expandIconAriaLabel","collapseIconAriaLabel","cityField","pattern","formatError","CITY_REGEX","undefined","stateField","LETTERS_REGEX","placeholder","isError","showHelperText","helperText","USA_ZIP_CODE_REGEX","CANADA_ZIP_CODE_REGEX","GENERAL_ZIP_CODE_REGEX","data-component-name","data-testid","zipcodeField","color","StyledDropdownContainer","toRem","lg","StyledOptionList","ul","alert10","li","neutral20","ref","selectedIndex","useValueAsLabel","renderLabelAsHtml","onClick","inputId","React","dropdownRef","useRef","inputFieldRef","selectedOptionRef","isOpen","toggleMenu","highlightedIndex","setHighlightedIndex","selectedItem","selectedOption","selectItem","selectOption","getToggleButtonProps","getMenuProps","getItemProps","useSelect","id","items","itemToString","onIsOpenChange","current","scrollIntoView","behavior","block","onSelectedItemChange","onSelectedOptionChange","selectedOptionIndex","findIndex","clsx","readOnly","showIcon","iconClass","isIconClickable","iconClickHandler","document","getElementById","focus","iconAriaLabel","getLabelProps","htmlFor","onFocus","role","tabIndex","index","fragmentString","DOMPurify","RETURN_DOM","innerHTML","StyledOptionItem","active","highlighted","dangerouslySetInnerHTML","__html","span","StyledUserInfo","UserInfo","callingCodeOptions","customerCallingCountry","isEmailDisabled","isDesktop","setCallingCodeOptions","selectedCallingCode","setSelectedCallingCode","DEFAULT_CALLING_CODE","selectedCallingCodeIndex","setSelectedCallingCodeIndex","isUsCallingCode","phoneNumberMinLength","usMinLength","nonUsMinLength","phoneNumberMaxLength","usMaxLength","nonUsMaxLength","phoneNumberFormatError","usFormatError","nonUsFormatError","callingCodes","callingCodesLoading","callingCodesError","CALLING_CODES","localeCountryCode","matchingCountry","matchingCallingCodeIndex","callingCodeOption","toLowerCase","matchingCallingCodeOption","firstNameField","lastNameField","emailField","EMAIL_REGEX","callingCodeField","mobileLabel","callingCodeIndex","phoneNumberField","NUM_REGEX","validate"],"sourceRoot":"","ignoreList":[]}