4.2.6 • Published 8 months ago

@xlork/react v4.2.6

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

xlork

XLork is a powerful Node.js package for parsing and manipulating CSV and XML files. With its intuitive API, XLork makes it easy to read, write, and modify CSV and XML data in your Node.js applications. Whether you're dealing with large datasets or just need to perform some quick data transformations, XLork has you covered. Plus, with its comprehensive documentation and responsive community support, XLork is the perfect choice for developers looking to work with CSV and XML data in Node.js. Install XLork today and start parsing and manipulating your data with ease!

React adapter for xlork.com

Installation / Import

First, install the dependency via npm:

  npm i @xlork/react

Examples

Try our example in CodeSandbox.

Readme

For usage see the guide here - https://xlork.com/docs

Usage

import { XLorkClient } from '@xlork/react';

<XLorkClient
  licenseKey="XXXX-XXXX-XXXX-XXXX"
  preload={false}
  user={{
    email: 'example@xlork.com',
    name: 'xlork-demo',
  }}
  settings={{
    title: 'Upload data',
    columns: [
      {
        label: 'Customer Name',
        key: 'customer_name',
        type: 'text',
        validators: {
          type: 'required',
          regexMatches: '^[0-9]{10}$',
          error: 'Name can not be blank',
        },
      },
      {
        label: 'Customer Mobile',
        key: 'customer_mobile_number',
        type: 'numeric',
        validators: {
          regexMatches: '^[0-9]{10}$',
          error: 'Please input 10 digit no.',
        },
      },
      {
        label: 'Email',
        key: 'email',
        type: 'email',
      },
      {
        label: 'Date',
        key: 'date',
        type: 'date',
        dateFormat: 'DD-MM-YYYY',
      },
    ],
    theme: 'SUNFLOWER',
    maxRecords: 20,
  }}
  onComplete={async (response) => {
    console.log(response);
  }}
  onCancel={() => {
    console.log('onCancel - ----');
  }}
  loadOnDemand={(init) => {
    return (
      <button className="btn btn-primary extra_margin" onClick={init}>
        Upload Data
      </button>
    );
  }}
/>

License

MIT © xlork

4.2.6

8 months ago

4.2.3

12 months ago

4.2.5

12 months ago

4.2.4

12 months ago

4.2.2

1 year ago

4.1.0

1 year ago

4.2.1

1 year ago

4.2.0

1 year ago

4.0.0

1 year ago

3.1.5

1 year ago

3.1.4

1 year ago

3.1.3

2 years ago

3.1.2

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.0.15

2 years ago

2.0.14

2 years ago

2.0.13

2 years ago

2.0.12

2 years ago

2.0.11

2 years ago

2.0.10

2 years ago

2.0.9

2 years ago

2.0.8

2 years ago

2.0.6

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago