From ce918a7f89d93d2c8e03e1d64a42b6c4be991f3c Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Wed, 27 Jun 2018 14:14:45 +0800 Subject: [PATCH 1/6] add redux --- README.md | 36 ++- configs/webpack/common.js | 192 +++++++------- package-lock.json | 482 ++++++++++++++++++++++++----------- package.json | 12 +- src/envconfigs/dev.js | 0 src/envconfigs/index.js | 5 + src/envconfigs/prd.js | 0 src/index.html.ejs | 2 +- src/reducers/index.js | 9 + src/reducers/initialStore.js | 3 + src/store/dev.js | 15 ++ src/store/index.js | 5 + src/store/prd.js | 14 + 13 files changed, 519 insertions(+), 256 deletions(-) create mode 100644 src/envconfigs/dev.js create mode 100644 src/envconfigs/index.js create mode 100644 src/envconfigs/prd.js create mode 100644 src/reducers/index.js create mode 100644 src/reducers/initialStore.js create mode 100644 src/store/dev.js create mode 100644 src/store/index.js create mode 100644 src/store/prd.js diff --git a/README.md b/README.md index 0ec8a48..6d3d487 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # React Webpack Babel Starter + Minimal starter kit with hot module replacement (HMR) for rapid development. * **[React](https://facebook.github.io/react/)** (16.x) @@ -8,24 +9,30 @@ Minimal starter kit with hot module replacement (HMR) for rapid development. * [LESS](http://lesscss.org/) * [Jest](https://facebook.github.io/jest/) - Testing framework for React applications * Image loading/minification using [Image Webpack Loader](https://github.com/tcoopman/image-webpack-loader) -* Code quality (linting) for JavaScript and SASS/CSS. +* Code quality (linting) for JavaScript and LESS/CSS. +* [Redux](https://redux.js.org/) Manage the Component states. +* [Redux-Thunk](https://github.com/reduxjs/redux-thunk) The middle-ware of Redux +* [Redux-toolbelt](https://github.com/welldone-software/redux-toolbelt) A set of tools for quicker, easier, less verbose and safer Redux development by [welldone-software](http://welldone-software.com/). # Original Source Code + The source had been clone from [vikpe/react-webpack-babel-starter](https://github.com/vikpe/react-webpack-babel-starter) and on top of that I added some useful packages includes the Finished the [Material-Dashboard-React](https://github.com/creativetimofficial/material-dashboard-react) and Redux integration ## Installation + 1. Clone/download repo 2. `npm install` ## Usage -**Development** + +### Development `npm run start-dev` * Build app continously (HMR enabled) * App served @ `http://localhost:8080` -**Production** +### Production `npm run start-prod` @@ -34,19 +41,20 @@ The source had been clone from [vikpe/react-webpack-babel-starter](https://githu --- -**All commands** +### All commands -| Command | Description | -| -------------------- | ----------------------------------------------------------------------- | -| `npm run start-dev` | Build app continously (HMR enabled) and serve @ `http://localhost:8080` | -| `npm run start-prod` | Build app once (HMR disabled) and serve @ `http://localhost:3000` | -| `npm run build` | Build app to `/dist/` | -| `npm run test` | Run tests | -| `npm run lint` | Run JavaScript and SASS linter | -| `npm run lint:js` | Run JavaScript linter | -| `npm run lint:sass` | Run SASS linter | -| `npm run start` | (alias of `npm run start-dev`) | +| Command | Description | +| -------------------- | ------------------------------------------------------------------------ | +| `npm run start-dev` | Build app continuously (HMR enabled) and serve @ `http://localhost:8080` | +| `npm run start-prod` | Build app once (HMR disabled) and serve @ `http://localhost:3000` | +| `npm run build` | Build app to `/dist/` | +| `npm run test` | Run tests | +| `npm run lint` | Run JavaScript and LESS linter | +| `npm run lint:js` | Run JavaScript linter | +| `npm run lint:less` | Run LESS linter | +| `npm run start` | (alias of `npm run start-dev`) | ## See also + * [React Webpack Typescript Starter](https://github.com/vikpe/react-webpack-typescript-starter) * [Isomorphic Webapp Starter](https://github.com/vikpe/isomorphic-webapp-starter) diff --git a/configs/webpack/common.js b/configs/webpack/common.js index 2348d78..2a88fdc 100644 --- a/configs/webpack/common.js +++ b/configs/webpack/common.js @@ -1,6 +1,6 @@ // shared config (dev and prod) const { - resolve + resolve } = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); @@ -8,103 +8,103 @@ const webpack = require('webpack'); //const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { - resolve: { - extensions: ['.js', '.jsx'], - }, - context: resolve(__dirname, '../../src'), - module: { - rules: [{ - test: /\.(js|jsx)$/, - use: { - loader: "babel-loader", - }, - exclude: /node_modules/, + resolve: { + extensions: ['.js', '.jsx'], }, - { - test: /\.css$/, - use: [ - 'style-loader', - { - loader: 'css-loader', - options: { - importLoaders: 1 - } - }, - 'postcss-loader', - ], + context: resolve(__dirname, '../../src'), + module: { + rules: [{ + test: /\.(js|jsx)$/, + use: { + loader: "babel-loader", + }, + exclude: /node_modules/, + }, + { + test: /\.css$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1 + } + }, + 'postcss-loader', + ], + }, + // { + // test: /\.scss$/, + // loaders: [ + // 'style-loader', + // {loader: 'css-loader', options: {importLoaders: 1}}, + // 'postcss-loader', + // 'sass-loader', + // ], + // }, + { + rules: [{ + test: /\.less$/, + use: [{ + loader: "style-loader" // creates style nodes from JS strings + }, { + loader: "css-loader" // translates CSS into CommonJS + }, { + loader: "less-loader" // compiles Less to CSS + }] + }] + }, + { + test: /\.(jpe?g|png|gif|svg)$/i, + loaders: [ + 'file-loader?hash=sha512&digest=hex&name=img/[name].[hash].[ext]', + 'image-webpack-loader?bypassOnDebug&optipng.optimizationLevel=7&gifsicle.interlaced=false', + ], + }, + { + test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, + loader: "file-loader", + options: { + name: 'fonts/[name].[ext]' + } + }, + { + test: /\.(woff|woff2)$/, + loader: "file-loader?name=fonts/[name].[ext]" + }, + { + test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, + loader: "url-loader?mimetype=application/octet-stream" + }, + // { + // test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, + // loader: "url-loader?mimetype=image/svg+xml" + // }, + // { + // test: /\.svg$/, + // exclude: '/node_modules/', + // loader: 'babel-loader!svg-react-loader' + // } + ], }, - // { - // test: /\.scss$/, - // loaders: [ - // 'style-loader', - // {loader: 'css-loader', options: {importLoaders: 1}}, - // 'postcss-loader', - // 'sass-loader', - // ], - // }, - { - rules: [{ - test: /\.less$/, - use: [{ - loader: "style-loader" // creates style nodes from JS strings - }, { - loader: "css-loader" // translates CSS into CommonJS - }, { - loader: "less-loader" // compiles Less to CSS - }] - }] - }, - { - test: /\.(jpe?g|png|gif|svg)$/i, - loaders: [ - 'file-loader?hash=sha512&digest=hex&name=img/[name].[hash].[ext]', - 'image-webpack-loader?bypassOnDebug&optipng.optimizationLevel=7&gifsicle.interlaced=false', - ], - }, - { - test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, - loader: "file-loader", - options: { - name: 'fonts/[name].[ext]' - } - }, - { - test: /\.(woff|woff2)$/, - loader: "file-loader?name=fonts/[name].[ext]" + plugins: [ + // new CopyWebpackPlugin([{ + // from: './assets/img', + // to: __dirname + '/dist/assets/img' + // }]), + new HtmlWebpackPlugin({ + template: 'index.html.ejs', + }), + new webpack.ProvidePlugin({ + "React": "react", + 'ReactDOM': 'react-dom', + }), + ], + externals: { + 'React': 'react', + 'ReactDOM': 'react-dom', }, - { - test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, - loader: "url-loader?mimetype=application/octet-stream" + performance: { + hints: false, }, - // { - // test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, - // loader: "url-loader?mimetype=image/svg+xml" - // }, - // { - // test: /\.svg$/, - // exclude: '/node_modules/', - // loader: 'babel-loader!svg-react-loader' - // } - ], - }, - plugins: [ - // new CopyWebpackPlugin([{ - // from: './assets/img', - // to: __dirname + '/dist/assets/img' - // }]), - new HtmlWebpackPlugin({ - template: 'index.html.ejs', - }), - new webpack.ProvidePlugin({ - "React": "react", - 'ReactDOM': 'react-dom', - }), - ], - externals: { - 'React': 'react', - 'ReactDOM': 'react-dom', - }, - performance: { - hints: false, - }, }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 91f0800..4819851 100644 --- a/package-lock.json +++ b/package-lock.json @@ -145,8 +145,8 @@ }, "@webassemblyjs/ast": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.5.12.tgz", - "integrity": "sha512-bmTBEKuuhSU6dC95QIW250xO769cdYGx9rWn3uBLTw2pUpud0Z5kVuMw9m9fqbNzGeuOU2HpyuZa+yUt2CTEDA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/ast/-/ast-1.5.12.tgz", + "integrity": "sha1-qay8s/JTM8Tt+h/fMYaxzPZOZmQ=", "dev": true, "requires": { "@webassemblyjs/helper-module-context": "1.5.12", @@ -158,8 +158,8 @@ "dependencies": { "debug": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -169,20 +169,20 @@ }, "@webassemblyjs/floating-point-hex-parser": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.5.12.tgz", - "integrity": "sha512-epTvkdwOIPpTE9edHS+V+shetYzpTbd91XOzUli1zAS0+NSgSe6ZsNggIqUNzhma1s4bN2f/m8c6B1NMdCERAg==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.5.12.tgz", + "integrity": "sha1-DzYET/6WUkaM565aCHFqTu/5zZw=", "dev": true }, "@webassemblyjs/helper-api-error": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.5.12.tgz", - "integrity": "sha512-Goxag86JvLq8ucHLXFNSLYzf9wrR+CJr37DsESTAzSnGoqDTgw5eqiXSQVd/D9Biih7+DIn8UIQCxMs8emRRwg==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/helper-api-error/-/helper-api-error-1.5.12.tgz", + "integrity": "sha1-BUZoM/8vnYlToaMndG4dES6mKq8=", "dev": true }, "@webassemblyjs/helper-buffer": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.5.12.tgz", - "integrity": "sha512-tJNUjttL5CxiiS/KLxT4/Zk0Nbl/poFhztFxktb46zoQEUWaGHR9ZJ0SnvE7DbFX5PY5JNJDMZ0Li4lm246fWw==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/helper-buffer/-/helper-buffer-1.5.12.tgz", + "integrity": "sha1-Hw3lqqvv74muwxT3+XAAnNFZxz0=", "dev": true, "requires": { "debug": "3.1.0" @@ -190,8 +190,8 @@ "dependencies": { "debug": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -201,8 +201,8 @@ }, "@webassemblyjs/helper-code-frame": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.5.12.tgz", - "integrity": "sha512-0FrJgiST+MQDMvPigzs+UIk1vslLIqGadkEWdn53Lr0NsUC2JbheG9QaO3Zf6ycK2JwsHiUpGaMFcHYXStTPMA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.5.12.tgz", + "integrity": "sha1-PNwZUwk3YNHA8Mr3RczWK9tmJ8c=", "dev": true, "requires": { "@webassemblyjs/wast-printer": "1.5.12" @@ -210,14 +210,14 @@ }, "@webassemblyjs/helper-fsm": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.5.12.tgz", - "integrity": "sha512-QBHZ45VPUJ7UyYKvUFoaxrSS9H5hbkC9U7tdWgFHmnTMutkXSEgDg2gZg3I/QTsiKOCIwx4qJUJwPd7J4D5CNQ==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/helper-fsm/-/helper-fsm-1.5.12.tgz", + "integrity": "sha1-a8FEKwN/jjDy5XuYfO5cgG3RUCc=", "dev": true }, "@webassemblyjs/helper-module-context": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.5.12.tgz", - "integrity": "sha512-SCXR8hPI4JOG3cdy9HAO8W5/VQ68YXG/Hfs7qDf1cd64zWuMNshyEour5NYnLMVkrrtc0XzfVS/MdeV94woFHA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/helper-module-context/-/helper-module-context-1.5.12.tgz", + "integrity": "sha1-tViMp4szuKDadfmrjHaaNwe6qGE=", "dev": true, "requires": { "debug": "3.1.0", @@ -226,8 +226,8 @@ "dependencies": { "debug": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -237,14 +237,14 @@ }, "@webassemblyjs/helper-wasm-bytecode": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.5.12.tgz", - "integrity": "sha512-0Gz5lQcyvElNVbOTKwjEmIxGwdWf+zpAW/WGzGo95B7IgMEzyyfZU+PrGHDwiSH9c0knol9G7smQnY0ljrSA6g==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.5.12.tgz", + "integrity": "sha1-0So4WduIKkSIkahmoF0L5jeFthY=", "dev": true }, "@webassemblyjs/helper-wasm-section": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.5.12.tgz", - "integrity": "sha512-ge/CKVKBGpiJhFN9PIOQ7sPtGYJhxm/mW1Y3SpG1L6XBunfRz0YnLjW3TmhcOEFozIVyODPS1HZ9f7VR3GBGow==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.5.12.tgz", + "integrity": "sha1-/5/hUH02itQ355adJejBaT2sGIQ=", "dev": true, "requires": { "@webassemblyjs/ast": "1.5.12", @@ -256,8 +256,8 @@ "dependencies": { "debug": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -267,8 +267,8 @@ }, "@webassemblyjs/ieee754": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.5.12.tgz", - "integrity": "sha512-F+PEv9QBzPi1ThLBouUJbuxhEr+Sy/oua1ftXFKHiaYYS5Z9tKPvK/hgCxlSdq+RY4MSG15jU2JYb/K5pkoybg==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/ieee754/-/ieee754-1.5.12.tgz", + "integrity": "sha1-7pV0vFWIiPEwl84+eQDf8jTqGaQ=", "dev": true, "requires": { "ieee754": "1.1.12" @@ -276,8 +276,8 @@ }, "@webassemblyjs/leb128": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.5.12.tgz", - "integrity": "sha512-cCOx/LVGiWyCwVrVlvGmTdnwHzIP4+zflLjGkZxWpYCpdNax9krVIJh1Pm7O86Ox/c5PrJpbvZU1cZLxndlPEw==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/leb128/-/leb128-1.5.12.tgz", + "integrity": "sha1-AwjuxlJ2XuVn2KX6EItPCyW0WOE=", "dev": true, "requires": { "leb": "0.3.0" @@ -285,14 +285,14 @@ }, "@webassemblyjs/utf8": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.5.12.tgz", - "integrity": "sha512-FX8NYQMiTRU0TfK/tJVntsi9IEKsedSsna8qtsndWVE0x3zLndugiApxdNMIOoElBV9o4j0BUqR+iwU58QfPxQ==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/utf8/-/utf8-1.5.12.tgz", + "integrity": "sha1-1ZFiIu8xS/YNaAbtWsBFmJv9ks4=", "dev": true }, "@webassemblyjs/wasm-edit": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.5.12.tgz", - "integrity": "sha512-r/oZAyC4EZl0ToOYJgvj+b0X6gVEKQMLT34pNNbtvWBehQOnaSXvVUA5FIYlH8ubWjFNAFqYaVGgQTjR1yuJdQ==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/wasm-edit/-/wasm-edit-1.5.12.tgz", + "integrity": "sha1-ghyTWOZEoWbyyRDlrxtGznlaF6o=", "dev": true, "requires": { "@webassemblyjs/ast": "1.5.12", @@ -308,8 +308,8 @@ "dependencies": { "debug": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -319,8 +319,8 @@ }, "@webassemblyjs/wasm-gen": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.5.12.tgz", - "integrity": "sha512-LTu+cr1YRxGGiVIXWhei/35lXXEwTnQU18x4V/gE+qCSJN21QcVTMjJuasTUh8WtmBZtOlqJbOQIeN7fGnHWhg==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/wasm-gen/-/wasm-gen-1.5.12.tgz", + "integrity": "sha1-C3zP25PauQLMAlEBTi4YuuMTm8s=", "dev": true, "requires": { "@webassemblyjs/ast": "1.5.12", @@ -332,8 +332,8 @@ }, "@webassemblyjs/wasm-opt": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.5.12.tgz", - "integrity": "sha512-LBwG5KPA9u/uigZVyTsDpS3CVxx3AePCnTItVL+OPkRCp5LqmLsOp4a3/c5CQE0Lecm0Ss9hjUTDcbYFZkXlfQ==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/wasm-opt/-/wasm-opt-1.5.12.tgz", + "integrity": "sha1-vXWKi8Zw9YX/GuhfhAlangIpy8k=", "dev": true, "requires": { "@webassemblyjs/ast": "1.5.12", @@ -345,8 +345,8 @@ "dependencies": { "debug": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -356,8 +356,8 @@ }, "@webassemblyjs/wasm-parser": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.5.12.tgz", - "integrity": "sha512-xset3+1AtoFYEfMg30nzCGBnhKmTBzbIKvMyLhqJT06TvYV+kA884AOUpUvhSmP6XPF3G+HVZPm/PbCGxH4/VQ==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/wasm-parser/-/wasm-parser-1.5.12.tgz", + "integrity": "sha1-exC0OI7PmL16IucCqmLsL0bQx14=", "dev": true, "requires": { "@webassemblyjs/ast": "1.5.12", @@ -370,8 +370,8 @@ }, "@webassemblyjs/wast-parser": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.5.12.tgz", - "integrity": "sha512-QWUtzhvfY7Ue9GlJ3HeOB6w5g9vNYUUnG+Y96TWPkFHJTxZlcvGfNrUoACCw6eDb9gKaHrjt77aPq41a7y8svg==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/wast-parser/-/wast-parser-1.5.12.tgz", + "integrity": "sha1-nPWuYA7K4GQEN7XU3l3WtgiNDYs=", "dev": true, "requires": { "@webassemblyjs/ast": "1.5.12", @@ -385,8 +385,8 @@ }, "@webassemblyjs/wast-printer": { "version": "1.5.12", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.5.12.tgz", - "integrity": "sha512-XF9RTeckFgDyl196uRKZWHFFfbkzsMK96QTXp+TC0R9gsV9DMiDGMSIllgy/WdrZ3y3dsQp4fTA5r4GoaOBchA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@webassemblyjs/wast-printer/-/wast-printer-1.5.12.tgz", + "integrity": "sha1-Vjyk0Bsi0hZAskY9xePX99naxSA=", "dev": true, "requires": { "@webassemblyjs/ast": "1.5.12", @@ -418,8 +418,8 @@ }, "acorn-dynamic-import": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", + "integrity": "sha1-kBzu5Mf6rvfgetKkfokGddpQong=", "dev": true, "requires": { "acorn": "5.7.1" @@ -670,8 +670,8 @@ }, "asn1.js": { "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha1-ucK/WAXx5kqt7tbfOiv6+1pz9aA=", "dev": true, "requires": { "bn.js": "4.11.8", @@ -851,6 +851,33 @@ "dev": true, "optional": true }, + "babel-core": { + "version": "6.26.3", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha1-suLwnjQtDwyI4vAuBneUEl51wgc=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" + } + }, "braces": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", @@ -1011,8 +1038,8 @@ }, "babel-core": { "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha1-suLwnjQtDwyI4vAuBneUEl51wgc=", "dev": true, "requires": { "babel-code-frame": "6.26.0", @@ -1842,6 +1869,33 @@ "source-map-support": "0.4.18" }, "dependencies": { + "babel-core": { + "version": "6.26.3", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha1-suLwnjQtDwyI4vAuBneUEl51wgc=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" + } + }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -2137,8 +2191,8 @@ }, "bn.js": { "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha1-LN4J617jQfSEdGuwMJsyU7GxRC8=", "dev": true }, "body-parser": { @@ -2270,8 +2324,8 @@ }, "browserify-aes": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha1-Mmc0ZC9APavDADIJhTu3CtQo70g=", "dev": true, "requires": { "buffer-xor": "1.0.3", @@ -2284,8 +2338,8 @@ }, "browserify-cipher": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha1-jWR0wbhwv9q807z8wZNKEOlPFfA=", "dev": true, "requires": { "browserify-aes": "1.2.0", @@ -2295,8 +2349,8 @@ }, "browserify-des": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", - "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/browserify-des/-/browserify-des-1.0.1.tgz", + "integrity": "sha1-M0MSTbbXrVPiaogmMYcSvchFD5w=", "dev": true, "requires": { "cipher-base": "1.0.4", @@ -2331,8 +2385,8 @@ }, "browserify-zlib": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha1-KGlFnZqjviRf6P4sofRuLn9U1z8=", "dev": true, "requires": { "pako": "1.0.6" @@ -2683,8 +2737,8 @@ }, "chrome-trace-event": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", - "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", + "integrity": "sha1-Rakb0sIMlBHwljtarrmhuV4JzEg=", "dev": true, "requires": { "tslib": "1.9.3" @@ -2698,8 +2752,8 @@ }, "cipher-base": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94=", "dev": true, "requires": { "inherits": "2.0.3", @@ -3178,8 +3232,8 @@ }, "create-ecdh": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha1-yREbbzMEXEaX8UR4f5JUzcd8Rf8=", "dev": true, "requires": { "bn.js": "4.11.8", @@ -3197,8 +3251,8 @@ }, "create-hash": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha1-iJB4rxGmN1a8+1m9IhmWvjqe8ZY=", "dev": true, "requires": { "cipher-base": "1.0.4", @@ -3210,8 +3264,8 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha1-aRcMeLOrlXFHsriwRXLkfq0iQ/8=", "dev": true, "requires": { "cipher-base": "1.0.4", @@ -3235,8 +3289,8 @@ }, "crypto-browserify": { "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha1-OWz58xN/A+S45TLFj2mCVOAPgOw=", "dev": true, "requires": { "browserify-cipher": "1.0.1", @@ -3991,8 +4045,8 @@ }, "diffie-hellman": { "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha1-QOjumPVaIUlgcUaSHGPhrl89KHU=", "dev": true, "requires": { "bn.js": "4.11.8", @@ -4093,8 +4147,8 @@ }, "domain-browser": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto=", "dev": true }, "domelementtype": { @@ -4406,8 +4460,8 @@ }, "esrecurse": { "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", "dev": true, "requires": { "estraverse": "4.2.0" @@ -4454,8 +4508,8 @@ }, "evp_bytestokey": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha1-f8vbGY3HGVlDLv4ThCaE4FJaywI=", "dev": true, "requires": { "md5.js": "1.3.4", @@ -6426,8 +6480,8 @@ }, "hash.js": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.4.tgz", - "integrity": "sha512-A6RlQvvZEtFS5fLU43IDu0QUmBy+fDO9VMdTXvufKwIkt/rFfvICAViCax5fbDO4zdNzaC3/27ZhKUok5bAJyw==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/hash.js/-/hash.js-1.1.4.tgz", + "integrity": "sha1-i1Dh811RvQHl7Z7OTb41Scz6Cjw=", "dev": true, "requires": { "inherits": "2.0.3", @@ -7864,6 +7918,35 @@ "jest-util": "23.2.0", "jest-validate": "23.2.0", "pretty-format": "23.2.0" + }, + "dependencies": { + "babel-core": { + "version": "6.26.3", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha1-suLwnjQtDwyI4vAuBneUEl51wgc=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" + } + } } }, "jest-diff": { @@ -8100,6 +8183,33 @@ "yargs": "11.0.0" }, "dependencies": { + "babel-core": { + "version": "6.26.3", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha1-suLwnjQtDwyI4vAuBneUEl51wgc=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" + } + }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -8184,6 +8294,11 @@ "merge-stream": "1.0.1" } }, + "jquery": { + "version": "3.3.1", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/jquery/-/jquery-3.3.1.tgz", + "integrity": "sha1-lYzinoHJeQ8xvneS311NlfxX+8o=" + }, "js-base64": { "version": "2.4.5", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.5.tgz", @@ -8729,6 +8844,11 @@ "type-check": "0.3.2" } }, + "linq": { + "version": "3.1.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/linq/-/linq-3.1.0.tgz", + "integrity": "sha1-+6mvdhknMJLl8bfV/vjwo2T4lpM=" + }, "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", @@ -8782,6 +8902,11 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" }, + "lodash-es": { + "version": "4.17.10", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/lodash-es/-/lodash-es-4.17.10.tgz", + "integrity": "sha1-Ys1xBM313YfyNag38O3g6OURfgU=" + }, "lodash._basecopy": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", @@ -8875,6 +9000,16 @@ "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", "dev": true }, + "lodash.isfunction": { + "version": "3.0.9", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha1-Bt4l302zJ6yTGYHRvbBn5a9o0FE=" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, "lodash.keys": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", @@ -8943,6 +9078,11 @@ "lodash.escape": "3.2.0" } }, + "lodash.transform": { + "version": "4.6.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/lodash.transform/-/lodash.transform-4.6.0.tgz", + "integrity": "sha1-EjBkIvYzJK7YSD0/ODMrX2cFR6A=" + }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -9068,8 +9208,8 @@ }, "mamacro": { "version": "0.0.3", - "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", - "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha1-rSyVdhl8nxq/MI0Hh4Zb2XWj8+Q=", "dev": true }, "map-cache": { @@ -9238,8 +9378,8 @@ }, "miller-rabin": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha1-8IA1HIZbDcViqEYpZtqlNUPHik0=", "dev": true, "requires": { "bn.js": "4.11.8", @@ -9500,8 +9640,8 @@ }, "neo-async": { "version": "2.5.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", - "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha1-rLkJ4yex6H7J7xX0G4omlRKtQe4=", "dev": true }, "next-tick": { @@ -9548,8 +9688,8 @@ }, "node-libs-browser": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", - "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha1-X5QmPUBPbkR2fXJpAf/wVHjWAN8=", "dev": true, "requires": { "assert": "1.4.1", @@ -9579,8 +9719,8 @@ "dependencies": { "base64-js": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha1-yrHmEY8FEJXli1KBrqjBzSK/wOM=", "dev": true }, "buffer": { @@ -10051,8 +10191,8 @@ }, "pako": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/pako/-/pako-1.0.6.tgz", + "integrity": "sha1-AQEhG6pwxLykoPY/Igbpe3368lg=", "dev": true }, "parallel-transform": { @@ -10077,8 +10217,8 @@ }, "parse-asn1": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha1-9r8pOBgzK9DatU77Fgh3JHRebKg=", "dev": true, "requires": { "asn1.js": "4.10.1", @@ -10213,8 +10353,8 @@ }, "pbkdf2": { "version": "3.0.16", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", - "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha1-dAQgjsawG2LYW/g4U6gGT42cKlw=", "dev": true, "requires": { "create-hash": "1.2.0", @@ -11384,8 +11524,8 @@ }, "public-encrypt": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", - "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha1-RuuRByBr9zSJ+LhbadkTNMZhCZQ=", "dev": true, "requires": { "bn.js": "4.11.8", @@ -11490,8 +11630,8 @@ }, "randombytes": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha1-0wLFIpSFiISKjTAMkytEwkIx2oA=", "dev": true, "requires": { "safe-buffer": "5.1.2" @@ -11499,8 +11639,8 @@ }, "randomfill": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha1-ySGW/IarQr6YPxvzF3giSTHWFFg=", "dev": true, "requires": { "randombytes": "2.0.6", @@ -11702,6 +11842,19 @@ "prop-types": "15.6.2" } }, + "react-redux": { + "version": "5.0.7", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/react-redux/-/react-redux-5.0.7.tgz", + "integrity": "sha1-DcEHbZr7RnD5k/+u9EuPjBFVpMg=", + "requires": { + "hoist-non-react-statics": "2.5.5", + "invariant": "2.2.4", + "lodash": "4.17.10", + "lodash-es": "4.17.10", + "loose-envify": "1.3.1", + "prop-types": "15.6.2" + } + }, "react-router": { "version": "4.3.1", "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/react-router/-/react-router-4.3.1.tgz", @@ -11744,6 +11897,11 @@ "warning": "4.0.1" } }, + "react-router-redux": { + "version": "4.0.8", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/react-router-redux/-/react-router-redux-4.0.8.tgz", + "integrity": "sha1-InQDWWtRUeGCN32rg1tdRfD4BU4=" + }, "react-swipeable-views": { "version": "0.12.14", "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/react-swipeable-views/-/react-swipeable-views-0.12.14.tgz", @@ -11936,6 +12094,37 @@ } } }, + "redux": { + "version": "4.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/redux/-/redux-4.0.0.tgz", + "integrity": "sha1-qmmKkrcpMV0is0oFU9fmUzVVzAM=", + "requires": { + "loose-envify": "1.3.1", + "symbol-observable": "1.2.0" + }, + "dependencies": { + "symbol-observable": { + "version": "1.2.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha1-wiaIrtTqs83C3+rLtWFmBWCgCAQ=" + } + } + }, + "redux-thunk": { + "version": "2.3.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/redux-thunk/-/redux-thunk-2.3.0.tgz", + "integrity": "sha1-UcLBmhhe1Rh6qpotCLZm0NZGdiI=" + }, + "redux-toolbelt": { + "version": "2.1.5", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/redux-toolbelt/-/redux-toolbelt-2.1.5.tgz", + "integrity": "sha1-qLL2ayeK40kGOJLcpZFHJ0Pd9AM=", + "requires": { + "lodash.isfunction": "3.0.9", + "lodash.isplainobject": "4.0.6", + "lodash.transform": "4.6.0" + } + }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", @@ -12213,8 +12402,8 @@ }, "ripemd160": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha1-ocGm9iR1FXe6XQeRTLyShQWFiQw=", "dev": true, "requires": { "hash-base": "3.0.4", @@ -12486,8 +12675,8 @@ }, "sha.js": { "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha1-N6XPC4HsvGlD3hCbopYNGyZYSuc=", "dev": true, "requires": { "inherits": "2.0.3", @@ -12974,8 +13163,8 @@ }, "stream-http": { "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha1-stJCRpKIpaJ+xP6JM6z2I95lFPw=", "dev": true, "requires": { "builtin-status-codes": "3.0.0", @@ -13359,8 +13548,8 @@ }, "timers-browserify": { "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha1-HSjj0qrfHVpZlsTp+VYBzQU0gK4=", "dev": true, "requires": { "setimmediate": "1.0.5" @@ -13455,6 +13644,14 @@ "repeat-string": "1.6.1" } }, + "toastr": { + "version": "2.1.4", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/toastr/-/toastr-2.1.4.tgz", + "integrity": "sha1-i0O+ZPudDEFIcURvLbjoyk6V8YE=", + "requires": { + "jquery": "3.3.1" + } + }, "toposort": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", @@ -13591,8 +13788,8 @@ }, "uglifyjs-webpack-plugin": { "version": "1.2.7", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.7.tgz", - "integrity": "sha512-1VicfKhCYHLS8m1DCApqBhoulnASsEoJ/BvpUpP4zoNAPpKzdH+ghk0olGJMmwX2/jprK2j3hAHdUbczBSy2FA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.7.tgz", + "integrity": "sha1-V2ON2ZyFOh6/6dl7QhYKilB/nQA=", "dev": true, "requires": { "cacache": "10.0.4", @@ -13600,30 +13797,30 @@ "schema-utils": "0.4.5", "serialize-javascript": "1.5.0", "source-map": "0.6.1", - "uglify-es": "3.3.9", + "uglify-es": "3.3.10", "webpack-sources": "1.1.0", "worker-farm": "1.6.0" }, "dependencies": { "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "version": "2.14.1", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/commander/-/commander-2.14.1.tgz", + "integrity": "sha1-IjUSPjevjKPGXfRbAm29NXsBuao=", "dev": true }, "source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", "dev": true }, "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "version": "3.3.10", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/uglify-es/-/uglify-es-3.3.10.tgz", + "integrity": "sha1-iwt5ks6+IO3CbeG/MlzveXuPP6U=", "dev": true, "requires": { - "commander": "2.13.0", + "commander": "2.14.1", "source-map": "0.6.1" } } @@ -13819,8 +14016,7 @@ "url-join": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz", - "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=", - "dev": true + "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=" }, "url-loader": { "version": "1.0.1", @@ -13892,8 +14088,8 @@ }, "util": { "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/util/-/util-0.10.4.tgz", + "integrity": "sha1-OqASW/5mikZy3liFfTrOJ+y3aQE=", "dev": true, "requires": { "inherits": "2.0.3" @@ -14110,8 +14306,8 @@ }, "watchpack": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha1-S8EsLr6KonenHx0/FNaFx7RGzQA=", "dev": true, "requires": { "chokidar": "2.0.4", @@ -14135,9 +14331,9 @@ "dev": true }, "webpack": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.12.1.tgz", - "integrity": "sha512-7LOKQ+fpPtSvPlP++2rkDRU/8o6pJt00ezGPCksmeIzliOhiz0us4erBmNCW3VeVwH7tLIhv80zFYdOmmqU9BQ==", + "version": "4.12.2", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/webpack/-/webpack-4.12.2.tgz", + "integrity": "sha512-qgZAR7T+pvvKSO62gn8kdn+lDeqAH4eyjaUMeLUx4BS/wQghFFCw/JamWhNJ2d95tTOSS130h2WNiNr+Ff3J+A==", "dev": true, "requires": { "@webassemblyjs/ast": "1.5.12", @@ -14346,8 +14542,8 @@ }, "webpack-sources": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", - "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha1-oQHrrlnWUHNU1x2AE5UKOot6WlQ=", "dev": true, "requires": { "source-list-map": "2.0.0", @@ -14356,8 +14552,8 @@ "dependencies": { "source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", "dev": true } } @@ -14453,8 +14649,8 @@ }, "worker-farm": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", - "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha1-rsxAWXb6talVJhgIRvDboojzpKA=", "dev": true, "requires": { "errno": "0.1.7" diff --git a/package.json b/package.json index 5beb4a6..4d7a8ce 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "react-hot-loader": "^4.3.3", "style-loader": "^0.21.0", "url-loader": "^1.0.1", - "webpack": "^4.12.1", + "webpack": "^4.12.2", "webpack-cli": "^3.0.8", "webpack-dev-middleware": "^3.1.3", "webpack-dev-server": "^3.1.4", @@ -84,7 +84,15 @@ "react-dom": "^16.4.1", "react-google-maps": "^9.4.5", "react-router-dom": "4.3.1", - "react-swipeable-views": "0.12.14" + "react-swipeable-views": "0.12.14", + "react-redux": "5.0.7", + "react-router-redux": "^4.0.8", + "redux": "4.0.0", + "redux-thunk": "2.3.0", + "redux-toolbelt": "2.1.5", + "toastr": "2.1.4", + "url-join": "4.0.0", + "linq": "^3.1.0" }, "postcss": {} } diff --git a/src/envconfigs/dev.js b/src/envconfigs/dev.js new file mode 100644 index 0000000..e69de29 diff --git a/src/envconfigs/index.js b/src/envconfigs/index.js new file mode 100644 index 0000000..2f9043e --- /dev/null +++ b/src/envconfigs/index.js @@ -0,0 +1,5 @@ +if (process.env.NODE_ENV === 'production') { + module.exports = require('./prd'); +} else { + module.exports = require('./dev'); +} \ No newline at end of file diff --git a/src/envconfigs/prd.js b/src/envconfigs/prd.js new file mode 100644 index 0000000..e69de29 diff --git a/src/index.html.ejs b/src/index.html.ejs index 3a6c85f..cd85217 100644 --- a/src/index.html.ejs +++ b/src/index.html.ejs @@ -4,7 +4,7 @@ - Hello React! + drunkcoding.net - Hello React! diff --git a/src/reducers/index.js b/src/reducers/index.js new file mode 100644 index 0000000..9e59d24 --- /dev/null +++ b/src/reducers/index.js @@ -0,0 +1,9 @@ +import { + combineReducers +} from "redux"; + +const rootReducer = combineReducers({ + +}); + +export default rootReducer; \ No newline at end of file diff --git a/src/reducers/initialStore.js b/src/reducers/initialStore.js new file mode 100644 index 0000000..5c933b1 --- /dev/null +++ b/src/reducers/initialStore.js @@ -0,0 +1,3 @@ +export default { + +} \ No newline at end of file diff --git a/src/store/dev.js b/src/store/dev.js new file mode 100644 index 0000000..1ae27c2 --- /dev/null +++ b/src/store/dev.js @@ -0,0 +1,15 @@ +import { + createStore, + applyMiddleware +} from 'redux'; +import rootReducer from '../reducers'; +import reduxImmutableStateInvariant from 'redux-immutable-state-invariant'; +import thunk from 'redux-thunk'; + +export default function configureStore(initialState) { + return createStore( + rootReducer, + initialState, + applyMiddleware(thunk, reduxImmutableStateInvariant()) + ); +} \ No newline at end of file diff --git a/src/store/index.js b/src/store/index.js new file mode 100644 index 0000000..2f9043e --- /dev/null +++ b/src/store/index.js @@ -0,0 +1,5 @@ +if (process.env.NODE_ENV === 'production') { + module.exports = require('./prd'); +} else { + module.exports = require('./dev'); +} \ No newline at end of file diff --git a/src/store/prd.js b/src/store/prd.js new file mode 100644 index 0000000..bab2e28 --- /dev/null +++ b/src/store/prd.js @@ -0,0 +1,14 @@ +import { + createStore, + applyMiddleware +} from 'redux'; +import rootReducer from '../reducers'; +import thunk from 'redux-thunk'; + +export default function configureStore(initialState) { + return createStore( + rootReducer, + initialState, + applyMiddleware(thunk) + ); +} \ No newline at end of file From d48f10a45983af962682fc8f32bfa40ed3247e0b Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Wed, 27 Jun 2018 14:28:20 +0800 Subject: [PATCH 2/6] update test and babel --- .babelrc | 94 +++++++++++++++++++++++----------------------- tests/App.test.jsx | 6 ++- 2 files changed, 51 insertions(+), 49 deletions(-) diff --git a/.babelrc b/.babelrc index 526debf..f8ccdcb 100644 --- a/.babelrc +++ b/.babelrc @@ -1,51 +1,51 @@ { - "presets": [ - [ - "babel-preset-env", - { - "modules": false, - "targets": { - "browsers": [ - ">0.25%", - "not ie 10", - "not op_mini all" - ] - } - } + "presets": [ + [ + "env", + { + "modules": false, + "targets": { + "browsers": [ + ">0.25%", + "not ie 10", + "not op_mini all" + ] + } + } + ], + "react-latest", + "stage-3" + ], + "plugins": [ + "babel-plugin-transform-class-properties", + "babel-plugin-transform-class", + "babel-plugin-transform-async-to-generator", + "react-hot-loader/babel", //Enables React code to work with HMR. + [ + "module-resolver", + { + "root": [ + "./src" + ] + } + ] + ], + "env": { + "test": { + "presets": [ + "env", + "react" ], - "react-latest", - "stage-3" - ], - "plugins": [ - "babel-plugin-transform-class-properties", - "babel-plugin-transform-class", - "babel-plugin-transform-async-to-generator", - "react-hot-loader/babel", //Enables React code to work with HMR. - [ - "module-resolver", - { - "root": [ - "./src" - ] - } + "plugins": [ + "transform-es2015-modules-commonjs" ] - ], - "env": { - "test": { - "presets": [ - "env", - "react" - ], - "plugins": [ - "transform-es2015-modules-commonjs" - ] - }, - "production": { - "plugins": [ - [ - "babel-plugin-webpack-alias" - ] - ] - } - } + }, + "production": { + "plugins": [ + [ + "babel-plugin-webpack-alias" + ] + ] + } + } } \ No newline at end of file diff --git a/tests/App.test.jsx b/tests/App.test.jsx index 4da679a..7b982bc 100644 --- a/tests/App.test.jsx +++ b/tests/App.test.jsx @@ -1,16 +1,18 @@ import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-dom/test-utils'; -import App from '../src/components/App'; +import App from '../src/layouts/Dashboard/Dashboard'; it('App is rendered', () => { // Render App in the document const appElement = TestUtils.renderIntoDocument( - + ); const appNode = ReactDOM.findDOMNode(appElement); + console.log(`App Content: ${appNode.textContent}`); + // Verify text content expect(appNode.textContent).toEqual('Hello World!Foo to the bar'); }); From 0f4ab24800fb8289f898e6625dd06e2833719c2c Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Wed, 27 Jun 2018 15:42:53 +0800 Subject: [PATCH 3/6] add dummy data and Api --- src/{variables => _dummy_data}/charts.jsx | 24 ++++++++-------- src/{variables => _dummy_data}/general.jsx | 8 +++--- src/_dummy_data/simulator.js | 3 ++ src/api/chartApi.js | 8 ++++++ src/api/generalApi.js | 8 ++++++ src/api/index.js | 7 +++++ src/reducers/initialStore.js | 3 +- src/views/Dashboard/Actions.js | 0 src/views/Dashboard/Dashboard.jsx | 33 +++++++++++++++------- 9 files changed, 67 insertions(+), 27 deletions(-) rename src/{variables => _dummy_data}/charts.jsx (89%) rename src/{variables => _dummy_data}/general.jsx (93%) create mode 100644 src/_dummy_data/simulator.js create mode 100644 src/api/chartApi.js create mode 100644 src/api/generalApi.js create mode 100644 src/api/index.js create mode 100644 src/views/Dashboard/Actions.js diff --git a/src/variables/charts.jsx b/src/_dummy_data/charts.jsx similarity index 89% rename from src/variables/charts.jsx rename to src/_dummy_data/charts.jsx index 828133e..11556de 100644 --- a/src/variables/charts.jsx +++ b/src/_dummy_data/charts.jsx @@ -1,14 +1,14 @@ // ############################## // // // javascript library for creating charts // ############################# -var Chartist = require("chartist"); +import { Interpolation, Svg } from "chartist"; // ############################## // // // variables used to create animation on charts // ############################# -var delays = 80, +const delays = 80, durations = 500; -var delays2 = 80, +const delays2 = 80, durations2 = 500; // ############################## @@ -21,7 +21,7 @@ const dailySalesChart = { series: [[12, 17, 7, 17, 23, 18, 38]] }, options: { - lineSmooth: Chartist.Interpolation.cardinal({ + lineSmooth: Interpolation.cardinal({ tension: 0 }), low: 0, @@ -35,7 +35,7 @@ const dailySalesChart = { }, // for animation animation: { - draw: function(data) { + draw: function (data) { if (data.type === "line" || data.type === "area") { data.element.animate({ d: { @@ -47,7 +47,7 @@ const dailySalesChart = { .translate(0, data.chartRect.height()) .stringify(), to: data.path.clone().stringify(), - easing: Chartist.Svg.Easing.easeOutQuint + easing: Svg.Easing.easeOutQuint } }); } else if (data.type === "point") { @@ -106,7 +106,7 @@ const emailsSubscriptionChart = { { seriesBarDistance: 5, axisX: { - labelInterpolationFnc: function(value) { + labelInterpolationFnc: function (value) { return value[0]; } } @@ -114,7 +114,7 @@ const emailsSubscriptionChart = { ] ], animation: { - draw: function(data) { + draw: function (data) { if (data.type === "bar") { data.element.animate({ opacity: { @@ -140,7 +140,7 @@ const completedTasksChart = { series: [[230, 750, 450, 300, 280, 240, 200, 190]] }, options: { - lineSmooth: Chartist.Interpolation.cardinal({ + lineSmooth: Interpolation.cardinal({ tension: 0 }), low: 0, @@ -153,7 +153,7 @@ const completedTasksChart = { } }, animation: { - draw: function(data) { + draw: function (data) { if (data.type === "line" || data.type === "area") { data.element.animate({ d: { @@ -165,7 +165,7 @@ const completedTasksChart = { .translate(0, data.chartRect.height()) .stringify(), to: data.path.clone().stringify(), - easing: Chartist.Svg.Easing.easeOutQuint + easing: Svg.Easing.easeOutQuint } }); } else if (data.type === "point") { @@ -183,7 +183,7 @@ const completedTasksChart = { } }; -module.exports = { +export default { dailySalesChart, emailsSubscriptionChart, completedTasksChart diff --git a/src/variables/general.jsx b/src/_dummy_data/general.jsx similarity index 93% rename from src/variables/general.jsx rename to src/_dummy_data/general.jsx index 1c0b363..1a9bc9e 100644 --- a/src/variables/general.jsx +++ b/src/_dummy_data/general.jsx @@ -2,23 +2,23 @@ // // // Tasks for TasksCard - see Dashboard view // ############################# -var bugs = [ +const bugs = [ 'Sign contract for "What are conference organizers afraid of?"', "Lines From Great Russian Literature? Or E-mails From My Boss?", "Flooded: One year later, assessing what was lost and what was found when a ravaging rain swept through metro Detroit", "Create 4 Invisible User Experiences you Never Knew About" ]; -var website = [ +const website = [ "Flooded: One year later, assessing what was lost and what was found when a ravaging rain swept through metro Detroit", 'Sign contract for "What are conference organizers afraid of?"' ]; -var server = [ +const server = [ "Lines From Great Russian Literature? Or E-mails From My Boss?", "Flooded: One year later, assessing what was lost and what was found when a ravaging rain swept through metro Detroit", 'Sign contract for "What are conference organizers afraid of?"' ]; -module.exports = { +export default { // these 3 are used to create the tasks lists in TasksCard - Dashboard view bugs, website, diff --git a/src/_dummy_data/simulator.js b/src/_dummy_data/simulator.js new file mode 100644 index 0000000..dfd8aec --- /dev/null +++ b/src/_dummy_data/simulator.js @@ -0,0 +1,3 @@ +export default function (data, inSecond = 3) { + return new Promise(resolve => setTimeout(resolve(data), inSecond * 1000)); +} \ No newline at end of file diff --git a/src/api/chartApi.js b/src/api/chartApi.js new file mode 100644 index 0000000..0697c9e --- /dev/null +++ b/src/api/chartApi.js @@ -0,0 +1,8 @@ +import charts from '../_dummy_data/charts'; +import se from "../_dummy_data//simulator"; + +//Calling Api and return data +//This will use timeout to simulate server call. +export function getChartData() { + return se(charts); +} \ No newline at end of file diff --git a/src/api/generalApi.js b/src/api/generalApi.js new file mode 100644 index 0000000..0c1f3c2 --- /dev/null +++ b/src/api/generalApi.js @@ -0,0 +1,8 @@ +import general from '../_dummy_data/general'; +import se from "../_dummy_data//simulator"; + +//Calling Api and return data +//This will use timeout to simulate server call. +export function getGeneral() { + return se(general); +} \ No newline at end of file diff --git a/src/api/index.js b/src/api/index.js new file mode 100644 index 0000000..fe6c09a --- /dev/null +++ b/src/api/index.js @@ -0,0 +1,7 @@ +import GeneralApi from './generalApi'; +import ChartApi from './chartApi'; + +export default { + GeneralApi, + ChartApi +} \ No newline at end of file diff --git a/src/reducers/initialStore.js b/src/reducers/initialStore.js index 5c933b1..8feb172 100644 --- a/src/reducers/initialStore.js +++ b/src/reducers/initialStore.js @@ -1,3 +1,4 @@ export default { - + charts: {}, + general: {} } \ No newline at end of file diff --git a/src/views/Dashboard/Actions.js b/src/views/Dashboard/Actions.js new file mode 100644 index 0000000..e69de29 diff --git a/src/views/Dashboard/Dashboard.jsx b/src/views/Dashboard/Dashboard.jsx index 0262f62..df8f507 100644 --- a/src/views/Dashboard/Dashboard.jsx +++ b/src/views/Dashboard/Dashboard.jsx @@ -1,5 +1,9 @@ import React from "react"; import PropTypes from "prop-types"; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import actions from './Actions'; + // react plugin for creating charts import ChartistGraph from "react-chartist"; // @material-ui/core @@ -31,20 +35,29 @@ import CardIcon from "components/Card/CardIcon.jsx"; import CardBody from "components/Card/CardBody.jsx"; import CardFooter from "components/Card/CardFooter.jsx"; -import { bugs, website, server } from "variables/general"; +import dashboardStyle from "assets/jss/material-dashboard-react/views/dashboardStyle.jsx"; -import { - dailySalesChart, - emailsSubscriptionChart, - completedTasksChart -} from "variables/charts"; +function mapStateToProps(state) { + return { + charts: state.charts, + general: state.general + }; +} -import dashboardStyle from "assets/jss/material-dashboard-react/views/dashboardStyle.jsx"; +function mapDispatchToProps(dispatch) { + return { actions: bindActionCreators(actionCreators, dispatch) }; +} +@connect(mapStateToProps, mapDispatchToProps) class Dashboard extends React.Component { - state = { - value: 0 - }; + constructor(props, context) { + super(props, context); + + this.state = { + value: 0 + }; + } + handleChange = (event, value) => { this.setState({ value }); }; From 97f975791fc88f4a56b4e06ce0a142825f7531de Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Wed, 27 Jun 2018 16:02:37 +0800 Subject: [PATCH 4/6] add eslinint --- .eslintrc.js | 36 ++ .jshintrc | 12 +- README.md | 4 +- configs/webpack/common.js | 2 +- package-lock.json | 641 ++++++++++++++++++++++++++++++ package.json | 11 +- src/views/Dashboard/Dashboard.jsx | 2 +- 7 files changed, 695 insertions(+), 13 deletions(-) create mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..b263509 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,36 @@ +module.exports = { + "env": { + "browser": true, + "commonjs": true, + "es6": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaFeatures": { + "experimentalObjectRestSpread": true, + "jsx": true + }, + "sourceType": "module" + }, + "plugins": [ + "react" + ], + "rules": { + "indent": [ + "error", + 4 + ], + "linebreak-style": [ + "error", + "windows" + ], + "quotes": [ + "error", + "double" + ], + "semi": [ + "error", + "always" + ] + } +}; \ No newline at end of file diff --git a/.jshintrc b/.jshintrc index cb8db0b..e3b71e4 100644 --- a/.jshintrc +++ b/.jshintrc @@ -6,26 +6,26 @@ // Enforcing "bitwise": true, // true: Prohibit bitwise operators (&, |, ^, etc.) - "camelcase": false, // true: Identifiers must be in camelCase + "camelcase": true, // true: Identifiers must be in camelCase "curly": false, // true: Require {} for every new block or scope "eqeqeq": true, // true: Require triple equals (===) for comparison "forin": true, // true: Require filtering for..in loops with obj.hasOwnProperty() "freeze": true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc. "immed": false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` "latedef": true, // true: Require variables/functions to be defined before being used - "newcap": false, // true: Require capitalization of all constructor functions e.g. `new F()` + "newcap": true, // true: Require capitalization of all constructor functions e.g. `new F()` "noarg": true, // true: Prohibit use of `arguments.caller` and `arguments.callee` "noempty": true, // true: Prohibit use of empty blocks "nonbsp": true, // true: Prohibit "non-breaking whitespace" characters. "nonew": false, // true: Prohibit use of constructors for side-effects (without assignment) "plusplus": false, // true: Prohibit use of `++` and `--` - "quotmark": false, // Quotation mark consistency: + "quotmark": "double", // Quotation mark consistency: // false : do nothing (default) // true : ensure whatever is used is consistent // "single" : require single quotes // "double" : require double quotes "undef": true, // true: Require all non-global variables to be declared (prevents global leaks) - "unused": true, // Unused variables: + "unused": false, // Unused variables: // true : all variables, last function parameter // "vars" : all variables only // "strict" : all variables, all function parameters @@ -43,7 +43,7 @@ "debug": false, // true: Allow debugger statements e.g. browser breakpoints. "eqnull": false, // true: Tolerate use of `== null` "esversion": 6, // {int} Specify the ECMAScript version to which the code must adhere. - "moz": false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) + "moz": true, // true: Allow Mozilla specific syntax (extends and overrides esnext features) // (ex: `for each`, multiple try/catch, function expression…) "evil": false, // true: Tolerate use of `eval` and `new Function()` "expr": false, // true: Tolerate `ExpressionStatement` as Programs @@ -61,7 +61,7 @@ "scripturl": false, // true: Tolerate script-targeted URLs "shadow": false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;` "sub": false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation - "supernew": false, // true: Tolerate `new function () { ... };` and `new Object;` + "supernew": true, // true: Tolerate `new function () { ... };` and `new Object;` "validthis": false, // true: Tolerate using this in a non-constructor function // Environments diff --git a/README.md b/README.md index 6d3d487..a4ff970 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,9 @@ Minimal starter kit with hot module replacement (HMR) for rapid development. * Code quality (linting) for JavaScript and LESS/CSS. * [Redux](https://redux.js.org/) Manage the Component states. * [Redux-Thunk](https://github.com/reduxjs/redux-thunk) The middle-ware of Redux -* [Redux-toolbelt](https://github.com/welldone-software/redux-toolbelt) A set of tools for quicker, easier, less verbose and safer Redux development by [welldone-software](http://welldone-software.com/). +* [Redux-toolbelt](https://github.com/welldone-software/redux-toolbelt) A set of tools for quicker, easier, less verbose and safer Redux development by [welldone-software](http://welldone-software.com/). +* ESLINT for Javascript and ReactJs +* JSHINT standard configuration. # Original Source Code diff --git a/configs/webpack/common.js b/configs/webpack/common.js index 2a88fdc..45f4a12 100644 --- a/configs/webpack/common.js +++ b/configs/webpack/common.js @@ -57,7 +57,7 @@ module.exports = { { test: /\.(jpe?g|png|gif|svg)$/i, loaders: [ - 'file-loader?hash=sha512&digest=hex&name=img/[name].[hash].[ext]', + 'file-loader?hash=sha512&digest=hex&name=img/[name].[ext]', 'image-webpack-loader?bypassOnDebug&optipng.optimizationLevel=7&gifsicle.interlaced=false', ], }, diff --git a/package-lock.json b/package-lock.json index 4819851..2fafa96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,48 @@ "@babel/highlight": "7.0.0-beta.51" } }, + "@babel/generator": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/generator/-/generator-7.0.0-beta.44.tgz", + "integrity": "sha1-x+Z7m1KEr89pswm1DX038+UDPUI=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.44", + "jsesc": "2.5.1", + "lodash": "4.17.10", + "source-map": "0.5.7", + "trim-right": "1.0.1" + } + }, + "@babel/helper-function-name": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.44.tgz", + "integrity": "sha1-4YVSqq4iMRAKbkheA4VLw1MtRN0=", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "7.0.0-beta.44", + "@babel/template": "7.0.0-beta.44", + "@babel/types": "7.0.0-beta.44" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.44.tgz", + "integrity": "sha1-0Dym3SufewseazLFbHKDYUDbOhU=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.44" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.44.tgz", + "integrity": "sha1-wLNRc14PvLOCLIrY205YOwXr2dw=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.44" + } + }, "@babel/highlight": { "version": "7.0.0-beta.51", "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", @@ -33,6 +75,112 @@ "regenerator-runtime": "0.11.1" } }, + "@babel/template": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/template/-/template-7.0.0-beta.44.tgz", + "integrity": "sha1-+IMvT9zuXVm/UV5ZX8UQbFKbOU8=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.44", + "@babel/types": "7.0.0-beta.44", + "babylon": "7.0.0-beta.44", + "lodash": "4.17.10" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz", + "integrity": "sha1-KgJkM2jegJFhYr5whlyXd08629k=", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0-beta.44" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/highlight/-/highlight-7.0.0-beta.44.tgz", + "integrity": "sha1-GMlM5UORaoBVPtzc9oGJCyAHR9U=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babylon": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/babylon/-/babylon-7.0.0-beta.44.tgz", + "integrity": "sha1-iRWeFebjDFCW4i1zjYwK+KDoyh0=", + "dev": true + } + } + }, + "@babel/traverse": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/traverse/-/traverse-7.0.0-beta.44.tgz", + "integrity": "sha1-qXCixFR3rRgBfi5GWgYG/u4NKWY=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.44", + "@babel/generator": "7.0.0-beta.44", + "@babel/helper-function-name": "7.0.0-beta.44", + "@babel/helper-split-export-declaration": "7.0.0-beta.44", + "@babel/types": "7.0.0-beta.44", + "babylon": "7.0.0-beta.44", + "debug": "3.1.0", + "globals": "11.7.0", + "invariant": "2.2.4", + "lodash": "4.17.10" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz", + "integrity": "sha1-KgJkM2jegJFhYr5whlyXd08629k=", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0-beta.44" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/highlight/-/highlight-7.0.0-beta.44.tgz", + "integrity": "sha1-GMlM5UORaoBVPtzc9oGJCyAHR9U=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babylon": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/babylon/-/babylon-7.0.0-beta.44.tgz", + "integrity": "sha1-iRWeFebjDFCW4i1zjYwK+KDoyh0=", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@babel/types": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/types/-/types-7.0.0-beta.44.tgz", + "integrity": "sha1-axsWRZH3fewKA0KsqZXy0Eazp1c=", + "dev": true, + "requires": { + "esutils": "2.0.2", + "lodash": "4.17.10", + "to-fast-properties": "2.0.0" + } + }, "@material-ui/core": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-1.3.0.tgz", @@ -434,6 +582,15 @@ "acorn": "5.7.1" } }, + "acorn-jsx": { + "version": "4.1.1", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/acorn-jsx/-/acorn-jsx-4.1.1.tgz", + "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", + "dev": true, + "requires": { + "acorn": "5.7.1" + } + }, "ajv": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", @@ -1063,6 +1220,48 @@ "source-map": "0.5.7" } }, + "babel-eslint": { + "version": "8.2.5", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/babel-eslint/-/babel-eslint-8.2.5.tgz", + "integrity": "sha1-3CMxwlnTZ4KqGJ2lEMQ97dWtx6M=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.44", + "@babel/traverse": "7.0.0-beta.44", + "@babel/types": "7.0.0-beta.44", + "babylon": "7.0.0-beta.44", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "1.0.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz", + "integrity": "sha1-KgJkM2jegJFhYr5whlyXd08629k=", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0-beta.44" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/@babel/highlight/-/highlight-7.0.0-beta.44.tgz", + "integrity": "sha1-GMlM5UORaoBVPtzc9oGJCyAHR9U=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babylon": { + "version": "7.0.0-beta.44", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/babylon/-/babylon-7.0.0-beta.44.tgz", + "integrity": "sha1-iRWeFebjDFCW4i1zjYwK+KDoyh0=", + "dev": true + } + } + }, "babel-generator": { "version": "6.26.1", "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", @@ -2556,6 +2755,23 @@ "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", "dev": true }, + "caller-path": { + "version": "0.1.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "0.2.0" + }, + "dependencies": { + "callsites": { + "version": "0.2.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + } + } + }, "callsites": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", @@ -2760,6 +2976,12 @@ "safe-buffer": "5.1.2" } }, + "circular-json": { + "version": "0.3.3", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha1-gVyZ6oT2gJUp0vRXkb34JxE1LWY=", + "dev": true + }, "clap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", @@ -4100,6 +4322,15 @@ "buffer-indexof": "1.1.1" } }, + "doctrine": { + "version": "2.1.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=", + "dev": true, + "requires": { + "esutils": "2.0.2" + } + }, "dom-converter": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", @@ -4442,6 +4673,191 @@ } } }, + "eslint": { + "version": "5.0.1", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/eslint/-/eslint-5.0.1.tgz", + "integrity": "sha512-D5nG2rErquLUstgUaxJlWB5+gu+U/3VDY0fk/Iuq8y9CUFy/7Y6oF4N2cR1tV8knzQvciIbfqfohd359xTLIKQ==", + "dev": true, + "requires": { + "ajv": "6.5.1", + "babel-code-frame": "6.26.0", + "chalk": "2.4.1", + "cross-spawn": "6.0.5", + "debug": "3.1.0", + "doctrine": "2.1.0", + "eslint-scope": "4.0.0", + "eslint-visitor-keys": "1.0.0", + "espree": "4.0.0", + "esquery": "1.0.1", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "11.7.0", + "ignore": "3.3.10", + "imurmurhash": "0.1.4", + "inquirer": "5.2.0", + "is-resolvable": "1.1.0", + "js-yaml": "3.12.0", + "json-stable-stringify-without-jsonify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "7.0.0", + "progress": "2.0.0", + "regexpp": "1.1.0", + "require-uncached": "1.0.3", + "semver": "5.5.0", + "string.prototype.matchall": "2.0.0", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", + "table": "4.0.3", + "text-table": "0.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "chardet": { + "version": "0.4.2", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", + "dev": true, + "requires": { + "nice-try": "1.0.4", + "path-key": "2.0.1", + "semver": "5.5.0", + "shebang-command": "1.2.0", + "which": "1.3.1" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "eslint-scope": { + "version": "4.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "dev": true, + "requires": { + "esrecurse": "4.2.1", + "estraverse": "4.2.0" + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha1-RJnt3NERDgshi6zy+n9/WfVcqAQ=", + "dev": true + }, + "external-editor": { + "version": "2.2.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha1-BFURz9jRM/OEZnPRBHwVTiFK09U=", + "dev": true, + "requires": { + "chardet": "0.4.2", + "iconv-lite": "0.4.23", + "tmp": "0.0.33" + } + }, + "figures": { + "version": "2.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "inquirer": { + "version": "5.2.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha1-2zUMK3Paynf/EkOWLp8i8JloVyY=", + "dev": true, + "requires": { + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.2.0", + "figures": "2.0.0", + "lodash": "4.17.10", + "mute-stream": "0.0.7", + "run-async": "2.3.0", + "rxjs": "5.5.11", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" + } + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha1-6u1lbsg0TxD1J8a/obbiJE3hZ9E=", + "dev": true, + "requires": { + "argparse": "1.0.10", + "esprima": "4.0.0" + } + }, + "rxjs": { + "version": "5.5.11", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/rxjs/-/rxjs-5.5.11.tgz", + "integrity": "sha1-9zMCfKQ+O+xrmURzvkq5itQ87Yc=", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + } + } + }, + "eslint-plugin-react": { + "version": "7.10.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/eslint-plugin-react/-/eslint-plugin-react-7.10.0.tgz", + "integrity": "sha1-r1wf7zHEcE2wIJj5vhggKZOCi1A=", + "dev": true, + "requires": { + "doctrine": "2.1.0", + "has": "1.0.3", + "jsx-ast-utils": "2.0.1", + "prop-types": "15.6.2" + } + }, "eslint-scope": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", @@ -4452,12 +4868,37 @@ "estraverse": "4.2.0" } }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha1-PzGA+y4pEBdxastMnW1bXDSmqB0=", + "dev": true + }, + "espree": { + "version": "4.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/espree/-/espree-4.0.0.tgz", + "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", + "dev": true, + "requires": { + "acorn": "5.7.1", + "acorn-jsx": "4.1.1" + } + }, "esprima": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", "dev": true }, + "esquery": { + "version": "1.0.1", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha1-QGxRZYsfWZGl+bYrHcJbAOPlxwg=", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, "esrecurse": { "version": "4.2.1", "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/esrecurse/-/esrecurse-4.2.1.tgz", @@ -4957,6 +5398,16 @@ "object-assign": "4.1.1" } }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "1.3.0", + "object-assign": "4.1.1" + } + }, "file-loader": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", @@ -5092,6 +5543,55 @@ "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", "dev": true }, + "flat-cache": { + "version": "1.3.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + }, + "dependencies": { + "del": { + "version": "2.2.2", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" + } + }, + "globby": { + "version": "5.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, "flatten": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", @@ -5762,6 +6262,12 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "get-caller-file": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", @@ -6061,6 +6567,12 @@ "integrity": "sha512-3DrmGj2TP+96cABk9TfMp6f3knH/Y46dqvWznTU3Tf6/bDGLDAn15tFluQ7BcloykOcdY16U0WGq0BQblYOxJQ==", "dev": true }, + "globals": { + "version": "11.7.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/globals/-/globals-11.7.0.tgz", + "integrity": "sha1-pYP6pDBVsayncZFL9oJY4vwSVnM=", + "dev": true + }, "globby": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", @@ -7591,6 +8103,12 @@ "integrity": "sha1-kF/uiuhvRbPsYUvDwVyGnfCHboI=", "dev": true }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=", + "dev": true + }, "is-retry-allowed": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", @@ -8361,6 +8879,12 @@ "xml-name-validator": "3.0.0" } }, + "jsesc": { + "version": "2.5.1", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/jsesc/-/jsesc-2.5.1.tgz", + "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", + "dev": true + }, "jshint": { "version": "2.9.5", "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.9.5.tgz", @@ -8469,6 +8993,12 @@ "jsonify": "0.0.0" } }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -8655,6 +9185,15 @@ "css-vendor": "0.3.8" } }, + "jsx-ast-utils": { + "version": "2.0.1", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", + "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", + "dev": true, + "requires": { + "array-includes": "3.0.3" + } + }, "keycode": { "version": "2.2.0", "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/keycode/-/keycode-2.2.0.tgz", @@ -10420,6 +10959,12 @@ "find-up": "2.1.0" } }, + "pluralize": { + "version": "7.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha1-KYuJ34uTsCIdv0Ia0rGx6iP8Z3c=", + "dev": true + }, "pn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", @@ -11455,6 +12000,12 @@ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, + "progress": { + "version": "2.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, "promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", @@ -12155,6 +12706,21 @@ "safe-regex": "1.1.0" } }, + "regexp.prototype.flags": { + "version": "1.2.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", + "integrity": "sha1-azByTjBqJ4M+6xcbZqyIkLo35Bw=", + "dev": true, + "requires": { + "define-properties": "1.1.2" + } + }, + "regexpp": { + "version": "1.1.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/regexpp/-/regexpp-1.1.0.tgz", + "integrity": "sha1-DjUW3Qt5BPQT0tQZPc5GGMOmias=", + "dev": true + }, "relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -12307,6 +12873,24 @@ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", "dev": true }, + "require-uncached": { + "version": "1.0.3", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "0.1.0", + "resolve-from": "1.0.1" + }, + "dependencies": { + "resolve-from": { + "version": "1.0.1", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + } + } + }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -12734,6 +13318,15 @@ "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", "dev": true }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha1-BE8aSdiEL/MHqta1Be0Xi9lQE00=", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0" + } + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -13240,6 +13833,19 @@ } } }, + "string.prototype.matchall": { + "version": "2.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz", + "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", + "dev": true, + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.12.0", + "function-bind": "1.1.1", + "has-symbols": "1.0.0", + "regexp.prototype.flags": "1.2.0" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -13435,6 +14041,20 @@ "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", "dev": true }, + "table": { + "version": "4.0.3", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/table/-/table-4.0.3.tgz", + "integrity": "sha1-ALXitgLxeUuayvnKkIp2OGp4E7w=", + "dev": true, + "requires": { + "ajv": "6.5.1", + "ajv-keywords": "3.2.0", + "chalk": "2.4.1", + "lodash": "4.17.10", + "slice-ansi": "1.0.0", + "string-width": "2.1.1" + } + }, "tapable": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", @@ -13485,6 +14105,12 @@ "require-main-filename": "1.0.1" } }, + "text-table": { + "version": "0.2.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, "theming": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/theming/-/theming-1.3.0.tgz", @@ -13602,6 +14228,12 @@ "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", "dev": true }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -14703,6 +15335,15 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "write": { + "version": "0.2.1", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "0.5.1" + } + }, "write-file-atomic": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", diff --git a/package.json b/package.json index 4d7a8ce..ac50412 100644 --- a/package.json +++ b/package.json @@ -35,20 +35,23 @@ "test": "jest --watch --coverage --config=configs/jest.json" }, "devDependencies": { - "babel-core": "6.26.3", - "babel-plugin-transform-class-properties": "6.24.1", - "babel-plugin-transform-class": "0.3.0", - "babel-preset-env": "1.7.0", "@types/prop-types": "^15.5.3", "babel-cli": "6.26.0", + "babel-core": "6.26.3", + "babel-eslint": "^8.2.5", "babel-jest": "23.2.0", "babel-loader": "7.1.4", "babel-plugin-module-resolver": "3.1.1", "babel-plugin-transform-async-to-generator": "6.24.1", + "babel-plugin-transform-class": "0.3.0", + "babel-plugin-transform-class-properties": "6.24.1", + "babel-preset-env": "1.7.0", "babel-preset-react-latest": "6.1.0", "babel-preset-stage-3": "6.24.1", "copy-webpack-plugin": "^4.5.2", "css-loader": "^0.28.11", + "eslint": "^5.0.1", + "eslint-plugin-react": "^7.10.0", "express": "^4.16.3", "file-loader": "^1.1.11", "html-webpack-plugin": "^3.2.0", diff --git a/src/views/Dashboard/Dashboard.jsx b/src/views/Dashboard/Dashboard.jsx index df8f507..dba8ee9 100644 --- a/src/views/Dashboard/Dashboard.jsx +++ b/src/views/Dashboard/Dashboard.jsx @@ -58,7 +58,7 @@ class Dashboard extends React.Component { }; } - handleChange = (event, value) => { + handleChange = (_, value) => { this.setState({ value }); }; From 748e97d8e6def662e854bc8e7511118ee953bf50 Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Wed, 27 Jun 2018 18:12:03 +0800 Subject: [PATCH 5/6] connect to Redux store --- configs/webpack/dev.js | 21 ++++---- package-lock.json | 18 +++++++ package.json | 10 ++-- src/_dummy_data/general.jsx | 6 +-- src/api/chartApi.js | 6 +-- src/api/generalApi.js | 6 +-- src/api/index.js | 6 +-- src/index.jsx | 14 +++-- src/reducers/index.js | 5 +- .../{initialStore.js => initialState.js} | 2 +- src/store/dev.js | 8 +-- src/views/Dashboard/Actions.js | 12 +++++ src/views/Dashboard/Dashboard.jsx | 54 +++++++++++++------ src/views/Dashboard/Reducer.jsx | 10 ++++ 14 files changed, 124 insertions(+), 54 deletions(-) rename src/reducers/{initialStore.js => initialState.js} (95%) create mode 100644 src/views/Dashboard/Reducer.jsx diff --git a/configs/webpack/dev.js b/configs/webpack/dev.js index 003fa6f..0da40ca 100644 --- a/configs/webpack/dev.js +++ b/configs/webpack/dev.js @@ -1,21 +1,22 @@ // development config -const merge = require('webpack-merge'); -const webpack = require('webpack'); -const commonConfig = require('./common'); +const merge = require("webpack-merge"); +const webpack = require("webpack"); +const commonConfig = require("./common"); module.exports = merge(commonConfig, { - mode: 'development', + mode: "development", entry: [ - 'react-hot-loader/patch', // activate HMR for React - 'webpack-dev-server/client?http://localhost:8080', // bundle the client for webpack-dev-server and connect to the provided endpoint - 'webpack/hot/only-dev-server', // bundle the client for hot reloading, only- means to only hot reload for successful updates - './index.jsx', // the entry point of our app + "react-hot-loader/patch", // activate HMR for React + "webpack-dev-server/client?http://localhost:8080", // bundle the client for webpack-dev-server and connect to the provided endpoint + "webpack/hot/only-dev-server", // bundle the client for hot reloading, only- means to only hot reload for successful updates + "./index.jsx", // the entry point of our app ], devServer: { hot: true, // enable HMR on the server - openPage: 'http://localhost:8080' + openPage: "http://localhost:8080", + historyApiFallback: true }, - devtool: 'cheap-module-eval-source-map', + devtool: "cheap-module-eval-source-map", plugins: [ new webpack.HotModuleReplacementPlugin(), // enable HMR globally new webpack.NamedModulesPlugin(), // prints more readable module names in the browser console on HMR updates diff --git a/package-lock.json b/package-lock.json index 2fafa96..21513fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12661,6 +12661,16 @@ } } }, + "redux-immutable-state-invariant": { + "version": "2.1.0", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/redux-immutable-state-invariant/-/redux-immutable-state-invariant-2.1.0.tgz", + "integrity": "sha1-MI/TzHQVoOfxH1HsmXtjeccFXOE=", + "dev": true, + "requires": { + "invariant": "2.2.4", + "json-stringify-safe": "5.0.1" + } + }, "redux-thunk": { "version": "2.3.0", "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/redux-thunk/-/redux-thunk-2.3.0.tgz", @@ -12676,6 +12686,14 @@ "lodash.transform": "4.6.0" } }, + "redux-toolbelt-thunk": { + "version": "2.0.3", + "resolved": "http://proget.schroders.com/npm/PublicNpmRegistry/redux-toolbelt-thunk/-/redux-toolbelt-thunk-2.0.3.tgz", + "integrity": "sha1-clRMZtk5qwMUkkEXprZZkp+V1Oc=", + "requires": { + "redux-toolbelt": "2.1.5" + } + }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", diff --git a/package.json b/package.json index ac50412..d596432 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "postcss-loader": "^2.1.5", "react-addons-test-utils": "^15.6.2", "react-hot-loader": "^4.3.3", + "redux-immutable-state-invariant": "^2.1.0", "style-loader": "^0.21.0", "url-loader": "^1.0.1", "webpack": "^4.12.2", @@ -81,21 +82,22 @@ "ajv": "6.5.1", "chartist": "0.11.0", "classnames": "2.2.6", + "linq": "^3.1.0", "perfect-scrollbar": "1.4.0", "react": "^16.4.1", "react-chartist": "0.13.1", "react-dom": "^16.4.1", "react-google-maps": "^9.4.5", - "react-router-dom": "4.3.1", - "react-swipeable-views": "0.12.14", "react-redux": "5.0.7", + "react-router-dom": "4.3.1", "react-router-redux": "^4.0.8", + "react-swipeable-views": "0.12.14", "redux": "4.0.0", "redux-thunk": "2.3.0", "redux-toolbelt": "2.1.5", + "redux-toolbelt-thunk": "^2.0.3", "toastr": "2.1.4", - "url-join": "4.0.0", - "linq": "^3.1.0" + "url-join": "4.0.0" }, "postcss": {} } diff --git a/src/_dummy_data/general.jsx b/src/_dummy_data/general.jsx index 1a9bc9e..cc5f76a 100644 --- a/src/_dummy_data/general.jsx +++ b/src/_dummy_data/general.jsx @@ -3,19 +3,19 @@ // ############################# const bugs = [ - 'Sign contract for "What are conference organizers afraid of?"', + "Sign contract for \"What are conference organizers afraid of?\"", "Lines From Great Russian Literature? Or E-mails From My Boss?", "Flooded: One year later, assessing what was lost and what was found when a ravaging rain swept through metro Detroit", "Create 4 Invisible User Experiences you Never Knew About" ]; const website = [ "Flooded: One year later, assessing what was lost and what was found when a ravaging rain swept through metro Detroit", - 'Sign contract for "What are conference organizers afraid of?"' + "Sign contract for \"What are conference organizers afraid of?\"" ]; const server = [ "Lines From Great Russian Literature? Or E-mails From My Boss?", "Flooded: One year later, assessing what was lost and what was found when a ravaging rain swept through metro Detroit", - 'Sign contract for "What are conference organizers afraid of?"' + "Sign contract for \"What are conference organizers afraid of?\"" ]; export default { diff --git a/src/api/chartApi.js b/src/api/chartApi.js index 0697c9e..01d9ab9 100644 --- a/src/api/chartApi.js +++ b/src/api/chartApi.js @@ -1,8 +1,8 @@ -import charts from '../_dummy_data/charts'; -import se from "../_dummy_data//simulator"; +import charts from "../_dummy_data/charts"; +import simulator from "../_dummy_data//simulator"; //Calling Api and return data //This will use timeout to simulate server call. export function getChartData() { - return se(charts); + return simulator(charts); } \ No newline at end of file diff --git a/src/api/generalApi.js b/src/api/generalApi.js index 0c1f3c2..a41df7f 100644 --- a/src/api/generalApi.js +++ b/src/api/generalApi.js @@ -1,8 +1,8 @@ -import general from '../_dummy_data/general'; -import se from "../_dummy_data//simulator"; +import general from "../_dummy_data/general"; +import simulator from "../_dummy_data//simulator"; //Calling Api and return data //This will use timeout to simulate server call. export function getGeneral() { - return se(general); + return simulator(general); } \ No newline at end of file diff --git a/src/api/index.js b/src/api/index.js index fe6c09a..0e1ffc8 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,7 +1,7 @@ -import GeneralApi from './generalApi'; -import ChartApi from './chartApi'; +import * as GeneralApi from "./generalApi"; +import * as ChartApi from "./chartApi"; export default { GeneralApi, ChartApi -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/index.jsx b/src/index.jsx index 7492511..3b2415e 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -1,27 +1,31 @@ import React from "react"; -import ReactDOM from 'react-dom'; +import ReactDOM from "react-dom"; import { createBrowserHistory } from "history"; import { Router, Route, Switch } from "react-router-dom"; +import { Provider } from 'react-redux'; // import { AppContainer } from "react-hot-loader"; // import App from "./layouts/Dashboard/Dashboard"; - //Style-sheets -import './assets/less/App.less'; +import "./assets/less/App.less"; import "./assets/css/material-dashboard-react.css?v=1.3.0"; import indexRoutes from "routes/index.jsx"; +import storeCreator from "./store"; +import initialState from "./reducers/initialState"; const hist = createBrowserHistory(); +const store = storeCreator(initialState); const renderComponent = () => { - ReactDOM.render( + ReactDOM.render( {indexRoutes.map((prop, key) => { return ; })} - , + + , document.getElementById("root") ); }; diff --git a/src/reducers/index.js b/src/reducers/index.js index 9e59d24..2df12cd 100644 --- a/src/reducers/index.js +++ b/src/reducers/index.js @@ -2,8 +2,11 @@ import { combineReducers } from "redux"; -const rootReducer = combineReducers({ +import dashBoardReducers from "../views/Dashboard/Reducer"; +const rootReducer = combineReducers({ + charts: dashBoardReducers.chartsReducer, + general: dashBoardReducers.generalReducer, }); export default rootReducer; \ No newline at end of file diff --git a/src/reducers/initialStore.js b/src/reducers/initialState.js similarity index 95% rename from src/reducers/initialStore.js rename to src/reducers/initialState.js index 8feb172..060951e 100644 --- a/src/reducers/initialStore.js +++ b/src/reducers/initialState.js @@ -1,4 +1,4 @@ export default { charts: {}, general: {} -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/store/dev.js b/src/store/dev.js index 1ae27c2..09754a2 100644 --- a/src/store/dev.js +++ b/src/store/dev.js @@ -1,10 +1,10 @@ import { createStore, applyMiddleware -} from 'redux'; -import rootReducer from '../reducers'; -import reduxImmutableStateInvariant from 'redux-immutable-state-invariant'; -import thunk from 'redux-thunk'; +} from "redux"; +import rootReducer from "../reducers"; +import reduxImmutableStateInvariant from "redux-immutable-state-invariant"; +import thunk from "redux-thunk"; export default function configureStore(initialState) { return createStore( diff --git a/src/views/Dashboard/Actions.js b/src/views/Dashboard/Actions.js index e69de29..061c8fa 100644 --- a/src/views/Dashboard/Actions.js +++ b/src/views/Dashboard/Actions.js @@ -0,0 +1,12 @@ +import { + makeThunkAsyncActionCreator +} from "redux-toolbelt-thunk"; +import Api from "../../api"; + +const getGeneral = makeThunkAsyncActionCreator("FETCH_USER", Api.GeneralApi.getGeneral); +const getChartData = makeThunkAsyncActionCreator("FETCH_USER", Api.ChartApi.getChartData); + +export default { + getGeneral, + getChartData +} \ No newline at end of file diff --git a/src/views/Dashboard/Dashboard.jsx b/src/views/Dashboard/Dashboard.jsx index dba8ee9..5f0afda 100644 --- a/src/views/Dashboard/Dashboard.jsx +++ b/src/views/Dashboard/Dashboard.jsx @@ -1,8 +1,8 @@ -import React from "react"; +import React, { Component } from "react"; import PropTypes from "prop-types"; -import { bindActionCreators } from 'redux'; -import { connect } from 'react-redux'; -import actions from './Actions'; +import { bindActionCreators } from "redux"; +import { connect } from "react-redux"; +import actions from "./Actions"; // react plugin for creating charts import ChartistGraph from "react-chartist"; @@ -38,6 +38,8 @@ import CardFooter from "components/Card/CardFooter.jsx"; import dashboardStyle from "assets/jss/material-dashboard-react/views/dashboardStyle.jsx"; function mapStateToProps(state) { + debugger; + return { charts: state.charts, general: state.general @@ -45,9 +47,10 @@ function mapStateToProps(state) { } function mapDispatchToProps(dispatch) { - return { actions: bindActionCreators(actionCreators, dispatch) }; + return { actions: bindActionCreators(actions, dispatch) }; } +//Connect component to Redux store. @connect(mapStateToProps, mapDispatchToProps) class Dashboard extends React.Component { constructor(props, context) { @@ -58,6 +61,19 @@ class Dashboard extends React.Component { }; } + componentDidMount() { + const { dailySalesChart, emailsSubscriptionChart, completedTasksChart } = this.props.charts; + const { bugs, website, server } = this.props.general; + + //Check and load data from Server + if (!dailySalesChart || !emailsSubscriptionChart || !completedTasksChart) + this.props.actions.getChartData(); + + //Check and load data from Server + if (!bugs || !website || !server) + this.props.actions.getGeneral(); + } + handleChange = (_, value) => { this.setState({ value }); }; @@ -65,8 +81,12 @@ class Dashboard extends React.Component { handleChangeIndex = index => { this.setState({ value: index }); }; + render() { const { classes } = this.props; + const { dailySalesChart, emailsSubscriptionChart, completedTasksChart } = this.props.charts; + const { bugs, website, server } = this.props.general; + return (
@@ -149,13 +169,13 @@ class Dashboard extends React.Component { - + />}

