Skip to content
This repository was archived by the owner on Aug 19, 2024. It is now read-only.

Commit f860a74

Browse files
Merge branch 'b14.2.0'
2 parents fc76e85 + 90ec337 commit f860a74

File tree

152 files changed

+1732
-9386
lines changed

Some content is hidden

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

152 files changed

+1732
-9386
lines changed
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const path = require('path');
22

3-
const SRC_DIR = path.resolve(__dirname, 'src');
3+
const SRC_DIR = path.resolve(__dirname, '../src-examples');
44

55
module.exports = {
66
entry: SRC_DIR + "/index.js",
77
output: {
8-
path: __dirname,
8+
path: path.resolve(__dirname, '../'),
99
filename: "dist/react-examples.js"
1010
},
1111
module: {
@@ -30,7 +30,9 @@ module.exports = {
3030
},
3131
resolve: {
3232
alias: {
33-
"ag-grid-root" : __dirname + "/node_modules/ag-grid"
33+
"ag-grid": path.resolve('./node_modules/ag-grid'),
34+
"ag-grid-enterprise": path.resolve('./node_modules/ag-grid-enterprise'),
35+
react: path.resolve('./node_modules/react')
3436
},
3537
extensions: ['', '.js', '.jsx']
3638
},

config/webpack.config.large.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const path = require('path');
2+
3+
const SRC_DIR = path.resolve(__dirname, '../src-large-data');
4+
5+
module.exports = {
6+
entry: SRC_DIR + "/index.js",
7+
output: {
8+
path: path.resolve(__dirname, '../'),
9+
filename: "dist/react-large.js"
10+
},
11+
module: {
12+
loaders: [
13+
{
14+
test: /\.css$/,
15+
loader: "style!css"
16+
},
17+
{
18+
test: /\.js$|\.jsx$/,
19+
include: SRC_DIR,
20+
loader: 'babel-loader',
21+
query: {
22+
presets: ['react', 'es2015', 'stage-0']
23+
}
24+
}
25+
]
26+
},
27+
resolve: {
28+
alias: {
29+
"ag-grid": path.resolve('./node_modules/ag-grid'),
30+
"ag-grid-enterprise": path.resolve('./node_modules/ag-grid-enterprise'),
31+
react: path.resolve('./node_modules/react')
32+
},
33+
extensions: ['', '.js', '.jsx']
34+
}
35+
};
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const path = require('path');
22

3-
const SRC_DIR = path.resolve(__dirname, 'src-trader-dashboard');
3+
const SRC_DIR = path.resolve(__dirname, '../src-trader-dashboard');
44

55
module.exports = {
66
entry: SRC_DIR + "/index.js",
77
output: {
8-
path: __dirname,
8+
path: path.resolve(__dirname, '../'),
99
filename: "dist/react-trader.js"
1010
},
1111
module: {
@@ -26,7 +26,9 @@ module.exports = {
2626
},
2727
resolve: {
2828
alias: {
29-
"ag-grid-root" : __dirname + "/node_modules/ag-grid"
29+
"ag-grid": path.resolve('./node_modules/ag-grid'),
30+
"ag-grid-enterprise": path.resolve('./node_modules/ag-grid-enterprise'),
31+
react: path.resolve('./node_modules/react')
3032
},
3133
extensions: ['', '.js', '.jsx']
3234
}

olympicWinners.json

Lines changed: 0 additions & 8618 deletions
This file was deleted.

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"name": "ag-grid-react-example",
3-
"version": "14.0.0",
3+
"version": "14.2.0",
44
"description": "Example Reach applicaiton using ag-Grid.",
55
"main": "dist/ag-grid-react-example.js",
66
"scripts": {
7-
"trader": "webpack-dev-server --content-base src-trader-dashboard/ --config webpack.config.trader.js --progress --colors --hot --inline",
8-
"examples": "webpack-dev-server --content-base src/ --config webpack.config.examples.js --progress --colors --hot --inline",
9-
"large": "webpack-dev-server --config webpack.config.large.js --progress --colors --hot --inline",
7+
"trader": "webpack-dev-server --content-base src-trader-dashboard/ --config config/webpack.config.trader.js --progress --colors --hot --inline",
8+
"examples": "webpack-dev-server --content-base src-examples/ --config config/webpack.config.examples.js --progress --colors --hot --inline",
9+
"large": "webpack-dev-server --content-base src-large-data/ --config config/webpack.config.large.js --progress --colors --hot --inline",
1010
"clean": "rimraf dist",
1111
"mkdirs": "mkdirp dist/trader/dist dist/examples/dist",
1212
"copy-examples": "ncp images dist/examples/images && ncp src/index.html dist/examples/index.html && ncp dist/react-examples.js dist/examples/dist/react-examples.js && ncp src dist/examples/src",
1313
"copy-trader": "ncp src-trader-dashboard/index.html dist/trader/index.html && ncp dist/react-trader.js dist/trader/dist/react-trader.js",
1414
"copy": "npm run copy-examples && npm run copy-trader",
15-
"build-large": "webpack --config webpack.config.large.js --progress --profile --bail",
16-
"build-examples": "webpack --config webpack.config.examples.js --progress --profile --bail",
17-
"build-dashboard": "webpack --config webpack.config.trader.js --progress --profile --bail",
15+
"build-large": "webpack --config config/webpack.config.large.js --progress --profile --bail",
16+
"build-examples": "webpack --config config/webpack.config.examples.js --progress --profile --bail",
17+
"build-dashboard": "webpack --config config/webpack.config.trader.js --progress --profile --bail",
1818
"build-all": "npm run build-examples && npm run build-dashboard",
1919
"build": "npm run clean && npm run mkdirs && npm run build-all && npm run copy",
2020
"copy-to-docs": "ncp dist/examples ../ag-grid-docs/src/framework-examples/react-examples/examples && ncp dist/trader ../ag-grid-docs/src/framework-examples/react-examples/trader",
@@ -47,7 +47,7 @@
4747
"css-loader": "0.23.x",
4848
"mkdirp": "0.5.1",
4949
"ncp": "2.0.0",
50-
"prop-types": "15.5.x",
50+
"prop-types": "15.6.0",
5151
"rimraf": "2.5.x",
5252
"style-loader": "0.13.x",
5353
"webpack": "1.12.x",
@@ -58,16 +58,16 @@
5858
"typescript": "2.3.x"
5959
},
6060
"dependencies": {
61-
"ag-grid": "14.0.x",
62-
"ag-grid-enterprise": "14.0.x",
63-
"ag-grid-react": "14.0.x",
61+
"ag-grid": "^14.0.0",
62+
"ag-grid-enterprise": "^14.0.0",
63+
"ag-grid-react": "^14.0.0",
6464
"bootstrap": "3.3.7",
6565
"d3": "4.9.1",
6666
"file-loader": "0.11.1",
6767
"lodash": "4.17.4",
68-
"react": "15.6.x",
69-
"react-dom": "15.6.x",
70-
"react-dom-factories": "1.0.0",
68+
"react": "16.0.0",
69+
"react-dom": "16.0.0",
70+
"react-dom-factories": "1.0.2",
7171
"react-redux": "5.0.x",
7272
"react-router-dom": "4.2.x",
7373
"redux": "3.6.x",

src-examples/App.jsx

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import React, {Component} from "react";
2+
import {Redirect, Route, Switch} from "react-router-dom";
3+
4+
import NavItem from "./NavItem";
5+
6+
import DynamicComponentsExample from "./dynamicComponentExample/DynamicComponentsExample";
7+
import RichGridExample from "./richGridExample/RichGridExample";
8+
import RichGridDeclarativeExample from "./richGridDeclarativeExample/RichGridDeclarativeExample";
9+
import RichComponentsExample from "./richComponentExample/RichComponentsExample";
10+
import EditorComponentsExample from "./editorComponentExample/EditorComponentsExample";
11+
import PinnedRowComponentExample from "./pinnedRowExample/PinnedRowComponentExample";
12+
import FullWidthComponentExample from "./fullWidthExample/FullWidthComponentExample";
13+
import GroupedRowInnerRendererComponentExample from "./groupedRowInnerRendererExample/GroupedRowInnerRendererComponentExample";
14+
import FilterComponentExample from "./filterComponentExample/FilterComponentExample";
15+
import SimpleReduxExample from "./simpleReduxExample/SimpleReduxExample";
16+
import FloatingFilterGridExample from "./floatingFilter/FloatingFilterGridExample";
17+
import SimpleReduxDynamicExample from "./simpleReduxDynamicComponentExample/SimpleReduxExample";
18+
19+
const SideBar = () => (
20+
<div style={{float: "left", width: 335, marginRight: 25}}>
21+
<ul className="nav nav-pills nav-stacked">
22+
<NavItem to='/rich-grid'>Rich Grid Example</NavItem>
23+
<NavItem to='/rich-grid-declarative'>Rich Grid with Declarative Markup</NavItem>
24+
<NavItem to='/dynamic'>Dynamic React Component Example</NavItem>
25+
<NavItem to='/rich-dynamic'>Dynamic React Components - Richer Example</NavItem>
26+
<NavItem to='/editor'>Cell Editor Component Example</NavItem>
27+
<NavItem to='/floating-row'>Floating Row Renderer Example</NavItem>
28+
<NavItem to='/full-width'>Full Width Renderer Example</NavItem>
29+
<NavItem to='/group-row'>Grouped Row Inner Renderer Example</NavItem>
30+
<NavItem to='/filter'>Filters Component Example</NavItem>
31+
<NavItem to='/floating-filter'>Floating Filters</NavItem>
32+
<NavItem to='/simple-redux'>Simple Redux Example</NavItem>
33+
<NavItem to='/simple-redux-dynamic'>Simple Redux Dynamic Component Example</NavItem>
34+
</ul>
35+
</div>
36+
);
37+
38+
class App extends Component {
39+
render() {
40+
return (
41+
<div style={{display: "inline-block", width: "100%"}}>
42+
<SideBar/>
43+
<div style={{float: "left"}}>
44+
<Switch>
45+
<Redirect from="/" exact to="/rich-grid"/>
46+
<Route exact path='/rich-grid' component={RichGridExample}/>
47+
<Route exact path='/rich-grid-declarative' component={RichGridDeclarativeExample}/>
48+
<Route exact path='/dynamic' component={DynamicComponentsExample}/>
49+
<Route exact path='/rich-dynamic' component={RichComponentsExample}/>
50+
<Route exact path='/editor' component={EditorComponentsExample}/>
51+
<Route exact path='/floating-row' component={PinnedRowComponentExample}/>
52+
<Route exact path='/full-width' component={FullWidthComponentExample}/>
53+
<Route exact path='/group-row' component={GroupedRowInnerRendererComponentExample}/>
54+
<Route exact path='/filter' component={FilterComponentExample}/>
55+
<Route exact path='/floating-filter' component={FloatingFilterGridExample}/>
56+
<Route exact path='/simple-redux' component={SimpleReduxExample}/>
57+
<Route exact path='/simple-redux-dynamic' component={SimpleReduxDynamicExample}/>
58+
</Switch>
59+
</div>
60+
</div>
61+
)
62+
}
63+
}
64+
65+
export default App

src/dynamicComponentExample/ChildMessageRenderer.jsx renamed to src-examples/dynamicComponentExample/ChildMessageRenderer.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ import React, {Component} from "react";
33
export default class ChildMessageRenderer extends Component {
44
constructor(props) {
55
super(props);
6-
7-
this.invokeParentMethod = this.invokeParentMethod.bind(this);
86
}
97

10-
invokeParentMethod() {
11-
this.props.context.componentParent.methodFromParent(`Row: ${this.props.node.rowIndex}, Col: ${this.props.colDef.headerName}`)
12-
}
8+
invokeParentMethod = () => {
9+
let rowIndex = this.props.node.rowIndex;
10+
let headerName = this.props.colDef.headerName;
11+
12+
this.props.context.componentParent.methodFromParent(`Row: ${rowIndex}, Col: ${headerName}`)
13+
};
1314

1415
render() {
1516
return (
File renamed without changes.

src/dynamicComponentExample/CurrencyRenderer.jsx renamed to src-examples/dynamicComponentExample/CurrencyRenderer.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default class CurrencyRenderer extends Component {
99
}
1010
}
1111

12-
formatValueToCurrency(currency, value) {
12+
static formatValueToCurrency(currency, value) {
1313
return `${currency}${value}`
1414
}
1515

@@ -25,7 +25,7 @@ export default class CurrencyRenderer extends Component {
2525

2626
render() {
2727
return (
28-
<span>{this.formatValueToCurrency('EUR', this.state.value)}</span>
28+
<span>{CurrencyRenderer.formatValueToCurrency('EUR', this.state.value)}</span>
2929
);
3030
}
3131
};

0 commit comments

Comments
 (0)