0.0.7 • Published 3 years ago

gluestick-elements v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

gluestick logo gluestick by hotglue

Open source, self-hosted CSV uploads and mapping.


demo

Info

Motivation

We want to provide a light-weight and simple way to integrate user data from CSVs, with a great UI and strong mapping functionality.

Links

Sandbox

gluestick-elements

Simple reusable React components that handle CSV uploads, mapping, and validation.

Functionality

  1. Upload file
  2. Do column mapping
  3. Validate data + preview final output
  4. Approve (sent to hook / piped to target)

Install

npm install --save gluestick-elements

Usage

import React, { Component } from 'react'

import {GlueStick} from 'gluestick-elements'
import 'gluestick-elements/dist/index.css'

class Example extends Component {
  render() {
    return (<GlueStick
      user={"default"}
      endpoint={"https://gluestick-api.herokuapp.com"}
      schema={{
        fields: [
          {
            col: "Name",
            key: "name"
          },
          {
            col: "Phone Number",
            key: "phoneNumber",
            validator: /^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$/
              .source
          }
        ]
      }}
    />);
  }
}
0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago