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    
@skava/forms / src / new-forms / OneForm / adapters / typings.ts
Size: Mime:
export interface ObserverFormClassPropertyTypes {
  CancelCustomClass: string
  SubmitCustomClass: string
  ButtonGroupCustomClass: string
  formClassName: string
  formClassList: string
  classList: any

  // private
  cachedClassList?: any
}

// probably one for formQa
export interface OldFormProperties
  extends Partial<ObserverFormClassPropertyTypes> {
  submitDataQa?: string
  isSubmitButtonNeeded?: boolean
  defaultSubmitButtonLabel?: string

  isCancelButtonNeeded?: boolean
  cancelDataQa?: boolean
  handleCancel?: (...args: any) => void
  defaultCancelButtonLabel?: string

  wording?: { [key: string]: any }
  shouldResetFormOnUnmount?: boolean

  formId?: string
}

export interface OldInputConfig {
  // this is not always there - very bad
  identity?: string

  type: string
  // USUALLY there...
  value?: string

  className: string

  // => pass prop
  wrapperClassName?: string

  // => propertyName
  name: string

  // => label (though we could keep labelText)
  labelText?: string
  label?: string

  minLength?: string | number
  maxLength?: string | number
  validationType?: string
  errorMessageFor?: string

  qa?: string
  dataQa?: string

  autocomplete?: string
  animatePlaceholder?: boolean

  onBlur?: (...args: any) => void
  onFocus?: (...args: any) => void
  // on...?: (...args: any) => void

  ariaLabel?: string

  /** does not make much sense */
  icon?: { [key: string]: any }
}
export interface OldCheckboxInputConfig extends OldInputConfig {
  type: 'checkbox'
  bgColor?: string
  isSelected?: boolean
  // never in checkbox
  value?: any
}
export interface OldGroupElementsInputConfig extends OldInputConfig {
  type: 'groupElements'
  validationType?: 'groupElements' | string
  isHidden?: boolean
  elementList: OldInputConfigItem[]
}

export type OldInputConfigItem =
  | OldGroupElementsInputConfig
  | OldCheckboxInputConfig
  | OldInputConfig