Skip to content

Commit 92fdcf0

Browse files
authored
Merge branch 'vnext' into mdragnev/state-samples
2 parents d24e03f + 23ccc17 commit 92fdcf0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+17393
-0
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project
2+
module.exports = {
3+
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
4+
parserOptions: {
5+
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
6+
sourceType: "module", // Allows for the use of imports
7+
ecmaFeatures: {
8+
jsx: true // Allows for the parsing of JSX
9+
}
10+
},
11+
settings: {
12+
react: {
13+
version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use
14+
}
15+
},
16+
extends: [
17+
"eslint:recommended",
18+
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
19+
"plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin
20+
],
21+
rules: {
22+
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
23+
"default-case": "off",
24+
"jsx-a11y/alt-text": "off",
25+
"jsx-a11y/iframe-has-title": "off",
26+
"no-undef": "off",
27+
"no-unused-vars": "off",
28+
"no-extend-native": "off",
29+
"no-throw-literal": "off",
30+
"no-useless-concat": "off",
31+
"no-mixed-operators": "off",
32+
"no-prototype-builtins": "off",
33+
"prefer-const": "off",
34+
"prefer-rest-params": "off",
35+
"@typescript-eslint/no-unused-vars": "off",
36+
"@typescript-eslint/no-explicit-any": "off",
37+
"@typescript-eslint/no-inferrable-types": "off",
38+
"@typescript-eslint/no-useless-constructor": "off",
39+
"@typescript-eslint/no-use-before-define": "off",
40+
"@typescript-eslint/no-non-null-assertion": "off",
41+
"@typescript-eslint/interface-name-prefix": "off",
42+
"@typescript-eslint/prefer-namespace-keyword": "off",
43+
"@typescript-eslint/explicit-function-return-type": "off",
44+
"@typescript-eslint/explicit-module-boundary-types": "off"
45+
},
46+
"overrides": [
47+
{
48+
"files": ["*.ts", "*.tsx"],
49+
"rules": {
50+
"default-case": "off",
51+
"jsx-a11y/alt-text": "off",
52+
"jsx-a11y/iframe-has-title": "off",
53+
"no-var": "off",
54+
"no-undef": "off",
55+
"no-unused-vars": "off",
56+
"no-extend-native": "off",
57+
"no-throw-literal": "off",
58+
"no-useless-concat": "off",
59+
"no-mixed-operators": "off",
60+
"no-prototype-builtins": "off",
61+
"prefer-const": "off",
62+
"prefer-rest-params": "off",
63+
"@typescript-eslint/no-unused-vars": "off",
64+
"@typescript-eslint/no-explicit-any": "off",
65+
"@typescript-eslint/no-inferrable-types": "off",
66+
"@typescript-eslint/no-useless-constructor": "off",
67+
"@typescript-eslint/no-use-before-define": "off",
68+
"@typescript-eslint/no-non-null-assertion": "off",
69+
"@typescript-eslint/interface-name-prefix": "off",
70+
"@typescript-eslint/prefer-namespace-keyword": "off",
71+
"@typescript-eslint/explicit-function-return-type": "off",
72+
"@typescript-eslint/explicit-module-boundary-types": "off"
73+
}
74+
}
75+
]
76+
};
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<!-- NOTE: do not change this file because it's auto re-generated from template: -->
2+
<!-- https://github.com/IgniteUI/igniteui-react-examples/tree/vnext/templates/sample/ReadMe.md -->
3+
4+
This folder contains implementation of React application with example of Action Strip feature using [Grid](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.
5+
6+
7+
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
8+
<body>
9+
<a target="_blank" href="https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html" rel="noopener noreferrer">
10+
<img height="40px" style="border-radius: 0rem" alt="View Docs" src="https://github.com/IgniteUI/igniteui-blazor-examples/raw/vnext/templates/sample/images/button-docs.png"/>
11+
</a>
12+
<a target="_blank" href="./src/index.tsx" rel="noopener noreferrer">
13+
<img height="40px" style="border-radius: 0rem; max-width: 100%;" alt="View Code" src="https://github.com/IgniteUI/igniteui-blazor-examples/raw/vnext/templates/sample/images/button-code.png"/>
14+
</a>
15+
<a target="_blank" href="https://www.infragistics.com/react-demos/samples/grids/grid/action-strip" rel="noopener noreferrer">
16+
<img height="40px" style="border-radius: 0rem; max-width: 100%;" alt="Run Sample" src="https://github.com/IgniteUI/igniteui-blazor-examples/raw/vnext/templates/sample/images/button-run.png"/>
17+
</a>
18+
<a target="_blank" href="https://codesandbox.io/s/github/IgniteUI/igniteui-react-examples/tree/master/samples/grids/grid/action-strip?fontsize=14&hidenavigation=1&theme=dark&view=preview&file=/src/index.tsx" rel="noopener noreferrer">
19+
<img height="40px" style="border-radius: 0rem; max-width: 100%;" alt="Run Sample" src="https://github.com/IgniteUI/igniteui-blazor-examples/raw/vnext/templates/sample/images/button-sandbox.png"/>
20+
</a>
21+
</body>
22+
</html>
23+
24+
## Branches
25+
26+
> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository.
27+
28+
## Instructions
29+
30+
Follow these instructions to run this example:
31+
32+
33+
```
34+
git clone https://github.com/IgniteUI/igniteui-react-examples.git
35+
git checkout master
36+
cd ./igniteui-react-examples
37+
cd ./samples/grids/grid/action-strip
38+
```
39+
40+
open above folder in VS Code or type:
41+
```
42+
code .
43+
```
44+
45+
In terminal window, run:
46+
```
47+
npm install --legacy-peer-deps
48+
npm run-script start
49+
```
50+
51+
Then open http://localhost:4200/ in your browser
52+
53+
54+
## Learn More
55+
56+
To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html).
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "example-ignite-ui-react",
3+
"description": "This project provides example of using Ignite UI for React components",
4+
"author": "Infragistics",
5+
"version": "1.4.0",
6+
"license": "",
7+
"homepage": ".",
8+
"private": true,
9+
"scripts": {
10+
"start": "set PORT=4200 && react-scripts --max_old_space_size=10240 start",
11+
"build": "react-scripts --max_old_space_size=10240 build ",
12+
"test": "react-scripts test --env=jsdom",
13+
"eject": "react-scripts eject",
14+
"lint": "eslint ./src/**/*.{ts,tsx}"
15+
},
16+
"dependencies": {
17+
"igniteui-dockmanager": "1.14.3",
18+
"igniteui-react": "18.7.0-beta.2",
19+
"igniteui-react-core": "18.7.0-beta.2",
20+
"igniteui-react-datasources": "18.7.0-beta.2",
21+
"igniteui-react-grids": "18.7.0-beta.2",
22+
"igniteui-react-inputs": "18.7.0-beta.2",
23+
"igniteui-react-layouts": "18.7.0-beta.2",
24+
"igniteui-webcomponents": "5.0.0",
25+
"lit-html": "^2.2.0",
26+
"react": "^18.2.0",
27+
"react-dom": "^18.2.0",
28+
"react-scripts": "^5.0.1",
29+
"tslib": "^2.4.0"
30+
},
31+
"devDependencies": {
32+
"@types/jest": "^29.2.0",
33+
"@types/node": "^18.11.7",
34+
"@types/react": "^18.0.24",
35+
"@types/react-dom": "^18.0.8",
36+
"eslint": "^8.33.0",
37+
"eslint-config-react": "^1.1.7",
38+
"eslint-plugin-react": "^7.20.0",
39+
"react-app-rewired": "^2.2.1",
40+
"typescript": "^4.8.4",
41+
"worker-loader": "^3.0.8"
42+
},
43+
"browserslist": [
44+
">0.2%",
45+
"not dead",
46+
"not ie <= 11",
47+
"not op_mini all"
48+
]
49+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Sample | Ignite UI | React | infragistics</title>
5+
<link rel="shortcut icon" href="https://static.infragistics.com/xplatform/images/browsers/react.png" >
6+
<link rel="stylesheet" href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css" />
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
</body>
11+
</html>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"infiniteLoopProtection": false,
3+
"hardReloadOnChange": false,
4+
"view": "browser"
5+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* shared styles are loaded from: */
2+
/* https://static.infragistics.com/xplatform/css/samples */
3+
.pivot-container {
4+
display: flex;
5+
flex: 1 1 auto;
6+
order: 0;
7+
align-items: stretch;
8+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom/client';
3+
import './index.css';
4+
import { SALES_DATA_NEW as pivotData } from './salesDataNew';
5+
import { IgrPivotAggregator, IgrPivotConfiguration, IgrPivotDataSelector, IgrPivotDataSelectorModule,
6+
IgrPivotDimension, IgrPivotGrid, IgrPivotGridModule, IgrPivotValue, PivotAggregationType } from 'igniteui-react-grids';
7+
8+
import 'igniteui-react-grids/grids/combined';
9+
import 'igniteui-react-grids/grids/themes/light/bootstrap.css';
10+
11+
const mods: any[] = [
12+
IgrPivotGridModule,
13+
IgrPivotDataSelectorModule
14+
];
15+
mods.forEach((m) => m.register());
16+
17+
export default function App() {
18+
let grid: IgrPivotGrid;
19+
const gridRef = (r: IgrPivotGrid) => {
20+
grid = r;
21+
}
22+
const selector = (selector: IgrPivotDataSelector) => {
23+
selector.grid = grid;
24+
}
25+
const pivotConfiguration = new IgrPivotConfiguration();
26+
const rowDim = new IgrPivotDimension();
27+
rowDim.enabled = true;
28+
rowDim.memberName = "Date";
29+
30+
const colDim1 = new IgrPivotDimension();
31+
colDim1.enabled = true;
32+
colDim1.memberName = "Country";
33+
34+
const colDim2 = new IgrPivotDimension();
35+
colDim2.enabled = true;
36+
colDim2.memberName = "Product";
37+
38+
const aggregate1 = new IgrPivotAggregator();
39+
aggregate1.aggregatorName = PivotAggregationType.SUM;
40+
aggregate1.key = "SUM";
41+
42+
const val1 = new IgrPivotValue();
43+
val1.enabled = true;
44+
val1.member = "Sales";
45+
val1.aggregate = aggregate1;
46+
47+
const val2 = new IgrPivotValue();
48+
val2.enabled = true;
49+
val2.member = "Profit";
50+
val2.aggregate = aggregate1;
51+
52+
pivotConfiguration.rows = [rowDim];
53+
pivotConfiguration.columns = [colDim1, colDim2];
54+
pivotConfiguration.values = [val1, val2];
55+
56+
return (
57+
<>
58+
<div className="container sample ig-typography">
59+
<div className="container fill">
60+
<div className="pivot-container">
61+
<div>
62+
<IgrPivotGrid data={pivotData} ref={gridRef} pivotConfiguration={pivotConfiguration}>
63+
</IgrPivotGrid>
64+
</div>
65+
<IgrPivotDataSelector ref={selector}></IgrPivotDataSelector>
66+
</div>
67+
</div>
68+
</div>
69+
</>
70+
);
71+
}
72+
73+
// rendering above component in the React DOM
74+
const root = ReactDOM.createRoot(document.getElementById('root'));
75+
root.render(<App />);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="react-scripts" />

0 commit comments

Comments
 (0)