AG-1329 Add modularisation mechanism

This commit is contained in:
Sean Landsman
2019-10-09 18:41:11 +01:00
parent 894d971f0e
commit 46c26f074e
7 changed files with 12 additions and 4 deletions

View File

@@ -35,6 +35,7 @@ module.exports = {
}, },
resolve: { resolve: {
alias: { alias: {
"ag-grid-community/modules": path.resolve('./node_modules/ag-grid-community/dist/es2015/modules'),
"ag-grid-community": path.resolve('./node_modules/ag-grid-community'), "ag-grid-community": path.resolve('./node_modules/ag-grid-community'),
"ag-grid-enterprise": path.resolve('./node_modules/ag-grid-enterprise'), "ag-grid-enterprise": path.resolve('./node_modules/ag-grid-enterprise'),
react: path.resolve('./node_modules/react') react: path.resolve('./node_modules/react')
@@ -48,4 +49,4 @@ module.exports = {
port: 8080, port: 8080,
historyApiFallback: true historyApiFallback: true
} }
}; };

View File

@@ -61,6 +61,7 @@
"webpack-dev-server": "3.4.1" "webpack-dev-server": "3.4.1"
}, },
"dependencies": { "dependencies": {
"@ag-community/client-side-row-model": "^21.2.0",
"ag-grid-community": "^21.0.0", "ag-grid-community": "^21.0.0",
"ag-grid-enterprise": "^21.0.0", "ag-grid-enterprise": "^21.0.0",
"ag-grid-react": "^21.2.2", "ag-grid-react": "^21.2.2",

View File

@@ -3,6 +3,8 @@ import {Redirect, Route, Switch} from "react-router-dom";
import NavItem from "./NavItem"; import NavItem from "./NavItem";
import '@ag-community/client-side-row-model'
import RichGridDeclarativeExample from "./richGridDeclarativeExample/RichGridDeclarativeExample"; import RichGridDeclarativeExample from "./richGridDeclarativeExample/RichGridDeclarativeExample";
import SimpleReduxDynamicExample from "./simpleReduxDynamicComponentExample/SimpleReduxExample"; import SimpleReduxDynamicExample from "./simpleReduxDynamicComponentExample/SimpleReduxExample";
import SimpleReduxHookExample from "./simpleReduxHooksExample/SimpleReduxHookExample"; import SimpleReduxHookExample from "./simpleReduxHooksExample/SimpleReduxHookExample";

View File

@@ -12,8 +12,11 @@ import HeaderGroupComponent from './HeaderGroupComponent.jsx';
import SortableHeaderComponent from './SortableHeaderComponent.jsx'; import SortableHeaderComponent from './SortableHeaderComponent.jsx';
import "./RichGridDeclarativeExample.css"; import "./RichGridDeclarativeExample.css";
import '@ag-community/client-side-row-model'
// take this line out if you do not want to use ag-Grid-Enterprise // take this line out if you do not want to use ag-Grid-Enterprise
import "ag-grid-enterprise"; // import "ag-grid-enterprise";
export default class RichGridDeclarativeExample extends Component { export default class RichGridDeclarativeExample extends Component {
constructor(props) { constructor(props) {

View File

@@ -1,6 +1,5 @@
import React, {Component} from "react"; import React, {Component} from "react";
import {connect} from "react-redux"; import {connect} from "react-redux";
import {AgGridReact} from "ag-grid-react"; import {AgGridReact} from "ag-grid-react";
import PriceRenderer from "./PriceRenderer"; import PriceRenderer from "./PriceRenderer";

View File

@@ -1,8 +1,9 @@
import React, {Component} from 'react'; import React, {Component} from 'react';
import SimpleCellRenderer from './simpleCellRenderer.jsx'; import SimpleCellRenderer from './simpleCellRenderer.jsx';
import {AgGridReact} from 'ag-grid-react'; import {AgGridReact} from 'ag-grid-react';
import '@ag-community/client-side-row-model'
// put this line in to use ag-Grid enterprise // put this line in to use ag-Grid enterprise
// import 'ag-grid-enterprise'; // import 'ag-grid-enterprise';

View File

@@ -5,6 +5,7 @@ import {render} from "react-dom";
import {Provider} from "react-redux"; import {Provider} from "react-redux";
import '@ag-community/client-side-row-model'
import "ag-grid-community/dist/styles/ag-grid.css"; import "ag-grid-community/dist/styles/ag-grid.css";
import "ag-grid-community/dist/styles/ag-theme-fresh.css"; import "ag-grid-community/dist/styles/ag-theme-fresh.css";