@apitable/react-flow
Advanced tools
Comparing version 0.0.4 to 9.6.11
@@ -1,5 +0,19 @@ | ||
export { default as VariableSizeGrid } from "./VariableSizeGrid"; | ||
export { default as VariableSizeList } from "./VariableSizeList"; | ||
export { default as FixedSizeGrid } from "./FixedSizeGrid"; | ||
export { default as FixedSizeList } from "./FixedSizeList"; | ||
export { default as areEqual } from "./areEqual"; | ||
import ReactFlow from './container/ReactFlow'; | ||
export default ReactFlow; | ||
export { default as Handle } from './components/Handle'; | ||
export { default as EdgeText } from './components/Edges/EdgeText'; | ||
export { default as StraightEdge } from './components/Edges/StraightEdge'; | ||
export { default as StepEdge } from './components/Edges/StepEdge'; | ||
export { default as BezierEdge, getBezierPath } from './components/Edges/BezierEdge'; | ||
export { default as SmoothStepEdge, getSmoothStepPath } from './components/Edges/SmoothStepEdge'; | ||
export { getMarkerEnd, getCenter as getEdgeCenter } from './components/Edges/utils'; | ||
export { isNode, isEdge, removeElements, addEdge, getOutgoers, getIncomers, getConnectedEdges, updateEdge, getTransformForBounds, getRectOfNodes, } from './utils/graph'; | ||
export { default as useZoomPanHelper } from './hooks/useZoomPanHelper'; | ||
export { default as useUpdateNodeInternals } from './hooks/useUpdateNodeInternals'; | ||
export * from './additional-components'; | ||
export * from './store/hooks'; | ||
export * from './types'; | ||
export { ReactFlowProps } from './container/ReactFlow'; | ||
export { MiniMapProps } from './additional-components/MiniMap'; | ||
export { ControlProps } from './additional-components/Controls'; | ||
export { BackgroundProps } from './additional-components/Background'; |
166
package.json
{ | ||
"name": "@apitable/react-flow", | ||
"version": "0.0.4", | ||
"description": "A react table with frozen columns and row headers based on react-window", | ||
"author": "apitable", | ||
"contributors": [ | ||
"apitable" | ||
], | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/apitable/react-window.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/apitable/react-window/issues" | ||
}, | ||
"version": "9.6.11", | ||
"engines": { | ||
"node": ">10.19.0" | ||
"node": ">=12" | ||
}, | ||
"keywords": [ | ||
"react", | ||
"reactjs", | ||
"virtual", | ||
"window", | ||
"windowed", | ||
"list", | ||
"scrolling", | ||
"infinite", | ||
"virtualized", | ||
"table", | ||
"grid", | ||
"spreadsheet" | ||
], | ||
"main": "dist/index.js", | ||
"main": "dist/ReactFlow.js", | ||
"module": "dist/ReactFlow.esm.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"src/*.ts" | ||
], | ||
"prepublish": "tsc", | ||
"sideEffects": false, | ||
"license": "MIT", | ||
"private": false, | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org" | ||
}, | ||
"scripts": { | ||
"precommit": "lint-staged", | ||
"prettier": "prettier --write '**/*.{js,json,css}'", | ||
"linc": "lint-staged", | ||
"lint": "eslint '**/*.js'", | ||
"test": "cross-env CI=1 react-scripts test --env=jsdom", | ||
"build": "tsc", | ||
"start": "tsc -w" | ||
"build": "rollup -c --environment NODE_ENV:production && postcss src/*.css --dir dist", | ||
"start": "rollup -w -c", | ||
"start:examples": "cd example && npm start", | ||
"build:examples": "cd example && npm run build", | ||
"start:testserver": "npm run build && npm run start:examples", | ||
"build:dev": "npm install && npm run build && cd example && npm install && npm run build", | ||
"dev:wait": "start-server-and-test start:testserver http-get://localhost:3000", | ||
"test": "BROWSER=none npm run dev:wait test:chrome", | ||
"test:chrome": "cypress run --browser chrome --headless", | ||
"test:firefox": "cypress run --browser firefox", | ||
"test:all": "npm run test:chrome && npm run test:firefox", | ||
"cypress": "npm run dev:wait cy:open", | ||
"cy:open": "cypress open", | ||
"release": "npm run test && release-it", | ||
"release:notest": "release-it", | ||
"release:next": "release-it --preRelease=next" | ||
}, | ||
"lint-staged": { | ||
"{website,src}/**/*.{js,json,css}": [ | ||
"prettier --write", | ||
"git add" | ||
], | ||
"**/*.js": "eslint --max-warnings 0" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.0.0", | ||
"@types/memoize-one": "^5.1.2", | ||
"@types/react": "^16.9.43", | ||
"memoize-one": ">=3.1.1 <6", | ||
"utility-types": "^3.10.0" | ||
"@babel/runtime": "^7.15.4", | ||
"classcat": "^5.0.3", | ||
"d3-selection": "^3.0.0", | ||
"d3-zoom": "^3.0.0", | ||
"fast-deep-equal": "^3.1.3", | ||
"react-draggable": "^4.4.4", | ||
"react-redux": "7.2.5", | ||
"redux": "^4.1.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.15.8", | ||
"@babel/plugin-transform-runtime": "^7.15.8", | ||
"@babel/preset-env": "^7.15.8", | ||
"@babel/preset-react": "^7.14.5", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^21.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.5", | ||
"@rollup/plugin-replace": "^3.0.0", | ||
"@svgr/rollup": "^5.5.0", | ||
"@types/d3": "^7.0.0", | ||
"@types/react-redux": "7.1.19", | ||
"@types/redux": "^3.6.31", | ||
"@types/react": "^17.0.2", | ||
"@types/resize-observer-browser": "^0.1.6", | ||
"autoprefixer": "^10.3.7", | ||
"babel-preset-react-app": "^10.0.0", | ||
"cypress": "^8.5.0", | ||
"postcss": "^8.3.9", | ||
"postcss-cli": "^9.0.1", | ||
"postcss-nested": "^5.0.6", | ||
"prettier": "2.4.1", | ||
"prop-types": "^15.7.2", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"release-it": "^14.11.6", | ||
"rollup": "^2.58.0", | ||
"rollup-plugin-bundle-size": "^1.0.3", | ||
"rollup-plugin-livereload": "^2.0.5", | ||
"rollup-plugin-postcss": "^4.0.1", | ||
"rollup-plugin-serve": "^1.1.0", | ||
"rollup-plugin-typescript2": "^0.30.0", | ||
"start-server-and-test": "^1.14.0", | ||
"typescript": "^4.4.3" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.9.0", | ||
"react-dom": "^16.9.0" | ||
"react": "16 || 17", | ||
"react-dom": "16 || 17" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.0.0", | ||
"@babel/plugin-proposal-class-properties": "^7.0.0", | ||
"@babel/plugin-transform-runtime": "^7.0.0", | ||
"@babel/preset-env": "^7.0.0", | ||
"@babel/preset-flow": "^7.0.0", | ||
"@types/node": "^14.0.23", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-eslint": "^9.0.0", | ||
"babel-plugin-annotate-pure-calls": "^0.3.0", | ||
"cross-env": "^5.1.4", | ||
"del-cli": "^1.1.0", | ||
"eslint": "^4.19.1", | ||
"eslint-config-prettier": "^2.9.0", | ||
"eslint-config-react-app": "^2.1.0", | ||
"eslint-config-standard": "^11.0.0", | ||
"eslint-config-standard-react": "^6.0.0", | ||
"eslint-plugin-flowtype": "^2.47.1", | ||
"eslint-plugin-import": "^2.11.0", | ||
"eslint-plugin-jsx-a11y": "^5", | ||
"eslint-plugin-node": "^6.0.1", | ||
"eslint-plugin-prettier": "^2.6.0", | ||
"eslint-plugin-promise": "^3.7.0", | ||
"eslint-plugin-react": "^7.7.0", | ||
"eslint-plugin-standard": "^3.0.1", | ||
"lint-staged": "^7.0.5", | ||
"prettier": "^1.12.1", | ||
"react": "^16.9.0", | ||
"react-dom": "^16.9.0", | ||
"react-is": "^16.8.4", | ||
"react-scripts": "^1.1.1", | ||
"react-test-renderer": "^16.7.0", | ||
"typescript": "^3.9.6" | ||
} | ||
} | ||
"files": [ | ||
"dist", | ||
"nocss" | ||
] | ||
} |
@@ -1,34 +0,79 @@ | ||
# @apitable/react-flow | ||
[![react-flow](https://user-images.githubusercontent.com/2857535/95224198-b2540000-07fa-11eb-832d-361d72d60345.jpg)](https://reactflow.dev) | ||
基于 react-window Grid 构建的表格组件。 | ||
React Flow is a library for building node-based graphs. You can easily implement custom node types and it comes with components like a mini-map and graph controls. Feel free to check out the [examples](https://reactflow.dev/) or read the [blog post](https://webkid.io/blog/react-flow-node-based-graph-library/) to get started. | ||
react-window 是泛用性的虚拟滚动套件,@apitable/react-flow 基于其中的 Grid 构建,通过扩展 Grid 的 props 参数,非侵入式支持更多的表格特性, 使其更方便构建表格。 | ||
- **Website:** https://reactflow.dev | ||
- **Documentation:** https://reactflow.dev/docs | ||
- **Examples:** https://reactflow.dev/examples | ||
- **Website/Docs Repository:** https://github.com/wbkd/react-flow-docs | ||
- **Community:** https://discord.gg/Bqt6xrs | ||
## Feature | ||
- [x] 使用 typescript 重写(react-window 使用 flow) | ||
- [x] 表头 & 冻结列 (sticky) | ||
- [x] 统计栏 | ||
- [ ] 通用的表格传参模式 | ||
- [ ] 分组 | ||
React Flow was initially created for [datablocks](https://datablocks.pro). A node-based editor for transforming, analyzing and visualizing data. | ||
## Install | ||
## Installation | ||
``` | ||
yarn add @apitable/react-flow | ||
npm install react-flow-renderer | ||
``` | ||
## Usage | ||
## Quick Start | ||
```tsx | ||
This is a very basic example of how to use React Flow. You can find more advanced examples on the [website](https://reactflow.dev/examples). | ||
```js | ||
import React from 'react'; | ||
import ReactFlow from 'react-flow-renderer'; | ||
const elements = [ | ||
{ id: '1', data: { label: 'Node 1' }, position: { x: 250, y: 5 } }, | ||
// you can also pass a React component as a label | ||
{ id: '2', data: { label: <div>Node 2</div> }, position: { x: 100, y: 100 } }, | ||
{ id: 'e1-2', source: '1', target: '2', animated: true }, | ||
]; | ||
const BasicFlow = () => <ReactFlow elements={elements} />; | ||
``` | ||
## Development | ||
## Acknowledgments | ||
Before you start you need to install the React Flow dependencies via `npm install` and the ones of the examples `cd example && npm install`. | ||
+ [react-window](https://github.com/bvaughn/react-window) | ||
+ [flow-to-ts](https://github.com/Khan/flow-to-ts) Flow 转 TypeScript | ||
If you want to contribute or develop custom features the easiest way is to start the dev server: | ||
## License | ||
```sh | ||
npm start | ||
``` | ||
MIT | ||
and the example app via: | ||
```sh | ||
cd example && npm start | ||
``` | ||
The example app serves the content of the `example` folder and watches changes inside the `src` folder. The examples are using the source of the `src` folder. | ||
## Testing | ||
Testing is done with cypress. You can find the tests in the [`integration/flow`](/cypress/integration/flow) folder. In order to run the tests do: | ||
```sh | ||
npm run test | ||
``` | ||
## Maintainer | ||
Moritz Klack • [Twitter](https://twitter.com/moklick) • [Github](https://github.com/moklick) | ||
## Support | ||
If you need custom support or features for your application we are [happy to hear from you](https://webkid.io/contact). | ||
### Thanks! | ||
Special thanks to [Andy Lindemann](https://github.com/AndyLnd) for a lot of helpful contributions! | ||
--- | ||
React Flow is maintained by [webkid](https://webkid.io), a data visualization agency from Berlin. If you need help or want to develop react-based tools or data visualizations, [get in touch](https://webkid.io/contact)! |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4022665
124
45079
1
80
10
33
2
125
1
+ Addedclasscat@^5.0.3
+ Addedd3-selection@^3.0.0
+ Addedd3-zoom@^3.0.0
+ Addedfast-deep-equal@^3.1.3
+ Addedreact-draggable@^4.4.4
+ Addedreact-redux@7.2.5
+ Addedredux@^4.1.1
+ Added@types/hoist-non-react-statics@3.3.6(transitive)
+ Added@types/react@19.0.8(transitive)
+ Added@types/react-redux@7.1.34(transitive)
+ Addedclasscat@5.0.5(transitive)
+ Addedclsx@1.2.1(transitive)
+ Addedd3-color@3.1.0(transitive)
+ Addedd3-dispatch@3.0.1(transitive)
+ Addedd3-drag@3.0.0(transitive)
+ Addedd3-ease@3.0.1(transitive)
+ Addedd3-interpolate@3.0.1(transitive)
+ Addedd3-selection@3.0.0(transitive)
+ Addedd3-timer@3.0.1(transitive)
+ Addedd3-transition@3.0.1(transitive)
+ Addedd3-zoom@3.0.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedhoist-non-react-statics@3.3.2(transitive)
+ Addedreact@17.0.2(transitive)
+ Addedreact-dom@17.0.2(transitive)
+ Addedreact-draggable@4.4.6(transitive)
+ Addedreact-redux@7.2.5(transitive)
+ Addedredux@4.2.1(transitive)
+ Addedscheduler@0.20.2(transitive)
- Removed@types/memoize-one@^5.1.2
- Removed@types/react@^16.9.43
- Removedmemoize-one@>=3.1.1 <6
- Removedutility-types@^3.10.0
- Removed@types/memoize-one@5.1.2(transitive)
- Removed@types/prop-types@15.7.14(transitive)
- Removed@types/react@16.14.62(transitive)
- Removed@types/scheduler@0.16.8(transitive)
- Removedmemoize-one@5.2.1(transitive)
- Removedreact@16.14.0(transitive)
- Removedreact-dom@16.14.0(transitive)
- Removedscheduler@0.19.1(transitive)
- Removedutility-types@3.11.0(transitive)
Updated@babel/runtime@^7.15.4