1.11.0 • Published 2 years ago

@upsetjs/react v1.11.0

Weekly downloads
38
License
SEE LICENSE IN LI...
Repository
github
Last release
2 years ago

UpSet.js

NPM Package Github Actions

UpSet.js is a JavaScript reimplementation of UpSetR which itself is based on UpSet. The library is written in React. The UpSet React component is implemented as a pure functional component soley depending on the given properties.

A detailed description can be found at the README on the main Github Monorepo.

UpSet.js

Usage

npm install @upsetjs/react react react-dom
import React from 'react';
import UpSet, { extractSets, generateIntersections, ISetLike } from '@upsetjs/react';

const elems = [
  { name: 'A', sets: ['S1', 'S2'] },
  { name: 'B', sets: ['S1'] },
  { name: 'C', sets: ['S2'] },
  { name: 'D', sets: ['S1', 'S3'] },
];

const sets = extractSets(elems);
const combinations = generateIntersections(sets);

<UpSet sets={sets} combinations={combinations} width={500} height={300} />;

with stored selection

const UpSetSelection = (props: any) => {
  [selection, setSelection] = React.useState(null as ISetLike<any> | null);

  return <UpSet {...props} selection={selection} onHover={setSelection} />;
};

<UpSetSelection sets={sets} combinations={combinations} />;

License

Commercial license

If you want to use Upset.js for a commercial application the commercial license is the appropriate license. With this option, your source code is kept proprietary. Contact @sgratzl for details

Open-source license

GNU AGPLv3

1.11.0

2 years ago

1.10.10

2 years ago

1.10.1

2 years ago

1.10.0

2 years ago

1.9.1

3 years ago

1.8.0

3 years ago

1.7.0

3 years ago

1.6.2

4 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.2

4 years ago

0.3.3

4 years ago

0.3.1

4 years ago

0.1.0

4 years ago