Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

skava / @skava/ui   js

Repository URL to install this package:

Version: 4.2.0-a11y.0 

/ src / components / molecules / DragAndDrop / typings.ts

import { ReactNode } from 'react'
import { FilterViewProps } from './ProductListFilter/typings'

export interface ProductProps extends FilterViewProps {
  id: string
  title?: string
  images?: Array<string>
  price?: number | string
  brand?: string
  variant?: number
  label?: string
  value?: Array<string>
}

export interface VariantConfigProps {
  row: number
  column: number
  imageCount: number
  variant: number
}

export interface DraggableStateProps {
  collisionProductId?: boolean | string | number
  originalProducts: Array<ProductProps>
  reArrangedProducts: Array<ProductProps>
  setItem: (key: string, value: unknown) => void
  products: Array<ProductProps>
  filterList: Array<ProductProps>
  updateVariantData?: (value: number) => void
  onDragOver: (value: string, filterFlag?: boolean) => void
  onDragEnd: (currentDragId: string, filterFlag?: boolean) => void
  deleteProduct?: (index: number) => void
  updateProducts?: (updateParams: Object) => void
  setUpdatedProductsList: (product: ProductProps) => void
  replaceProductData: (index: number, product: ProductProps) => void
  setDeletedProducts: (item: ProductProps) => void
}

export interface SeparateDropState {
  isDragging: boolean
  setItem: (key: string, value: unknown) => void
}

export interface DraggableRenderProp {
  (state: DraggableStateProps): ReactNode
}

export interface DraggableProps {
  className?: string
  children?: ReactNode
  renderProductList?: DraggableRenderProp
}