Daily Sales

@@ -176,14 +196,14 @@ class Dashboard extends React.Component { - + />}

Email Subscriptions

@@ -201,13 +221,13 @@ class Dashboard extends React.Component { - + />}

Completed Tasks

@@ -233,33 +253,33 @@ class Dashboard extends React.Component { tabName: "Bugs", tabIcon: BugReport, tabContent: ( - + /> :

No data

) }, { tabName: "Website", tabIcon: Code, tabContent: ( - + /> :

No data

) }, { tabName: "Server", tabIcon: Cloud, tabContent: ( - + /> :

No data

) } ]} diff --git a/src/views/Dashboard/Reducer.jsx b/src/views/Dashboard/Reducer.jsx new file mode 100644 index 0000000..2d9462b --- /dev/null +++ b/src/views/Dashboard/Reducer.jsx @@ -0,0 +1,10 @@ +import { makeAsyncReducer } from "redux-toolbelt"; +import actions from "./Actions"; + +const chartsReducer = makeAsyncReducer(actions.getChartData); +const generalReducer = makeAsyncReducer(actions.getGeneral); + +export default { + chartsReducer, + generalReducer +}; \ No newline at end of file From 366e986b97d7dd778113068a530d9b8b9de55ddb Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Wed, 27 Jun 2018 18:14:13 +0800 Subject: [PATCH 6/6] finished the data connection --- src/views/Dashboard/Dashboard.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/views/Dashboard/Dashboard.jsx b/src/views/Dashboard/Dashboard.jsx index 5f0afda..791450a 100644 --- a/src/views/Dashboard/Dashboard.jsx +++ b/src/views/Dashboard/Dashboard.jsx @@ -38,11 +38,9 @@ import CardFooter from "components/Card/CardFooter.jsx"; import dashboardStyle from "assets/jss/material-dashboard-react/views/dashboardStyle.jsx"; function mapStateToProps(state) { - debugger; - return { - charts: state.charts, - general: state.general + charts: state.charts.data || {}, + general: state.general.data || {} }; }