Skip to content

Commit

Permalink
created develop branch
Browse files Browse the repository at this point in the history
  • Loading branch information
patryk0493 committed Apr 3, 2020
0 parents commit f477aeb
Show file tree
Hide file tree
Showing 104 changed files with 24,684 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
/lib


# testing
/coverage

# production
/dist
/build
# public
.cache

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

/cypress/screenshots
/cypress/snapshots
12 changes: 12 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.circleci
node_modules
build
cypress
cypress.json
public
src
tsconfig.*json
package.*json
azure-pipelines-upgrade-rc-version.yml
snapshots.js
.gitignore
104 changes: 104 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
## 1. Install ReactGrid from npm repository

```shell
npm i @silevis/reactgrid
```

## 2. Import ReactGrid component

```tsx
import { ReactGrid } from "@silevis/reactgrid";
```

## 3. Import css styles

Import file from `node_modules` directory. This file is necessary to correctly displaying.

```tsx
import "@silevis/reactgrid/dist/lib/assets/core.css";
```

## 4. Create a cell matrix

Time to define our data. It will be stored in [React Hook](https://reactjs.org/docs/hooks-intro.html).
`useState` hook will be initialized with object that contains two keys - `columns` and `rows`.
Both of them must be valid ReactGrid objects: `Columns` `Rows`.

```tsx
import React, { useState } from "react";
import ReactDOM from "react-dom";
import { ReactGrid } from "@silevis/reactgrid";
import "@silevis/reactgrid/dist/lib/assets/core.css";

function App() {
const [state, setState] = useState(() => ({
columns: [
{ columnId: "Name", width: 100 },
{ columnId: "Surname", width: 100 }
],
rows: [
{
rowId: 0,
cells: [
{ type: "header", text: "Name" },
{ type: "header", text: "Surname" }
]
},
{
rowId: 1,
cells: [
{ type: "text", text: "Thomas" },
{ type: "text", text: "Goldman" }
]
},
{
rowId: 2,
cells: [
{ type: "text", text: "Susie" },
{ type: "text", text: "Spencer" }
]
},
{
rowId: 2,
cells: [{ type: "text", text: "" }, { type: "text", text: "" }]
}
]
}));

return (
<ReactGrid
rows={state.rows}
columns={state.columns}
/>
);
}
```

## 4. Render your component

```tsx
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
```

Open example on [codesandbox.io](https://codesandbox.io/s/reactgrid-getting-started-0754c)

## Docs

Browse docs: [click](http://reactgrid.com/)

## Licensing

ReactGrid is distributed under [MIT](link) license.

(c) 2020 Silevis Software

## Author

[Silevis Software](https://www.silevis.com/)

<p align="center">
<a href="https://www.silevis.com/">
<img alt="Silevis" src="https://media.licdn.com/dms/image/C4D0BAQGgkonm5f80mA/company-logo_200_200/0?e=2159024400&v=beta&t=l5Nw-CF55OIxVORSAXOw79DlgSiDakhnYLlkBOMj7s8" width="200" />
</a>
</p>
29 changes: 29 additions & 0 deletions azure-pipelines-upgrade-rc-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
trigger:
- develop

pool:
vmImage: 'ubuntu-latest'

stages:
- stage: upgrade_rc_version
displayName: 'Upgrade RC version'
jobs:
- job: upgrade_rc_version
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- checkout: self
persistCredentials: true
- script:
git checkout $(DEVELOP_BRANCH_NAME)
displayName: 'Git Checkout'
- script:
git config --global user.email "$(GIT_USER_MAIL)" && git config --global user.name "$(GIT_USER_NAME)"
- script:
npm version prerelease --preid=rc -m "upgrade version [ci skip]"
displayName: 'Upgrade version'
- script:
git push
displayName: 'Push upgraded version'
5 changes: 5 additions & 0 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"video": false,
"baseUrl": "http://localhost:3000",
"viewportWidth": 1200
}
5 changes: 5 additions & 0 deletions cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "[email protected]",
"body": "Fixtures are a great way to mock data for responses to routes"
}
27 changes: 27 additions & 0 deletions cypress/integration/common/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
class Constants {
keyCodes = {
A: 65,
ArrowUp: 38,
ArrowDown: 40,
ArrowLeft: 37,
ArrowRight: 39,
Tab: 9,
Shift: 16,
Backspace: 8,
Delete: 46,
Control: 17,
Enter: 13,
Home: 36,
Space: 32,
End: 35,
PageUp: 33,
PageDown: 34,
Esc: 27,
Copy: 67,
Cut: 88,
Paste: 86,
};
}

var constants = new Constants();
module.exports = constants;
Loading

0 comments on commit f477aeb

Please sign in to comment.