Merge branch 'b19.0.0' into Master

This commit is contained in:
rmc-software
2018-10-31 15:42:56 +00:00
13 changed files with 59 additions and 32 deletions

View File

@@ -20,7 +20,11 @@ module.exports = {
include: SRC_DIR,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015', 'stage-0']
presets: ['@babel/preset-react', '@babel/preset-env'],
plugins: [
require('@babel/plugin-proposal-function-bind'),
require('@babel/plugin-proposal-class-properties')
]
}
},
{
@@ -42,5 +46,6 @@ module.exports = {
},
devServer: {
port: 8080,
historyApiFallback: true
}
};

View File

@@ -20,7 +20,11 @@ module.exports = {
include: SRC_DIR,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015', 'stage-0']
presets: ['@babel/preset-react', '@babel/preset-env'],
plugins: [
require('@babel/plugin-proposal-function-bind'),
require('@babel/plugin-proposal-class-properties')
]
}
}
]

View File

@@ -20,7 +20,11 @@ module.exports = {
include: SRC_DIR,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015', 'stage-0']
presets: ['@babel/preset-react', '@babel/preset-env'],
plugins: [
require('@babel/plugin-proposal-function-bind'),
require('@babel/plugin-proposal-class-properties')
]
}
}
]

View File

@@ -1,6 +1,6 @@
{
"name": "ag-grid-react-example",
"version": "19.0.0",
"version": "19.1.1",
"description": "Example Reach applicaiton using ag-Grid.",
"main": "dist/ag-grid-react-example.js",
"scripts": {
@@ -37,36 +37,36 @@
},
"homepage": "http://www.ag-grid.com/",
"devDependencies": {
"babel-core": "6.26.3",
"babel-loader": "7.1.5",
"babel-preset-es2015": "6.24.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-0": "6.24.1",
"babel-preset-stage-1": "6.24.1",
"@babel/core": "7.1.2",
"babel-loader": "8.0.4",
"@babel/preset-env": "7.1.0",
"@babel/preset-react": "7.0.0",
"@babel/plugin-proposal-class-properties": "7.1.0",
"@babel/plugin-proposal-function-bind": "7.0.0",
"css-loader": "1.0.0",
"file-loader": "1.1.11",
"file-loader": "2.0.0",
"gulp": "3.9.1",
"merge2": "1.0.x",
"merge2": "^1.2.3",
"mkdirp": "0.5.1",
"ncp": "2.0.0",
"prop-types": "15.6.2",
"rimraf": "2.5.x",
"style-loader": "0.21.0",
"rimraf": "~2.6.2",
"style-loader": "~0.23.0",
"webpack": "^4.16.1",
"webpack-cli": "^3.0.8",
"webpack-dev-server": "^3.1.4"
},
"dependencies": {
"ag-grid-community": "^19.0.0",
"ag-grid-enterprise": "^19.0.0",
"ag-grid-react": "^19.0.0",
"bootstrap": "3.3.7",
"ag-grid-community": "^19.1.0",
"ag-grid-enterprise": "^19.1.0",
"ag-grid-react": "^19.1.0",
"bootstrap": "4.1.3",
"d3": "4.9.1",
"lodash": "4.17.4",
"react": "16.4.1",
"react-dom": "16.4.1",
"lodash": "^4.17.11",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-redux": "5.0.7",
"react-router-dom": "4.3.1",
"redux": "4.0.0"
"redux": "^4.0.1"
}
}

View File

@@ -8,7 +8,7 @@ import SimpleReduxDynamicExample from "./simpleReduxDynamicComponentExample/Simp
const SideBar = () => (
<div style={{float: "left", width: 335, marginRight: 25}}>
<ul className="nav nav-pills nav-stacked">
<ul className="nav nav-pills">
<NavItem to='/rich-grid-declarative'>Rich Grid with Declarative Markup</NavItem>
<NavItem to='/simple-redux-dynamic'>Simple Redux Dynamic Component Example</NavItem>
</ul>

View File

@@ -6,8 +6,8 @@ import {Link, Route} from 'react-router-dom'
export default function NavItem({children, to, exact}) {
return (
<Route path={to} exact={exact} children={({match}) => (
<li className={match ? 'active' : null}>
<Link to={to}>{children}</Link>
<li className="nav-item">
<Link className={match ? 'nav-link active' : 'nav-link'} to={to}>{children}</Link>
</li>
)}/>
)

View File

@@ -16,6 +16,10 @@
line-height: 1
}
h1 {
font-size: 1.5rem;
}
div.card-body > a {
margin-top: 5px
}

View File

@@ -232,7 +232,7 @@ export default class RichGridDeclarativeExample extends Component {
</AgGridColumn>
</AgGridReact>
</div>
<div>
<div style={{marginTop: 10}}>
<div className="row">
<div className="col-sm-12"><h1>Rich Grid with Declarative Markup Example</h1></div>
</div>

View File

@@ -6,6 +6,8 @@ import {connect} from "react-redux";
import PriceRenderer from "./PriceRenderer";
const ThemeContext = React.createContext('light');
/*
* This component serves to display the row data (provided by redux)
*/

View File

@@ -1,6 +1,8 @@
import React, {Component} from "react";
import {connect} from "react-redux";
import FontContext from './fontContext'
class PriceRenderer extends Component {
constructor(props) {
super(props);
@@ -18,7 +20,9 @@ class PriceRenderer extends Component {
render() {
return (
<span>{this.props.currencySymbol}{this.state.convertedValue}</span>
<FontContext.Consumer>
{fontWeight => <span style={{fontWeight}}> {this.props.currencySymbol}{this.state.convertedValue}</span> }
</FontContext.Consumer>
);
}
@@ -36,5 +40,5 @@ export default connect(
},
null,
null,
{ withRef: true } // must be supplied for react/redux when using GridOptions.reactNext
{withRef: true} // must be supplied for react/redux when using GridOptions.reactNext
)(PriceRenderer);

View File

@@ -9,6 +9,8 @@ import GridComponent from "./GridComponent";
import gridData from "./gridDataReducer";
import FontContext from './fontContext'
let store = createStore(gridData);
/*
@@ -26,7 +28,9 @@ export default class SimpleReduxExample extends Component {
<div>
<h1>Simple Redux Example using Connected React Components</h1>
<HeaderComponent/>
<GridComponent/>
<FontContext.Provider value="bold">
<GridComponent/>
</FontContext.Provider>
</div>
</Provider>
)

View File

@@ -0,0 +1,3 @@
import React from "react";
export default React.createContext('normal');

View File

@@ -3,9 +3,6 @@ import {connect} from "react-redux";
import {AgGridReact} from "ag-grid-react";
import assign from "lodash/assign";
import uniq from "lodash/uniq";
class FxQuoteMatrix extends Component {
constructor(props) {
super(props);