Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
export const wording = {
  cardName: 'name on card',
  cardNumber: 'card number',
  CVVNumber: 'cvv',
  expirationMonth: 'expiration month',
  expirationYear: 'expiration year',
  defaultBillingAddress: 'Billing address is same as shipping address',
  name: 'name',
  address: 'address',
  city: 'city',
  state: 'state',
  zip: 'zip',
  button: 'Save',
}

export const inputList = [
  {
    identity: 'name',
    type: 'text',
    value: '',
    className: 'form-inputs',
    name: 'nameOnCard',
    labelText: wording.cardName,
    maxLength: '50',
    wrapperClassName: 'form-item-wrapper',
    validationType: 'name',
    errorMessageFor: 'name',
    dataQa: 'qa-card-name',
    autocomplete: 'given-name',
    ariaLabel: wording.cardName,
    animatePlaceholder: false,
  },
  {
    identity: 'cardNumber',
    type: 'cardType',
    value: '',
    name: 'cardNumber',
    labelText: wording.cardNumber,
    animatePlaceholder: false,
    maxLength: 16,
    wrapperClassName: 'form-item-wrapper card-number',
    validationType: 'creditCard',
    errorMessageFor: 'creditCard',
    autocomplete: 'cc-number',
    dataQa: 'qa-payment-card-no',
    ariaLabel: wording.cardNumber,
  },
  {
    identity: 'CVVNumber',
    type: 'cardType',
    value: '',
    name: 'CVVNumber',
    labelText: wording.CVVNumber,
    wrapperClassName: 'form-item-wrapper cvv-number',
    animatePlaceholder: false,
    maxLength: 3,
    validationType: 'securityCode',
    errorMessageFor: 'cvvNumber',
    autocomplete: 'cc-number',
    dataQa: '',
    ariaLabel: wording.CVVNumber,
  },
  {
    identity: 'expiryMonth',
    type: 'expiryDate',
    name: 'expirationMonth',
    value: '',
    labelText: wording.expirationMonth,
    wrapperClassName: 'form-item-wrapper expiry-month',
    animatePlaceholder: false,
    minLength: '2',
    maxLength: '2',
    validationType: 'month',
    errorMessageFor: 'expirationMonth',
    autocomplete: 'cc-exp-month',
    dataQa: 'qa-payment-month',
    ariaLabel: wording.expirationMonth,
  },
  {
    identity: 'expiryYear',
    name: 'expirationYear',
    type: 'expiryDate',
    maxLength: '4',
    minLength: '2',
    value: '',
    labelText: wording.expirationYear,
    wrapperClassName: 'form-item-wrapper expiry-year',
    animatePlaceholder: false,
    validationType: 'year',
    errorMessageFor: 'expirationYear',
    autocomplete: 'cc-exp-year',
    dataQa: 'qa-payment-year',
    ariaLabel: wording.expirationYear,
  },
  {
    identity: 'defaultBillingAddress',
    type: 'checkbox',
    label: wording.defaultBillingAddress,
    className: 'form-item-wrapper default-address',
    name: 'defaultBillingAddress',
    isSelected: true,
    bgColor: '#00a0db',
    dataQa: 'qa-ship-billing-address',
    ariaLabel: wording.defaultBillingAddress,
  },
  {
    type: 'groupElements',
    name: 'billing-address',
    className: 'billing-address-wrapper',
    validationType: 'groupElements',
    isHidden: true,
    elementList: [
      {
        identity: 'name',
        type: 'text',
        value: '',
        className: 'form-inputs',
        name: 'name',
        labelText: wording.name,
        maxLength: '50',
        wrapperClassName: 'form-item-wrapper',
        validationType: 'name',
        errorMessageFor: 'name',
        // onBlur: handleAddressFormBlur,
        // onFocus: handleAddressFormFocus,
        dataQa: 'qa-name',
        autocomplete: 'given-name',
        ariaLabel: wording.name,
        animatePlaceholder: false,
      },

      {
        identity: 'address',
        type: 'text',
        value: '',
        className: 'form-inputs',
        name: 'addressLine1',
        labelText: wording.address,
        maxLength: '50',
        wrapperClassName: 'form-item-wrapper',
        validationType: 'address',
        errorMessageFor: 'address',
        // onBlur: handleAddressFormBlur,
        // onFocus: handleAddressFormFocus,
        dataQa: 'qa-address-1',
        autocomplete: 'given-address',
        ariaLabel: wording.address,
        animatePlaceholder: false,
      },

      {
        identity: 'address',
        type: 'text',
        value: '',
        className: 'form-inputs',
        name: 'addressLine2',
        labelText: wording.address,
        maxLength: '50',
        wrapperClassName: 'form-item-wrapper',
        validationType: 'address',
        errorMessageFor: 'address',
        // onBlur: handleAddressFormBlur,
        // onFocus: handleAddressFormFocus,
        dataQa: 'qa-address-2',
        autocomplete: 'given-address',
        ariaLabel: wording.address,
        animatePlaceholder: false,
      },

      {
        identity: 'city',
        type: 'text',
        value: '',
        className: 'form-inputs',
        name: 'city',
        labelText: wording.city,
        maxLength: '50',
        wrapperClassName: 'form-item-wrapper',
        validationType: 'city',
        errorMessageFor: 'city',
        // onBlur: handleAddressFormBlur,
        // onFocus: handleAddressFormFocus,
        dataQa: 'qa-city',
        autocomplete: 'given-city',
        ariaLabel: wording.city,
        animatePlaceholder: false,
      },

      {
        identity: 'state',
        type: 'text',
        value: '',
        className: 'form-inputs',
        name: 'state',
        labelText: wording.state,
        maxLength: '50',
        wrapperClassName: 'form-item-wrapper left-align',
        validationType: 'state',
        errorMessageFor: 'state',
        // onBlur: handleAddressFormBlur,
        // onFocus: handleAddressFormFocus,
        dataQa: 'qa-state',
        autocomplete: 'given-city',
        ariaLabel: wording.state,
        animatePlaceholder: false,
      },

      {
        identity: 'zip',
        type: 'text',
        value: '',
        className: 'form-inputs',
        name: 'zipCode',
        labelText: wording.zip,
        maxLength: '6',
        wrapperClassName: 'form-item-wrapper right-align',
        validationType: 'zip',
        errorMessageFor: 'zipCode',
        // onBlur: handleAddressFormBlur,
        // onFocus: handleAddressFormFocus,
        dataQa: 'qa-code',
        autocomplete: 'given-zip-code',
        ariaLabel: wording.zip,
        animatePlaceholder: false,
      },
    ],
  },
]