-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CODE_OF_CONDUCT.md, LICENSE, SUPPORT.md, and SECURITY.md files
- Loading branch information
Yucong Jin
committed
May 29, 2024
1 parent
d2aac12
commit 4ffe764
Showing
5 changed files
with
160 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Microsoft Open Source Code of Conduct | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
|
||
Resources: | ||
|
||
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) | ||
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) | ||
- Contact [[email protected]](mailto:[email protected]) with questions or concerns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) Microsoft Corporation. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,89 @@ | ||
# ReactDagEditor | ||
# Work in progress | ||
|
||
<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a> | ||
# react-dag-editor | ||
|
||
✨ **This workspace has been generated by [Nx, Smart Monorepos · Fast CI.](https://nx.dev)** ✨ | ||
[![License](https://img.shields.io/github/license/microsoft/react-dag-editor)](https://github.com/microsoft/react-dag-editor/blob/main/LICENSE) | ||
[![npm version](https://badge.fury.io/js/react-dag-editor.svg)](https://www.npmjs.com/package/react-dag-editor) | ||
[![Downloads](https://img.shields.io/npm/dm/react-dag-editor.svg)](https://www.npmjs.com/package/react-dag-editor) | ||
|
||
## Integrate with editors | ||
[Try it out!](https://microsoft.github.io/react-dag-editor/) | ||
|
||
Enhance your Nx experience by installing [Nx Console](https://nx.dev/nx-console) for your favorite editor. Nx Console | ||
provides an interactive UI to view your projects, run tasks, generate code, and more! Available for VSCode, IntelliJ and | ||
comes with a LSP for Vim users. | ||
## Overview | ||
|
||
## Nx plugins and code generators | ||
React component to create graphic user interface with: | ||
|
||
Add Nx plugins to leverage their code generators and automated, inferred tasks. | ||
- draggable nodes with ports and edges on a directed graph editor. | ||
- extensibility to customize the widgets or behaviors. | ||
- accessbility and testability support | ||
|
||
``` | ||
# Add plugin | ||
npx nx add @nx/react | ||
## About the name "react-dag-editor" | ||
|
||
# Use code generator | ||
npx nx generate @nx/react:app demo | ||
- react: it is a react component created from scratch. | ||
- dag: directed acyclic graph editor. Our a11y solution assumes the graph is a DAG. If you intend to turn off the a11y features, it is fine to draw undirected or cyclic graph with this component. | ||
- editor: it supports readonly graphic data visualization. However the reason you choose this library is the highlight in the user interaction to create/edit a graph. | ||
|
||
# Run development server | ||
npx nx serve demo | ||
## Demo | ||
|
||
# View project details | ||
npx nx show project demo --web | ||
``` | ||
### Online sample link: WIP | ||
|
||
Run `npx nx list` to get a list of available plugins and whether they have generators. Then run `npx nx list <plugin-name>` to see what generators are available. | ||
### Local demo | ||
|
||
Learn more about [code generators](https://nx.dev/features/generate-code) and [inferred tasks](https://nx.dev/concepts/inferred-tasks) in the docs. | ||
Follow the steps below to run local demo on your machine(MacOS/Linux/Windows): | ||
|
||
## Running tasks | ||
1. Clone the repository | ||
2. Run "yarn" to install all dependencies. | ||
3. Run "yarn start" and select the "react-dag-editor" in prompt selection. | ||
4. It won't take long to load the sample page. If not, try to open localhost:5000 on your browser or submit an issue. | ||
5. Checkout ./packages/ReactDagEditor/stories/components/FeatureDemo.tsx for api usage(Detail API Doc WIP) | ||
|
||
To execute tasks with Nx use the following syntax: | ||
## Features | ||
|
||
``` | ||
npx nx <target> <project> <...options> | ||
``` | ||
| Feature | Description | Demo | Is in default feature set? | Is in read only mode feature set? | | ||
| ------------------------------- | ---------------------------------------------------------------- | ----- | -------------------------- | --------------------------------- | | ||
| GraphFeatures.nodeDraggable | Node drag-and-drop to relocate | (WIP) | Yes | Yes | | ||
| GraphFeatures.nodeResizable | Double clicking on a node to enable the anchors to resize it | (WIP) | Yes | Yes | | ||
| GraphFeatures.clickNodeToSelect | Node click-to-select | (WIP) | Yes | Yes | | ||
| GraphFeatures.panCanvas | Drag-n-drop on canvas to pan | (WIP) | Yes | Yes | | ||
| GraphFeatures.multipleSelect | Ctrl click multi selection | (WIP) | Yes | Yes | | ||
| GraphFeatures.lassoSelect | Lasso select | (WIP) | Yes | Yes | | ||
| GraphFeatures.delete | Use delete key to delete a node | (WIP) | Yes | No | | ||
| GraphFeatures.addNewNodes | Adding new nodes | (WIP) | Yes | No | | ||
| GraphFeatures.addNewEdges | Adding new edges | (WIP) | Yes | No | | ||
| GraphFeatures.addNewPorts | Adding new ports | (WIP) | Yes | No | | ||
| GraphFeatures.sidePanel, | Built-in side panel | (WIP) | Yes | Yes | | ||
| GraphFeatures.autoFit | Auto pan/zoom the whole canvas to fit the viewport on every move | (WIP) | No | No | | ||
| GraphFeatures.editNode | Node inline editing mode | (WIP) | Yes | No | | ||
| GraphFeatures.autoAlign | Auto aligning hint on node drag-n-drop | (WIP) | Yes | No | | ||
| GraphFeatures.undoStack | Undo stack to support undo/redo | (WIP) | Yes | No | | ||
| GraphFeatures.ctrlKeyZoom | Zooming by ctrl clicking + mousewheel | (WIP) | Yes | Yes | | ||
| GraphFeatures.limitBoundary | Constraint the allowed drag-n-drop area | (WIP) | Yes | Yes | | ||
|
||
You can also run multiple targets: | ||
## compatibility | ||
|
||
``` | ||
npx nx run-many -t <target1> <target2> | ||
``` | ||
### Touch screen/touch pad support | ||
|
||
..or add `-p` to filter specific projects | ||
### Deceeded rendering on old browsers | ||
|
||
``` | ||
npx nx run-many -t <target1> <target2> -p <proj1> <proj2> | ||
``` | ||
## Extensibility & customization | ||
|
||
Targets can be defined in the `package.json` or `projects.json`. Learn more [in the docs](https://nx.dev/features/run-tasks). | ||
## Contributing | ||
|
||
## Set up CI! | ||
This project welcomes contributions and suggestions. Most contributions require you to agree to a | ||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us | ||
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. | ||
|
||
Nx comes with local caching already built-in (check your `nx.json`). On CI you might want to go a step further. | ||
When you submit a pull request, a CLA bot will automatically determine whether you need to provide | ||
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions | ||
provided by the bot. You will only need to do this once across all repos using our CLA. | ||
|
||
- [Set up remote caching](https://nx.dev/features/share-your-cache) | ||
- [Set up task distribution across multiple machines](https://nx.dev/nx-cloud/features/distribute-task-execution) | ||
- [Learn more how to setup CI](https://nx.dev/recipes/ci) | ||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or | ||
contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | ||
|
||
## Explore the project graph | ||
## Trademarks | ||
|
||
Run `npx nx graph` to show the graph of the workspace. | ||
It will show tasks that you can run with Nx. | ||
|
||
- [Learn more about Exploring the Project Graph](https://nx.dev/core-features/explore-graph) | ||
|
||
## Connect with us! | ||
|
||
- [Join the community](https://nx.dev/community) | ||
- [Subscribe to the Nx Youtube Channel](https://www.youtube.com/@nxdevtools) | ||
- [Follow us on Twitter](https://twitter.com/nxdevtools) | ||
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft | ||
trademarks or logos is subject to and must follow | ||
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). | ||
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. | ||
Any use of third-party trademarks or logos are subject to those third-party's policies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK --> | ||
|
||
## Security | ||
|
||
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). | ||
|
||
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](<https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)>), please report it to us as described below. | ||
|
||
## Reporting Security Issues | ||
|
||
**Please do not report security vulnerabilities through public GitHub issues.** | ||
|
||
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). | ||
|
||
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). | ||
|
||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). | ||
|
||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: | ||
|
||
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) | ||
- Full paths of source file(s) related to the manifestation of the issue | ||
- The location of the affected source code (tag/branch/commit or direct URL) | ||
- Any special configuration required to reproduce the issue | ||
- Step-by-step instructions to reproduce the issue | ||
- Proof-of-concept or exploit code (if possible) | ||
- Impact of the issue, including how an attacker might exploit the issue | ||
|
||
This information will help us triage your report more quickly. | ||
|
||
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. | ||
|
||
## Preferred Languages | ||
|
||
We prefer all communications to be in English. | ||
|
||
## Policy | ||
|
||
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). | ||
|
||
<!-- END MICROSOFT SECURITY.MD BLOCK --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# TODO: The maintainer of this repo has not yet edited this file | ||
|
||
**REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project? | ||
|
||
- **No CSS support:** Fill out this template with information about how to file issues and get help. | ||
- **Yes CSS support:** Fill out an intake form at [aka.ms/spot](https://aka.ms/spot). CSS will work with/help you to determine next steps. More details also available at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). | ||
- **Not sure?** Fill out a SPOT intake as though the answer were "Yes". CSS will help you decide. | ||
|
||
_Then remove this first heading from this SUPPORT.MD file before publishing your repo._ | ||
|
||
# Support | ||
|
||
## How to file issues and get help | ||
|
||
This project uses GitHub Issues to track bugs and feature requests. Please search the existing | ||
issues before filing new issues to avoid duplicates. For new issues, file your bug or | ||
feature request as a new Issue. | ||
|
||
For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE | ||
FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER | ||
CHANNEL. WHERE WILL YOU HELP PEOPLE?**. | ||
|
||
## Microsoft Support Policy | ||
|
||
Support for this **PROJECT or PRODUCT** is limited to the resources listed above. |